Merge branch 'develop' of http://git.dev.yoho.cn/web/yohood into develop
Showing
4 changed files
with
11 additions
and
2 deletions
@@ -33,6 +33,11 @@ class Controller_News extends Controller_Abstract | @@ -33,6 +33,11 @@ class Controller_News extends Controller_Abstract | ||
33 | $list = Facade_News::getList($tag, $page->getOffset(), $limit, $exceptTags); | 33 | $list = Facade_News::getList($tag, $page->getOffset(), $limit, $exceptTags); |
34 | $this->_view['list'] = $list; | 34 | $this->_view['list'] = $list; |
35 | $newTags = Facade_News::getTags(); | 35 | $newTags = Facade_News::getTags(); |
36 | + $nums=0; | ||
37 | + foreach($newTags as $vo){ | ||
38 | + $nums+=$vo['num']; | ||
39 | + } | ||
40 | + $this->_view['nums'] = $nums; | ||
36 | $this->_view['total'] = 0; | 41 | $this->_view['total'] = 0; |
37 | $tags = $temp = array(); | 42 | $tags = $temp = array(); |
38 | foreach($newTags as $tag) | 43 | foreach($newTags as $tag) |
@@ -9,7 +9,7 @@ class Controller_Onlinereg extends Controller_Abstract | @@ -9,7 +9,7 @@ class Controller_Onlinereg extends Controller_Abstract | ||
9 | */ | 9 | */ |
10 | public function indexAction() | 10 | public function indexAction() |
11 | { | 11 | { |
12 | - $mediaTotal = Facade_Onlinereg::getDownloadTotalByType(Facade_Onlinereg::TYPE_ONLINE_MEDIA); | 12 | + $mediaTotal = Facade_Onlinereg::getDownloadTotalByType(Facade_Onlinereg::TYPE_ONLINE_SPONSOR); |
13 | $this->_view['mediaTotal'] = $mediaTotal; | 13 | $this->_view['mediaTotal'] = $mediaTotal; |
14 | } | 14 | } |
15 | 15 |
@@ -11,7 +11,11 @@ | @@ -11,7 +11,11 @@ | ||
11 | ?> | 11 | ?> |
12 | <li <?php echo ($this->view->current_tag == $tag['tag']) ?'class="current"':''?>> | 12 | <li <?php echo ($this->view->current_tag == $tag['tag']) ?'class="current"':''?>> |
13 | <a href="<?php echo url('news/index',array('tag' => $tag['tag']))?>"> | 13 | <a href="<?php echo url('news/index',array('tag' => $tag['tag']))?>"> |
14 | + <?php if($tag['tag'] == ''){?> | ||
15 | + <?php echo sprintf("%s(%s)", $tag['tag'] == '' ? '全部资讯': $tag['tag'], $this->view->nums); ?> | ||
16 | + <?php }else{?> | ||
14 | <?php echo sprintf("%s(%s)", $tag['tag'] == '' ? '全部资讯': $tag['tag'], $tag['num']); ?> | 17 | <?php echo sprintf("%s(%s)", $tag['tag'] == '' ? '全部资讯': $tag['tag'], $tag['num']); ?> |
18 | + <?php }?> | ||
15 | </a> | 19 | </a> |
16 | </li> | 20 | </li> |
17 | <?php endforeach;?> | 21 | <?php endforeach;?> |
@@ -13,7 +13,7 @@ | @@ -13,7 +13,7 @@ | ||
13 | <div class="background"><a href="/onlinereg/media"></a></div> | 13 | <div class="background"><a href="/onlinereg/media"></a></div> |
14 | <div class="apply-operate"> | 14 | <div class="apply-operate"> |
15 | <a href="/onlinereg/media">在线登记</a> | 15 | <a href="/onlinereg/media">在线登记</a> |
16 | - <?php if(!empty($this->mediaTotal)):?> | 16 | + <?php if($this->view->mediaTotal !=0):?> |
17 | <a href="/onlinereg/mediadown">新闻稿下载</a> | 17 | <a href="/onlinereg/mediadown">新闻稿下载</a> |
18 | <?php endif;?> | 18 | <?php endif;?> |
19 | </div> | 19 | </div> |
-
Please register or login to post a comment