diff --git a/application/admin/controllers/DataController.php b/application/admin/controllers/DataController.php
index 0babc274..f445184a 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存档管理
@@ -1060,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/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
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");
?>
= $this->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/controllers/DataController.php b/application/default/controllers/DataController.php
index 690b7bfc..4e683426 100755
--- a/application/default/controllers/DataController.php
+++ b/application/default/controllers/DataController.php
@@ -533,8 +533,8 @@ class DataController extends Zend_Controller_Action
function viewAction()
{
$id = (int)$this->_request->getParam('id');
- $sql="select m.*,s.status,g.id as gid,t.filename from normalmetadata m left join mdstatus s on m.uuid=s.uuid
- left join thumbnail t on t.id=m.id left join geonetworkmetadata g on m.uuid=g.uuid where ";
+ $sql="select m.*,s.status,g.id as gid,t.filename,i.doi as datadoi,i.authors,i.author_en,i.publisher,i.publisher_en, date_part('year',i.ts_published) as publish_year from normalmetadata m left join mdstatus s on m.uuid=s.uuid
+ left join thumbnail t on t.id=m.id left join geonetworkmetadata g on m.uuid=g.uuid left join datadoi i on i.uuid=m.uuid where ";
if (empty($id)) {
$uuid = $this->_request->getParam('uuid');
if (empty($uuid)) $this->_redirect('/data');
@@ -593,7 +593,7 @@ class DataController extends Zend_Controller_Action
$sql=$this->db->quoteInto($sql,$uuid);
$this->view->resources=$this->db->fetchAll($sql);
//建议参考文献
- $sql="select r.* from reference r left join mdref m on m.refid=r.id where m.uuid=? and m.reftype=0";
+ $sql="select r.* from reference r left join mdref m on m.refid=r.id where m.uuid=? and m.reftype=0 order by m.place";
$sql=$this->db->quoteInto($sql,$uuid);
$this->view->ref=$this->db->fetchAll($sql);
//用户发表文献
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'])) {?>
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/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(' - ');
特色导航
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(' > ');
?>
+
= $this->breadcrumb() ?>
-
+
姓名 |
单位 |
diff --git a/application/default/views/scripts/data/view.phtml b/application/default/views/scripts/data/view.phtml
index 13e5095d..2d85e328 100755
--- a/application/default/views/scripts/data/view.phtml
+++ b/application/default/views/scripts/data/view.phtml
@@ -30,9 +30,14 @@ if ($md->title_en) echo '
'.$this->escape($md->title_en);?>
citation) : ?>
- escape($md->citation);?>
-
- ref) : ?>
+ datadoi) || strpos($md->citation,$md->datadoi)) : ?>文章的引用
+ escape($md->citation);?>
+ datadoi) && !strpos($md->citation,$md->datadoi)) : ?>
+ 数据的引用authors,1,-1).'. '.$md->title.'. '.$md->publisher.', '.$md->publish_year.'. doi:'.$md->doi;
+ echo ' ['.substr($md->author_en,1,-1).'. '.$md->title_en.'. '.$md->publisher_en.', '.$md->publish_year.'. doi:'.$md->doi.']';
+ ?> (下载引用:RIS格式 | RIS英文格式 | Bibtex格式 | Bibtex英文格式)
+ ref) : ?>
建议参考文献
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');
?>
+
-
-
+
+
news as $k=>$v)
- {
- echo '';
- }
- ?>
-
-
+ {
+ echo '
';
+ }
+ ?>
+
+
news as $k=>$v)
- {
- echo '
';
- echo '
';
- echo '
';
- echo '
'.$v['title'].'['.date("Y-m-d",strtotime($v['ts_published'])).']
';
- //echo '
'.$v['description'].'
';
- echo '
';
- }
- ?>
-
-
‹
-
›
+ {
+ echo '
';
+ echo '
';
+ echo '
';
+ echo '
'.$v['title'].'['.date("Y-m-d",strtotime($v['ts_published'])).']
';
+ //echo '
'.$v['description'].'
';
+ echo '
';
+ }
+ ?>
+
+
‹
+
›
@@ -72,9 +76,9 @@
专题数据集