From 68d6f6a0bd9b8b065458e772b1a1d81ee4aa2360 Mon Sep 17 00:00:00 2001 From: Li Jianxuan Date: Mon, 8 Jul 2013 10:15:39 +0000 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E8=AF=84=E5=AE=A1=E4=B8=AD?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=86=E7=AD=89=E5=BE=85=E6=88=91=E8=AF=84?= =?UTF-8?q?=E5=AE=A1=E7=9A=84=E5=92=8C=E6=88=91=E8=AF=84=E5=AE=A1=E8=BF=87?= =?UTF-8?q?=E7=9A=84=E5=85=83=E6=95=B0=E6=8D=AE=E6=9F=A5=E7=9C=8B=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../default/controllers/ReviewController.php | 64 ++++++++++++++++--- .../scripts/review/inreview-require.phtml | 53 +++++++++++++++ .../scripts/review/inreview-reviewed.phtml | 55 ++++++++++++++++ .../default/views/scripts/review/navi.phtml | 16 +++-- 4 files changed, 172 insertions(+), 16 deletions(-) create mode 100644 application/default/views/scripts/review/inreview-require.phtml create mode 100644 application/default/views/scripts/review/inreview-reviewed.phtml diff --git a/application/default/controllers/ReviewController.php b/application/default/controllers/ReviewController.php index bc337291..e13a0c05 100644 --- a/application/default/controllers/ReviewController.php +++ b/application/default/controllers/ReviewController.php @@ -123,15 +123,61 @@ class ReviewController extends Zend_Controller_Action * mdstatus 中 status 字段值为 2,3,4 的元数据为正在进行评审的元数据 */ function inreviewAction(){ - $this->view->pageID = "review-inreview"; - $page=@(int)$this->_request->getParam('page'); - if (empty($page)) $page=1; - $offset=$this->limit*($page-1); - $row=$this->db->fetchAll("select count(s.*) from mdstatus s right join normalmetadata m on s.uuid=m.uuid where s.status in (2,3,4)"); - $sum=$row[0]['count']; - $sql="select m.uuid,m.title,m.id,m.description,s.status,s.ts_accepted,g.id as gid,t.filename from mdstatus s right join normalmetadata m on s.uuid=m.uuid left join geonetworkmetadata g on g.uuid=m.uuid left join thumbnail t on t.id=m.id where s.status in (2,3,4) order by s.ts_created desc,m.title limit ? offset ?"; - $this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset)); - $this->view->page=new Pagination($sum,$page,$this->limit); + + include_once("helper/view.php"); + $ac = $this->_getParam('ac'); + + if(empty($ac)) + { + $this->view->pageID = "review-inreview"; + $page=@(int)$this->_request->getParam('page'); + if (empty($page)) $page=1; + $offset=$this->limit*($page-1); + $row=$this->db->fetchAll("select count(s.*) from mdstatus s right join normalmetadata m on s.uuid=m.uuid where s.status in (2,3,4)"); + $sum=$row[0]['count']; + $sql="select m.uuid,m.title,m.id,m.description,s.status,s.ts_accepted,g.id as gid,t.filename from mdstatus s right join normalmetadata m on s.uuid=m.uuid left join geonetworkmetadata g on g.uuid=m.uuid left join thumbnail t on t.id=m.id where s.status in (2,3,4) order by s.ts_created desc,m.title limit ? offset ?"; + $this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset)); + $this->view->page = new Pagination($sum,$page,$this->limit); + } + + if($ac == "require") + { + $this->_helper->viewRenderer('inreview-require'); + $this->view->pageID = "review-inreview-require"; + $uid = view::User('id'); + + $sql = "select m.uuid,m.title,m.id,m.description,s.status,s.ts_accepted,g.id as gid,t.filename,r.ts_created,r.id,e.id as eid + from mdstatus s + right join normalmetadata m on s.uuid=m.uuid + left join geonetworkmetadata g on g.uuid=m.uuid + left join thumbnail t on t.id=m.id + left join mdreview r ON m.uuid=r.uuid + left join mdexpertreview e ON (e.id = s.userid AND e.uuid=m.uuid) + WHERE s.status in (2,3,4) AND s.userid=8018 AND r.id IS NULL + GROUP BY m.uuid,m.title,m.id,m.description,s.status,s.ts_accepted,g.id,t.filename,s.ts_created,r.ts_created,r.id,e.id + order by e.id DESC,s.ts_created desc,m.title"; + $rs = $this->db->query($sql); + view::addPaginator($rs->fetchAll(),$this,NULL,$this->limit); + } + + if($ac == "reviewed") + { + $this->_helper->viewRenderer('inreview-reviewed'); + $this->view->pageID = "review-inreview-reviewed"; + $uid = view::User('id'); + $sql = "select m.uuid,m.title,m.id,m.description,s.status,s.ts_accepted,g.id as gid,t.filename,r.ts_created + from mdstatus s + right join normalmetadata m on s.uuid=m.uuid + left join geonetworkmetadata g on g.uuid=m.uuid + left join thumbnail t on t.id=m.id + left join mdreview r ON m.uuid=r.uuid + WHERE s.status in (2,3,4) AND s.userid=8018 AND r.userid=8018 + GROUP BY m.uuid,m.title,m.id,m.description,s.status,s.ts_accepted,g.id,t.filename,s.ts_created,r.ts_created + order by s.ts_created desc,m.title"; + $rs = $this->db->query($sql); + view::addPaginator($rs->fetchAll(),$this,NULL,$this->limit); + } + }//在审阶段的元数据 diff --git a/application/default/views/scripts/review/inreview-require.phtml b/application/default/views/scripts/review/inreview-require.phtml new file mode 100644 index 00000000..d02f262f --- /dev/null +++ b/application/default/views/scripts/review/inreview-require.phtml @@ -0,0 +1,53 @@ +headTitle($this->config->title->site); +$this->headTitle($this->config->title->review); +$this->headTitle('在审元数据'); +$this->headTitle()->setSeparator(' - '); +$this->headLink()->appendStylesheet('/css/mdreview.css'); +$this->breadcrumb('首页'); +$this->breadcrumb(''.$this->config->title->review.''); +$this->breadcrumb('在审元数据'); +$this->breadcrumb()->setSeparator(' > '); +?> + +
+
+ partial('review/navi.phtml'); ?> +
+
+ paginator)): ?> + + + + + + + + + + paginator as $item): + $autoindex++;?> + + + + + + + +
名称接收时间操作
+ 评审 +
+ + md)) { ?> + 暂无数据,点击标题右侧添加按钮为此数据添加项目 + + 暂无数据 + + + +
+
+ \ No newline at end of file diff --git a/application/default/views/scripts/review/inreview-reviewed.phtml b/application/default/views/scripts/review/inreview-reviewed.phtml new file mode 100644 index 00000000..0b1fa8d0 --- /dev/null +++ b/application/default/views/scripts/review/inreview-reviewed.phtml @@ -0,0 +1,55 @@ +headTitle($this->config->title->site); +$this->headTitle($this->config->title->review); +$this->headTitle('在审元数据'); +$this->headTitle()->setSeparator(' - '); +$this->headLink()->appendStylesheet('/css/mdreview.css'); +$this->breadcrumb('首页'); +$this->breadcrumb(''.$this->config->title->review.''); +$this->breadcrumb('在审元数据'); +$this->breadcrumb()->setSeparator(' > '); +?> + +
+
+ partial('review/navi.phtml'); ?> +
+
+ paginator)): ?> + + + + + + + + + + + paginator as $item): + $autoindex++;?> + + + + + + + + +
名称接收时间评审时间操作
+ 查看 +
+ + md)) { ?> + 暂无数据,点击标题右侧添加按钮为此数据添加项目 + + 暂无数据 + + + +
+
+ \ No newline at end of file diff --git a/application/default/views/scripts/review/navi.phtml b/application/default/views/scripts/review/navi.phtml index 7391019d..16a0b12a 100644 --- a/application/default/views/scripts/review/navi.phtml +++ b/application/default/views/scripts/review/navi.phtml @@ -3,14 +3,16 @@ - + + + - - \ No newline at end of file