From f0eafe0bc38756938f9e4fc30111d3ea10083a44 Mon Sep 17 00:00:00 2001 From: Li Jianxuan Date: Mon, 13 May 2013 09:58:02 +0000 Subject: [PATCH 1/7] =?UTF-8?q?=E5=AE=8C=E5=96=84DOI=E6=88=90=E5=8A=9F?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/controllers/DataController.php | 1 + .../admin/views/scripts/data/doi.phtml | 249 ++++++++++++------ 2 files changed, 169 insertions(+), 81 deletions(-) diff --git a/application/admin/controllers/DataController.php b/application/admin/controllers/DataController.php index d4e7d038..bc6ca807 100755 --- a/application/admin/controllers/DataController.php +++ b/application/admin/controllers/DataController.php @@ -3722,6 +3722,7 @@ class Admin_DataController extends Zend_Controller_Action $this->_helper->layout->disableLayout(); $this->_helper->viewRenderer->setNoRender(); $this->jsonexit(array('success'=>'成功申请')); + return true; } }//doi diff --git a/application/admin/views/scripts/data/doi.phtml b/application/admin/views/scripts/data/doi.phtml index 9b26f39b..d92caf35 100644 --- a/application/admin/views/scripts/data/doi.phtml +++ b/application/admin/views/scripts/data/doi.phtml @@ -1,81 +1,168 @@ -headTitle($this->config->title->site); -$this->headTitle($this->config->title->author); -$this->headTitle()->setSeparator(' - '); -$this->breadcrumb('首页'); -$this->breadcrumb('数据管理'); -$this->breadcrumb('DOI'); -$this->breadcrumb()->setSeparator(' > '); -$this->theme->AppendPlus($this,'colorbox'); -$this->theme->AppendPlus($this,'admin_plugin'); -?> - -
-
- partial('data/left.phtml'); ?> -
-
-
- -
-
-
-
- - -
-
-
- error)) { ?> - error ?> - - msg)) { ?> - msg ?> - -
- paginator)): ?> - - - - - - - - - - - paginator as $item): - $autoindex++;?> - - - - - - - - -
状态元数据DOI操作
- 编辑 - 导出 - 成功 - 删除 -
- - -
- -
-
- - +headTitle($this->config->title->site); +$this->headTitle($this->config->title->author); +$this->headTitle()->setSeparator(' - '); +$this->breadcrumb('首页'); +$this->breadcrumb('数据管理'); +$this->breadcrumb('DOI'); +$this->breadcrumb()->setSeparator(' > '); +$this->theme->AppendPlus($this,'colorbox'); +$this->theme->AppendPlus($this,'admin_plugin'); +?> + +
+
+ partial('data/left.phtml'); ?> +
+
+
+ +
+
+
+
+ + +
+
+
+ error)) { ?> + error ?> + + msg)) { ?> + msg ?> + +
+ paginator)): ?> + + + + + + + + + + + paginator as $item): + $autoindex++;?> + + + + + + + + +
状态元数据DOI操作
+ 编辑 + 导出 + 成功 + 删除 +
+ + +
+ +
+
+ + From 8a3358b0548f1961e48957da645a56574ef14d3d Mon Sep 17 00:00:00 2001 From: wlx Date: Tue, 14 May 2013 05:49:18 +0000 Subject: [PATCH 2/7] #452, add ris output support for doi published data --- .../default/controllers/ServiceController.php | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/application/default/controllers/ServiceController.php b/application/default/controllers/ServiceController.php index 5abb15ae..0a93ec39 100644 --- a/application/default/controllers/ServiceController.php +++ b/application/default/controllers/ServiceController.php @@ -1376,4 +1376,62 @@ class ServiceController extends Zend_Controller_Action ->setBody($footer); } + + //RIS format convert + function risAction() + { + $this->_helper->layout->disableLayout(); + $this->_helper->viewRenderer->setNoRender(); + $uuid=$this->_request->getParam('uuid'); + $lang=$this->_request->getParam('lang'); + $ris=''; + if ($lang=='cn' && !empty($uuid)) + { + $sql="select d.*,m.description from datadoi d left join metadata m on d.uuid=m.uuid where d.uuid='$uuid' and d.ts_published is not null"; + $row=$this->db->fetchRow($sql); + $authors=explode(',',str_replace('"','',substr($row['authors'],1,-1))); + $orgs=explode(',',str_replace('"','',substr($row['organization'],1,-1))); + $ris.='TY - JOUR'."\r\n"; + $ris.='T1 - '.$row['title']."\r\n"; + foreach($authors as $a) + { + $ris.='A1 - '.$a."\r\n"; + } + $ris.='Y1 - '.date('Y/m/d',strtotime($row['ts_published']))."\r\n"; + $ris.='JF - '.$row['publisher']."\r\n"; + $ris.='JA - '.$row['publisher']."\r\n"; + $ris.='UR - http://dx.doi.org/'.$row['doi']."\r\n"; + $ris.='PB - '.$row['publisher']."\r\n"; + $ris.='M3 - doi:'.$row['doi']."\r\n"; + $ris.='DO - doi:'.$row['doi']."\r\n"; + $ris.='ER -'."\r\n"; + } + else if ($lang=='en' && !empty($uuid)) + { + $sql="select d.*,m.description from datadoi d left join metadata m on d.uuid=m.uuid where d.uuid='$uuid' and d.ts_published is not null"; + $row=$this->db->fetchRow($sql); + $authors=explode(',',str_replace('"','',substr($row['author_en'],1,-1))); + $orgs=explode(',',str_replace('"','',substr($row['organization'],1,-1))); + $ris.='TY - JOUR'."\r\n"; + $ris.='T1 - '.$row['title_en']."\r\n"; + foreach($authors as $a) + { + $ris.='A1 - '.$a."\r\n"; + } + $ris.='Y1 - '.date('Y/m/d',strtotime($row['ts_published']))."\r\n"; + $ris.='JF - '.$row['publisher_en']."\r\n"; + $ris.='JA - '.$row['publisher_en']."\r\n"; + $ris.='UR - http://dx.doi.org/'.$row['doi']."\r\n"; + $ris.='PB - '.$row['publisher_en']."\r\n"; + $ris.='M3 - doi:'.$row['doi']."\r\n"; + $ris.='DO - doi:'.$row['doi']."\r\n"; + $ris.='ER -'."\r\n"; + } + if (!empty($ris)) + { + $this->getResponse()->setHeader('Content-Type', 'application/x-Research-Info-Systems')->setHeader('Content-Disposition','attachment; filename="'.$uuid.'.ris"') + //->setHeader('Content-Type','application/force-download') + ->setBody($ris); + } + } } From 6bf1971309511187e72f9803c232524b2d722a8f Mon Sep 17 00:00:00 2001 From: Li Jianxuan Date: Tue, 14 May 2013 08:57:30 +0000 Subject: [PATCH 3/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=90=8E=E5=8F=B0review?= =?UTF-8?q?=E4=B8=AD=E8=8B=A5=E5=B9=B2=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/controllers/ReviewController.php | 30 ++--- .../admin/views/scripts/news/newsadd.phtml | 1 - .../admin/views/scripts/review/accept.phtml | 6 +- .../views/scripts/review/changeadmin.phtml | 86 +++++++-------- .../admin/views/scripts/review/inreview.phtml | 101 ++++++++--------- .../admin/views/scripts/review/left.phtml | 2 +- .../admin/views/scripts/review/myreview.phtml | 103 +++++++++++++++++- application/models/data/Review.php | 36 ++++++ 8 files changed, 242 insertions(+), 123 deletions(-) diff --git a/application/admin/controllers/ReviewController.php b/application/admin/controllers/ReviewController.php index d672d753..cd642a33 100644 --- a/application/admin/controllers/ReviewController.php +++ b/application/admin/controllers/ReviewController.php @@ -579,37 +579,23 @@ class Admin_ReviewController extends Zend_Controller_Action */ function myreviewAction(){ - $auth = Zend_Auth::getInstance(); - if($auth->hasIdentity()) - { - $user = $auth->getIdentity(); - $userid = $user->id; - } + include_once("data/Review.php"); + include_once("helper/view.php"); $search=$this->_request->getParam('search'); $keyword = $this->_request->getParam('keyword'); - $searchjoin = ""; + $review = new Review($this->db); if(!empty($search) && !empty($keyword)) { - $searchjoin = " and md.title like '%$keyword%'"; + $rows = $review->adminReviews($keyword); $this->view->keyword = $keyword; + }else{ + $rows = $review->adminReviews(); } - $sql = "select m.id,md.uuid,md.title,u.username,u.realname,m.status,md.id as mdid from mdstatus m - right join metadata md on md.uuid=m.uuid - left join users u on u.id=m.userid - where m.status in (0,1,2,3,4) and u.id='$userid' $searchjoin order by m.status desc,m.ts_accepted desc"; - - $re = $this->db->query($sql); - $rows = $re->fetchAll(); - - $paginator = Zend_Paginator::factory($rows); - $paginator->setCurrentPageNumber($this->_getParam('page')); - $paginator->setItemCountPerPage($this->view->config->page->max); - $paginator->setView($this->view); - Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml'); - $this->view->paginator=$paginator; + view::addPaginator($rows,$this->view,$this->_request); + return true; }//我管理的元数据 diff --git a/application/admin/views/scripts/news/newsadd.phtml b/application/admin/views/scripts/news/newsadd.phtml index 1def2670..922ad554 100644 --- a/application/admin/views/scripts/news/newsadd.phtml +++ b/application/admin/views/scripts/news/newsadd.phtml @@ -2,7 +2,6 @@ $this->headTitle($this->config->title->site); $this->headTitle('后台管理'); $this->headTitle()->setSeparator(' - '); - $this->headScript()->appendFile('/js/jquery-1.7.min.js'); $this->headLink()->appendStylesheet('/css/admin.css'); $this->headScript()->appendFile('/static/js/jquery.tagInput.min.js'); $this->headScript()->appendFile('/static/js/kindeditor-min.js'); diff --git a/application/admin/views/scripts/review/accept.phtml b/application/admin/views/scripts/review/accept.phtml index 9308cd20..a2c24848 100644 --- a/application/admin/views/scripts/review/accept.phtml +++ b/application/admin/views/scripts/review/accept.phtml @@ -37,7 +37,7 @@ table thead tr th {background:#EBF2F6;color:#444;} 元数据标题 负责编辑 - 时间 + 接收时间 操作 paginator)): ?> @@ -48,9 +48,7 @@ table thead tr th {background:#EBF2F6;color:#444;} - ' onclick="return confirm('是否确定取消评审')">取消评审 - '>邀请专家 - 更改管理员 + 分配编辑 diff --git a/application/admin/views/scripts/review/changeadmin.phtml b/application/admin/views/scripts/review/changeadmin.phtml index e4d4f76d..aead7473 100644 --- a/application/admin/views/scripts/review/changeadmin.phtml +++ b/application/admin/views/scripts/review/changeadmin.phtml @@ -2,52 +2,52 @@ $this->headTitle($this->config->title->site); $this->headTitle('后台管理'); $this->headTitle()->setSeparator(' - '); - $this->headLink()->appendStylesheet('/css/admin.css'); $this->breadcrumb('首页'); $this->breadcrumb('后台首页'); $this->breadcrumb('元数据评审'); $this->breadcrumb()->setSeparator(' > '); ?> -
-partial('review/left.phtml'); ?> -
-
-msg or $this->messages) :?> -
-msg) : ?> -

msg; ?>

-messages): foreach($this->messages as $msg): ?> -

- -
- - - - - - - - - - - - - paginator)): ?> - - paginator as $item): ?> - - - - - - - - - - - - -
用户ID用户名姓名单位联系电话电子邮箱操作
设置为此评审的管理员
- -
+ +
+
+ partial('review/left.phtml'); ?> +
+
+ msg or $this->messages) :?> +
+ msg) : ?> +

msg; ?>

+ messages): foreach($this->messages as $msg): ?> +

+ +
+ + + + + + + + + + + paginator)): ?> + + paginator as $item): ?> + + + + + + + + + + +
用户ID用户名姓名电子邮箱操作
设置为此评审的管理员
+ +
\ No newline at end of file diff --git a/application/admin/views/scripts/review/inreview.phtml b/application/admin/views/scripts/review/inreview.phtml index 3712e39e..7b3e2d54 100644 --- a/application/admin/views/scripts/review/inreview.phtml +++ b/application/admin/views/scripts/review/inreview.phtml @@ -2,58 +2,61 @@ $this->headTitle($this->config->title->site); $this->headTitle('后台管理'); $this->headTitle()->setSeparator(' - '); - $this->headLink()->appendStylesheet('/css/admin.css'); - $this->headScript()->appendFile('/js/jquery-1.6.4.min.js'); $this->breadcrumb('首页'); $this->breadcrumb('后台首页'); $this->breadcrumb('元数据评审'); $this->breadcrumb()->setSeparator(' > '); ?> -
-partial('review/left.phtml'); ?> -
-
-msg or $this->messages) :?> -
-msg) : ?> -

msg; ?>

-messages): foreach($this->messages as $msg): ?> -

- -
- + +
+
+ partial('review/left.phtml'); ?> +
+
+ msg or $this->messages) :?> +
+ msg) : ?> +

msg; ?>

+ messages): foreach($this->messages as $msg): ?> +

+ +
+ - - - - - - - - - - paginator)): ?> - - paginator as $item): ?> - - - - - - - - - -
标题状态管理员操作
查看详细 - 邀请专家 - 更改管理员 -
- -
- \ No newline at end of file + + + + + + + + + paginator)): ?> + + paginator as $item): ?> + + + + + + + + + +
标题 + 状态责任编辑操作
查看详细 + 邀请专家 + 分配编辑 +
+ +
+
\ No newline at end of file diff --git a/application/admin/views/scripts/review/left.phtml b/application/admin/views/scripts/review/left.phtml index 95440b31..1937f856 100644 --- a/application/admin/views/scripts/review/left.phtml +++ b/application/admin/views/scripts/review/left.phtml @@ -2,7 +2,7 @@

元数据评审

- + diff --git a/application/admin/views/scripts/review/myreview.phtml b/application/admin/views/scripts/review/myreview.phtml index d96cd1a3..e646617a 100644 --- a/application/admin/views/scripts/review/myreview.phtml +++ b/application/admin/views/scripts/review/myreview.phtml @@ -6,6 +6,7 @@ $this->breadcrumb('后台首页'); $this->breadcrumb('元数据评审'); $this->breadcrumb()->setSeparator(' > '); + $this->theme->AppendPlus($this,'colorbox'); ?> + + render('breadcrumbs.phtml'); ?> metadata;if ($md):?>

escape($md->title); if ($md->title_en) echo '
'.$this->escape($md->title_en);?>


-
+