...
|
...
|
@@ -11,11 +11,12 @@ class Controller_Admin_News extends Controller_Admin_Base |
|
|
public function indexAction()
|
|
|
{
|
|
|
$limit = 15 ;
|
|
|
$url_args = $conditions = array();
|
|
|
$total = Facade_News::getTotal($conditions);
|
|
|
$tag = $this->_request->query('tag','');
|
|
|
$url_args = $conditions = array('tag'=> $tag);
|
|
|
$total = Facade_News::getTotal($tag);
|
|
|
$pagination = new Lib_Helper_Pagination($total,$limit);
|
|
|
$pagination->setParames($url_args);
|
|
|
$list = Facade_News::getList($conditions, $pagination->getOffset(), $limit);
|
|
|
$list = Facade_News::getList($tag, $pagination->getOffset(), $limit);
|
|
|
foreach ($list as $k => $v)
|
|
|
{
|
|
|
$list[$k]['content'] = str_replace(array("\n","\r","\t"),'', Util_StringHelper::substr_cn(strip_tags($v['content']),30));
|
...
|
...
|
@@ -34,6 +35,7 @@ class Controller_Admin_News extends Controller_Admin_Base |
|
|
$this->_view['pagination'] = $pagination->getPagination() ;
|
|
|
$this->_view['base_dir'] = $this->_request->baseDir() ;
|
|
|
$this->_view['tags'] = array() ;
|
|
|
$this->_view['tag'] = $tag;
|
|
|
}
|
|
|
|
|
|
public function createAction()
|
...
|
...
|
|