From 10050c52d5288f394ed7c31c0133a54081aa3032 Mon Sep 17 00:00:00 2001 From: Li Jianxuan Date: Wed, 19 Oct 2011 07:40:15 +0000 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=86=E6=9F=A5=E7=9C=8B?= =?UTF-8?q?=E8=AF=A6=E7=BB=86=E8=AF=84=E8=AE=BA=E7=9A=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/controllers/ReviewController.php | 35 +++++++++++- .../views/scripts/review/commentslist.phtml | 2 +- .../views/scripts/review/commentsview.phtml | 55 +++++++++---------- 3 files changed, 60 insertions(+), 32 deletions(-) diff --git a/application/admin/controllers/ReviewController.php b/application/admin/controllers/ReviewController.php index 3304881d..6f64d2ef 100644 --- a/application/admin/controllers/ReviewController.php +++ b/application/admin/controllers/ReviewController.php @@ -811,12 +811,41 @@ class Admin_ReviewController extends Zend_Controller_Action $q = $this->_request->getParam('q'); $search = $this->_request->getParam('search'); - if($ac=='view' && !empty($uuid)) + if($ac=='view' && !empty($id)) { - $redirect = "/admin/review/comments"; + $redirect = "/admin/review/comments/ac/view/id/$id"; + + if(!is_numeric($id)) + { + $this->messenger->addMessage('参数不正确,请按正确的步骤进行访问'); + $this->_redirect($redirect); + } + + $sql = "select r.id,r.mdcomment,r.datacomment,r.editorcomment,u.realname,md.title,att.filename,r.ts_created,ratt.attachid as attid from mdreview r + left join metadata md on md.uuid=r.uuid + left join users u on u.id=r.userid + left join mdreviewattach ratt on ratt.reviewid=r.id + left join attachments att on att.id=ratt.attachid + where r.id='$id' + "; + + $rs = $this->db->query($sql); + + $row = $rs->fetch(); + + if(!empty($row['attid'])) + { + $row['attid'] = '下载'; + } + else + { + $row['attid'] = '无附件'; + } - $this->_helper->viewRenderer(''); + $this->view->info = $row; + + $this->_helper->viewRenderer('commentsview'); }//查看单个元数据的评审 diff --git a/application/admin/views/scripts/review/commentslist.phtml b/application/admin/views/scripts/review/commentslist.phtml index cb8e0b61..313f776a 100644 --- a/application/admin/views/scripts/review/commentslist.phtml +++ b/application/admin/views/scripts/review/commentslist.phtml @@ -47,7 +47,7 @@ if($item['is_expert']==false)echo "否";else echo "是"; ?> - 查看评审 + 查看详细 diff --git a/application/admin/views/scripts/review/commentsview.phtml b/application/admin/views/scripts/review/commentsview.phtml index 47ef83ad..ecb7415d 100644 --- a/application/admin/views/scripts/review/commentsview.phtml +++ b/application/admin/views/scripts/review/commentsview.phtml @@ -22,34 +22,33 @@ - \ No newline at end of file