From ade674438e9bb63b94f7d1a7c3a54453a075f1e5 Mon Sep 17 00:00:00 2001 From: wlx Date: Fri, 21 Jun 2013 13:58:44 +0000 Subject: [PATCH] merge heihedata branch from r3741 to r3746. --- .../admin/controllers/ReviewController.php | 4 +- .../admin/controllers/SysController.php | 67 ++++++++++++++++++- .../views/scripts/data/fund-data-list.phtml | 2 +- .../admin/views/scripts/sys/problem-md.phtml | 47 +++++++++++++ .../admin/views/scripts/sys/problem-ref.phtml | 4 +- .../admin/views/scripts/sys/problem.phtml | 5 +- application/models/data/Review.php | 11 +-- 7 files changed, 129 insertions(+), 11 deletions(-) create mode 100644 application/admin/views/scripts/sys/problem-md.phtml diff --git a/application/admin/controllers/ReviewController.php b/application/admin/controllers/ReviewController.php index 1fe5ef7e..3a703bf6 100644 --- a/application/admin/controllers/ReviewController.php +++ b/application/admin/controllers/ReviewController.php @@ -172,7 +172,7 @@ class Admin_ReviewController extends Zend_Controller_Action $sql = "select m.*,md.title,u.username,u.realname from mdstatus m right join metadata md on md.uuid=m.uuid left join users u on u.id=m.userid - where m.status=1 + where m.status in (1,2,3,4) and md.title like '%$keyword%' "; $re = $this->db->query($sql); @@ -191,7 +191,7 @@ class Admin_ReviewController extends Zend_Controller_Action $sql = "select m.*,md.title,u.username,u.realname from mdstatus m right join metadata md on md.uuid=m.uuid left join users u on u.id=m.userid - where m.status=1 order by m.ts_created desc"; + where m.status in (1,2,3,4) order by m.ts_created desc"; $re = $this->db->query($sql); $rows = $re->fetchAll(); diff --git a/application/admin/controllers/SysController.php b/application/admin/controllers/SysController.php index 34457854..b1faf9bc 100644 --- a/application/admin/controllers/SysController.php +++ b/application/admin/controllers/SysController.php @@ -640,7 +640,72 @@ where t.filesize<1024*5) $paginator->setView($this->view); Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml'); $this->view->paginator=$paginator; - } + } else if ($ac=='heihefund') + { + $sql = "SELECT m.title,m.uuid,g.id as gid + from metadata m + LEFT JOIN mdstatus s ON m.uuid=s.uuid + left join datasource on datasource.uuid=m.uuid + left join source on datasource.sourceid=source.id +left join mdfund mf on mf.uuid=m.uuid +left join geonetworkmetadata g on m.uuid=g.uuid + where s.status>4 and source.code='heihe' and mf.fid is null + ORDER BY m.title DESC;"; + $sth = $this->db->prepare($sql); + $sth->execute(); + $rows = $sth->fetchAll(); + + $paginator = Zend_Paginator::factory($rows); + $paginator->setCurrentPageNumber($this->_getParam('page')); + $paginator->setItemCountPerPage($pages); + $paginator->setView($this->view); + Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml'); + $this->view->paginator=$paginator; + $this->_helper->viewRenderer('problem-md'); + } else if ($ac=='noemail') + { + $sql = "SELECT distinct m.title,m.uuid,g.id as gid + from metadata m + LEFT JOIN mdstatus s ON m.uuid=s.uuid +left join role on role.uuid=m.uuid +left join geonetworkmetadata g on m.uuid=g.uuid + where m.datatype=1 and s.status>4 and m.uuid not in ( +select role.uuid from role left join responsible res on role.resid=res.id +where res.email is not null and role.role in ('resourceProvider','owner','pointOfContact','custodian') +) + ORDER BY m.title DESC;"; + $sth = $this->db->prepare($sql); + $sth->execute(); + $rows = $sth->fetchAll(); + + $paginator = Zend_Paginator::factory($rows); + $paginator->setCurrentPageNumber($this->_getParam('page')); + $paginator->setItemCountPerPage($pages); + $paginator->setView($this->view); + Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml'); + $this->view->paginator=$paginator; + $this->_helper->viewRenderer('problem-md'); + } else if ($ac=='unmoved') + { + $sql = "SELECT distinct m.title,m.uuid,g.id as gid + from metadata m +LEFT JOIN mdstatus s ON m.uuid=s.uuid +left join geonetworkmetadata g on m.uuid=g.uuid +left join dataset ds on ds.uuid=m.uuid + where s.status>4 and ds.path like '%upload%' + ORDER BY m.title DESC;"; + $sth = $this->db->prepare($sql); + $sth->execute(); + $rows = $sth->fetchAll(); + + $paginator = Zend_Paginator::factory($rows); + $paginator->setCurrentPageNumber($this->_getParam('page')); + $paginator->setItemCountPerPage($pages); + $paginator->setView($this->view); + Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml'); + $this->view->paginator=$paginator; + $this->_helper->viewRenderer('problem-md'); + } $this->view->activeID="btn-".$ac; } } diff --git a/application/admin/views/scripts/data/fund-data-list.phtml b/application/admin/views/scripts/data/fund-data-list.phtml index 165908c7..1875c90d 100644 --- a/application/admin/views/scripts/data/fund-data-list.phtml +++ b/application/admin/views/scripts/data/fund-data-list.phtml @@ -91,7 +91,7 @@ table thead tr th {background:#EBF2F6;} - 查看数据 + 查看数据 diff --git a/application/admin/views/scripts/sys/problem-md.phtml b/application/admin/views/scripts/sys/problem-md.phtml new file mode 100644 index 00000000..c85f73a7 --- /dev/null +++ b/application/admin/views/scripts/sys/problem-md.phtml @@ -0,0 +1,47 @@ +headTitle($this->config->title->site); + $this->headTitle('后台管理'); + $this->headTitle()->setSeparator(' - '); + $this->headLink()->appendStylesheet('/css/admin.css'); + $this->theme->AppendPlus($this,'colorbox'); +?> +
+partial('sys/left.phtml'); ?> +
+ +
+ 数据引用方式错误 + 缺少文件列表 + 数据实体大小不匹配 + 黑河计划数据的项目信息缺失 + 数据目录未从upload中转移 + 缺少审核人email + + + + + +paginator)): + $autoindex=0; + foreach ($this->paginator as $item): + $autoindex++;?> + + + + + + +
数据标题uuid操作
编辑
+ +
+activeID)) : ?> + + + \ No newline at end of file diff --git a/application/admin/views/scripts/sys/problem-ref.phtml b/application/admin/views/scripts/sys/problem-ref.phtml index b9335d8f..75a793dd 100644 --- a/application/admin/views/scripts/sys/problem-ref.phtml +++ b/application/admin/views/scripts/sys/problem-ref.phtml @@ -13,7 +13,9 @@ 数据引用方式错误 缺少文件列表 数据实体大小不匹配 - + 黑河计划数据的项目信息缺失 + 数据目录未从upload中转移 + 缺少审核人email diff --git a/application/admin/views/scripts/sys/problem.phtml b/application/admin/views/scripts/sys/problem.phtml index 9e3a3edf..57f00b80 100644 --- a/application/admin/views/scripts/sys/problem.phtml +++ b/application/admin/views/scripts/sys/problem.phtml @@ -12,7 +12,10 @@
数据引用方式错误 缺少文件列表 - 数据实体过小 + 数据实体过小 + 黑河计划数据的项目信息缺失 + 数据目录未从upload中转移 + 缺少审核人email
数据标题 引用
diff --git a/application/models/data/Review.php b/application/models/data/Review.php index 6eaae15a..a0d23623 100644 --- a/application/models/data/Review.php +++ b/application/models/data/Review.php @@ -239,15 +239,16 @@ class ReviewListener implements Zend_EventManager_ListenerAggregate $this->db->query($sql,array($id)); //email message if(isset($emails) &&is_array($emails) && count($emails)>0) - { - $mail=new WestdcMailer($this->view->config->smtp); + { + $config=Zend_Registry::get('config'); + $mail=new WestdcMailer($config->smtp); $sql="select m.uuid,m.title from metadata m left join mdstatus s on m.uuid=s.uuid where s.id='$id'"; $rs=$this->db->query($sql); $res=$rs->fetch(); $mailtp=new EmailText($this->db,'metadata-publish',array('uuid'=>$res['uuid'],'title'=>$res['title'])); - $mail->setBodyText($mailtp->getBody()); - $mail->setFrom($this->view->config->service->email,'西部数据中心服务组'); - $mail->addTo($emails); + $mail->setBodyText($mailtp->getBody()); + $mail->setFrom($config->service->email,'西部数据中心服务组'); + foreach($emails as $email) $mail->addTo($email); $mail->setSubject($mailtp->getSubject()); $mail->send(); }
数据标题 UUID