Authored by tmq

bug

... ... @@ -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)
... ...
... ... @@ -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;?>
... ...