Authored by microTT

Merge branch 'develop' of http://git.dev.yoho.cn/web/yohood into develop

... ... @@ -33,6 +33,11 @@ class Controller_News extends Controller_Abstract
$list = Facade_News::getList($tag, $page->getOffset(), $limit, $exceptTags);
$this->_view['list'] = $list;
$newTags = Facade_News::getTags();
$nums=0;
foreach($newTags as $vo){
$nums+=$vo['num'];
}
$this->_view['nums'] = $nums;
$this->_view['total'] = 0;
$tags = $temp = array();
foreach($newTags as $tag)
... ...
... ... @@ -9,7 +9,7 @@ class Controller_Onlinereg extends Controller_Abstract
*/
public function indexAction()
{
$mediaTotal = Facade_Onlinereg::getDownloadTotalByType(Facade_Onlinereg::TYPE_ONLINE_MEDIA);
$mediaTotal = Facade_Onlinereg::getDownloadTotalByType(Facade_Onlinereg::TYPE_ONLINE_SPONSOR);
$this->_view['mediaTotal'] = $mediaTotal;
}
... ...
... ... @@ -11,7 +11,11 @@
?>
<li <?php echo ($this->view->current_tag == $tag['tag']) ?'class="current"':''?>>
<a href="<?php echo url('news/index',array('tag' => $tag['tag']))?>">
<?php if($tag['tag'] == ''){?>
<?php echo sprintf("%s(%s)", $tag['tag'] == '' ? '全部资讯': $tag['tag'], $this->view->nums); ?>
<?php }else{?>
<?php echo sprintf("%s(%s)", $tag['tag'] == '' ? '全部资讯': $tag['tag'], $tag['num']); ?>
<?php }?>
</a>
</li>
<?php endforeach;?>
... ...
... ... @@ -13,7 +13,7 @@
<div class="background"><a href="/onlinereg/media"></a></div>
<div class="apply-operate">
<a href="/onlinereg/media">在线登记</a>
<?php if(!empty($this->mediaTotal)):?>
<?php if($this->view->mediaTotal !=0):?>
<a href="/onlinereg/mediadown">新闻稿下载</a>
<?php endif;?>
</div>
... ...