diff --git a/application/admin/controllers/DataController.php b/application/admin/controllers/DataController.php index fc26e9bf..78641121 100755 --- a/application/admin/controllers/DataController.php +++ b/application/admin/controllers/DataController.php @@ -2459,6 +2459,41 @@ group by m.uuid,m.title,m.description) md ON md.uuid=v.uuid } + + //未发布版本浏览 + else if($ac=="unpublish") + { + $keywords = $this->_request->getParam('q'); + if(!empty($keywords)) + $this->view->q = $keywords; + $sql = "SELECT md.title,md.uuid,v.ts_created,v.changelog,gm.owner,v.id,u.username,u.realname FROM mdversion v + LEFT JOIN metadata md ON md.uuid=v.uuid + left join geonetworkmetadata gm on md.uuid=gm.uuid + left join users u on gm.owner=u.id + left join mdstatus st on md.uuid=st.uuid + WHERE md.title IS NOT NULL and v.changelog is null and st.status>4 "; + if(!empty($keywords)) + { + $search=new Search($keywords); + $where=$search->sql_expr(array("md.title","md.description")); + $sql.=' and '.$where; + } + $sql.=" order by v.ts_created desc"; + + $sth = $this->db->prepare($sql); + $sth->execute(); + $rows = $sth->fetchAll(); + + $paginator = Zend_Paginator::factory($rows); + $paginator->setCurrentPageNumber($this->_getParam('page')); + $paginator->setItemCountPerPage(10); + $paginator->setView($this->view); + Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml'); + $this->view->paginator=$paginator; + + $this->_helper->viewRenderer('version-unpublish'); + } + //删除某个版本 else if($ac=="delete") { diff --git a/application/admin/views/scripts/data/version-bydata.phtml b/application/admin/views/scripts/data/version-bydata.phtml index 79923b6f..9c17e343 100644 --- a/application/admin/views/scripts/data/version-bydata.phtml +++ b/application/admin/views/scripts/data/version-bydata.phtml @@ -19,8 +19,11 @@