From d97bd5b603aa3005ae52331fd282a8a63b4399c0 Mon Sep 17 00:00:00 2001 From: wlx Date: Tue, 7 May 2013 02:45:31 +0000 Subject: [PATCH 1/9] change data/offlineapp style --- application/default/views/scripts/data/offlineapp.phtml | 3 ++- htdocs/css/offlineapp.css | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/application/default/views/scripts/data/offlineapp.phtml b/application/default/views/scripts/data/offlineapp.phtml index ebbba21c..c3589232 100644 --- a/application/default/views/scripts/data/offlineapp.phtml +++ b/application/default/views/scripts/data/offlineapp.phtml @@ -10,8 +10,9 @@ $this->breadcrumb(''.$this->config->title->data.''); $this->breadcrumb('最近20条离线数据申请'); $this->breadcrumb()->setSeparator(' > '); ?> +
breadcrumb() ?>
- +
diff --git a/htdocs/css/offlineapp.css b/htdocs/css/offlineapp.css index 2d02e3ec..ee77e731 100644 --- a/htdocs/css/offlineapp.css +++ b/htdocs/css/offlineapp.css @@ -1,5 +1,3 @@ -ul{clear:left;list-style-type: none;} -li{float:left;} .name {width:60px;} .unit {width:120px;} .date {width:80px;} From 1d6c27d93cc2d260186dc660a196fb0e5a887cf9 Mon Sep 17 00:00:00 2001 From: wlx Date: Tue, 7 May 2013 04:03:14 +0000 Subject: [PATCH 2/9] change data index style --- application/default/views/scripts/data/index.phtml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/application/default/views/scripts/data/index.phtml b/application/default/views/scripts/data/index.phtml index d14b6de4..8fc850b9 100755 --- a/application/default/views/scripts/data/index.phtml +++ b/application/default/views/scripts/data/index.phtml @@ -13,10 +13,10 @@ $this->headTitle()->setSeparator(' - ');

特色导航

From 82a862d8fcfa05e66078ba490d24716a2ea86eec Mon Sep 17 00:00:00 2001 From: wlx Date: Wed, 8 May 2013 02:02:34 +0000 Subject: [PATCH 3/9] =?UTF-8?q?fix=20#463,=20=E5=AE=9E=E7=8E=B0=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E7=9B=AE=E5=BD=95=E7=9A=84=E9=87=8D=E6=96=B0=E5=AF=BC?= =?UTF-8?q?=E5=85=A5=EF=BC=8C=E4=BB=A5=E5=8F=8A=E5=9C=A8=E6=96=B0=E5=BB=BA?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E8=B7=AF=E5=BE=84=E6=97=B6=E5=AE=9E=E7=8E=B0?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=E5=AF=BC=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/controllers/DataController.php | 33 +++++++++++++++++-- application/admin/views/scripts/data/md.phtml | 7 ++-- 2 files changed, 34 insertions(+), 6 deletions(-) diff --git a/application/admin/controllers/DataController.php b/application/admin/controllers/DataController.php index 0babc274..b24bb276 100755 --- a/application/admin/controllers/DataController.php +++ b/application/admin/controllers/DataController.php @@ -509,7 +509,7 @@ class Admin_DataController extends Zend_Controller_Action /* * datasetAction() - * 数据存档 + * 数据路径:即数据的物理主目录 * */ function datasetAction() @@ -532,7 +532,7 @@ class Admin_DataController extends Zend_Controller_Action $this->view->uuid = $uuid; } - if($ac == "update") + else if($ac == "update") { $this->_helper->layout->disableLayout(); $this->_helper->viewRenderer->setNoRender(); @@ -544,6 +544,10 @@ class Admin_DataController extends Zend_Controller_Action $sql = "UPDATE dataset SET host=?,path=? WHERE uuid=?"; $sth = $this->db->prepare($sql); $ds = $sth ->execute(array($host,$path,$uuid)); + if ($host=='ftp1.westgis.ac.cn') + { + file_get_contents("http://ftp1.westgis.ac.cn/proftp_upload.php?uuid=".$uuid."&filelist=1"); + } if($ds) { @@ -557,7 +561,7 @@ class Admin_DataController extends Zend_Controller_Action } } - if($ac == "add") + else if($ac == "add") { $this->_helper->layout->disableLayout(); $this->_helper->viewRenderer->setNoRender(); @@ -580,6 +584,10 @@ class Admin_DataController extends Zend_Controller_Action $sql = "INSERT INTO dataset (uuid,host,path) VALUES (?,?,?)"; $sth = $this->db->prepare($sql); $ds = $sth ->execute(array($uuid,$host,$path)); + if ($host=='ftp1.westgis.ac.cn') + { + file_get_contents("http://ftp1.westgis.ac.cn/proftp_upload.php?uuid=".$uuid."&filelist=1"); + } if($ds) { @@ -592,6 +600,25 @@ class Admin_DataController extends Zend_Controller_Action return true; } } + else if ($ac=="import") + { + $this->_helper->layout->disableLayout(); + $this->_helper->viewRenderer->setNoRender(); + + $uuid = $this->_request->getParam('uuid'); + $sql = "SELECT * FROM dataset WHERE uuid=?"; + $sth = $this->db->prepare($sql); + $sth ->execute(array($uuid)); + $row = $sth->fetch(); + + if ($row['host']=='ftp1.westgis.ac.cn') + { + file_get_contents("http://ftp1.westgis.ac.cn/proftp_upload.php?uuid=".$uuid."&filelist=1"); + echo '

数据目录成功导入!

'; + } else { + echo '

数据目录未导入!

'; + } + } }//datasetAction存档管理 diff --git a/application/admin/views/scripts/data/md.phtml b/application/admin/views/scripts/data/md.phtml index c0c783e1..b44a4935 100644 --- a/application/admin/views/scripts/data/md.phtml +++ b/application/admin/views/scripts/data/md.phtml @@ -59,10 +59,11 @@ 编辑数据来源 | - 存档 | + 数据路径 | + 重新导入数据目录 | - 添加存档 | - + 设置数据路径 | + 邮件通知 | 支持项目 | DOI From 01ef6f5cb610c3d7c7236e3398c7adf8c9d40b64 Mon Sep 17 00:00:00 2001 From: Li Jianxuan Date: Wed, 8 May 2013 02:33:48 +0000 Subject: [PATCH 4/9] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=96=87=E7=8C=AE=E6=8E=92=E5=BA=8F=E5=8A=9F=E8=83=BD=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=87=E7=8C=AE=E6=8E=92=E5=BA=8F=E6=97=B6?= =?UTF-8?q?where=E6=9D=A1=E4=BB=B6=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controllers/DataController.php | 5 +++-- application/admin/views/scripts/data/reference.phtml | 4 +++- .../default/views/scripts/author/literature-viewdata.phtml | 2 +- application/models/data/Author.php | 4 ++-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/application/admin/controllers/DataController.php b/application/admin/controllers/DataController.php index b24bb276..f445184a 100755 --- a/application/admin/controllers/DataController.php +++ b/application/admin/controllers/DataController.php @@ -1087,10 +1087,11 @@ class Admin_DataController extends Zend_Controller_Action else{ $select=$this->db->select(); - $select->from('mdref',array('id as mdid','refid')) + $select->from('mdref',array('id as mdid','refid','place')) ->join('metadata','metadata.uuid=mdref.uuid') ->join('reference','reference.id=mdref.refid') - ->order('metadata.title'); + ->order('metadata.title') + ->order('mdref.place'); $paginator = Zend_Paginator::factory($select); $paginator->setCurrentPageNumber($this->_getParam('page')); $paginator->setItemCountPerPage(30); diff --git a/application/admin/views/scripts/data/reference.phtml b/application/admin/views/scripts/data/reference.phtml index 8fdc0f39..fa23e1f5 100644 --- a/application/admin/views/scripts/data/reference.phtml +++ b/application/admin/views/scripts/data/reference.phtml @@ -8,6 +8,8 @@ $this->breadcrumb('数据管理'); $this->breadcrumb('数据文献关联管理'); $this->breadcrumb()->setSeparator(' > '); + $this->theme->AppendPlus($this,'colorbox'); + $this->theme->AppendModel($this,"author-literature"); ?>
partial('data/left.phtml'); ?> @@ -56,7 +58,7 @@ foreach ($this->paginator as $item): $u=$item['uuid']; endif; if ($i==0) echo ''; ?> diff --git a/application/default/views/scripts/author/literature-viewdata.phtml b/application/default/views/scripts/author/literature-viewdata.phtml index a1ae7aa6..b9457b2b 100644 --- a/application/default/views/scripts/author/literature-viewdata.phtml +++ b/application/default/views/scripts/author/literature-viewdata.phtml @@ -39,7 +39,7 @@ $this->breadcrumb()->setSeparator(' > ');

查看详细 | 编辑 - | 排序 + | 排序 | 删除 | 添加文献

diff --git a/application/models/data/Author.php b/application/models/data/Author.php index 0f9a3d5e..8cb14eab 100644 --- a/application/models/data/Author.php +++ b/application/models/data/Author.php @@ -53,7 +53,7 @@ class Literature extends Author function byuuid($uuid){ include_once("helper/view.php"); $uid = view::User('id'); - $sql = "SELECT md.title,md.uuid,r.id,r.reference,r.link,mr.place FROM mdref mr + $sql = "SELECT md.title,md.uuid,r.id,r.reference,r.link,mr.place,mr.id as mrid FROM mdref mr LEFT JOIN metadata md ON md.uuid=mr.uuid LEFT JOIN mdauthor a ON md.uuid=a.uuid left join reference r on mr.refid=r.id @@ -86,7 +86,7 @@ class Literature extends Author 'place' => $order ); - $s = $dbh->update("mdref",$data," refid=$id ",false); + $s = $dbh->update("mdref",$data," id=$id ",false); return $s; } From 86b5731af73a692cdb07e4974453e664882c0509 Mon Sep 17 00:00:00 2001 From: Li Jianxuan Date: Wed, 8 May 2013 02:35:44 +0000 Subject: [PATCH 5/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9doi=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E7=9A=84=E8=A1=A8=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/default/views/scripts/author/doi-add.phtml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/application/default/views/scripts/author/doi-add.phtml b/application/default/views/scripts/author/doi-add.phtml index b4d51784..0c5488d7 100644 --- a/application/default/views/scripts/author/doi-add.phtml +++ b/application/default/views/scripts/author/doi-add.phtml @@ -43,9 +43,9 @@ $this->headLink()->appendStylesheet('/css/author.css');
- +
- " /> + " />
@@ -63,13 +63,13 @@ $this->headLink()->appendStylesheet('/css/author.css');
- " /> + " />
- +
- " /> + " />
data['info']) || !is_array($this->data['info'])) {?> From 7f44514bafa54db54bbdda81eb976bc9bbb7d1fa Mon Sep 17 00:00:00 2001 From: Li Jianxuan Date: Wed, 8 May 2013 03:08:04 +0000 Subject: [PATCH 6/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E6=8E=A8=E8=8D=90=E5=9B=BE=E7=89=87=E7=9A=84=E6=9C=80=E5=B0=8F?= =?UTF-8?q?=E5=B0=BA=E5=AF=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../default/views/scripts/index/index.phtml | 52 ++++++++++--------- 1 file changed, 28 insertions(+), 24 deletions(-) diff --git a/application/default/views/scripts/index/index.phtml b/application/default/views/scripts/index/index.phtml index 8dc7ec8d..7aac4f25 100755 --- a/application/default/views/scripts/index/index.phtml +++ b/application/default/views/scripts/index/index.phtml @@ -5,6 +5,10 @@ $auth = Zend_Auth::getInstance(); $this->headLink()->appendStylesheet('/css/index.css'); ?> +

新闻

@@ -16,30 +20,30 @@
- + +
@@ -72,9 +76,9 @@

专题数据集

姓名 单位