diff --git a/module/Metadata/src/Metadata/Controller/IndexController.php b/module/Metadata/src/Metadata/Controller/IndexController.php index ed4800b1..c8dd5d0a 100644 --- a/module/Metadata/src/Metadata/Controller/IndexController.php +++ b/module/Metadata/src/Metadata/Controller/IndexController.php @@ -116,6 +116,8 @@ class IndexController extends AbstractActionController $metadata->opt->order = "m.ts_created"; if($order == "title") $metadata->opt->order = "m.title"; + if($order == "viewed") + $metadata->opt->order = "m.viewedcount"; } if(!empty($sort)) @@ -135,6 +137,7 @@ class IndexController extends AbstractActionController $metadata->opt->where = array(" ol.host='http://www.sanjiangyuan.org.cn' "); } + view::addPaginator($metadata->fetchAll(),$this,10,'layout/metadata/pagination/browse'); return $this->ViewModel; diff --git a/module/Metadata/view/metadata/index/datalist.phtml b/module/Metadata/view/metadata/index/datalist.phtml index a6d48870..a3c0b464 100644 --- a/module/Metadata/view/metadata/index/datalist.phtml +++ b/module/Metadata/view/metadata/index/datalist.phtml @@ -3,6 +3,7 @@ if (!empty($this->codename)) $this->headTitle($this->codename); $theme = new \Sookon\Helpers\Theme; $theme->AppendPlus($this,'colorbox'); ?> +