merge heihedata branch from r3451 to r3465
This commit is contained in:
commit
1cd0a48210
|
@ -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 '<h1>数据目录成功导入!</h1>';
|
||||
} else {
|
||||
echo '<h1>数据目录未导入!</h1>';
|
||||
}
|
||||
}
|
||||
|
||||
}//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);
|
||||
|
|
|
@ -59,9 +59,10 @@
|
|||
<?php endif; ?>
|
||||
<a href="/admin/data/source/do/datasource/uuid/<?php echo $item['uuid'];?>">编辑数据来源</a> |
|
||||
<?php if(!empty($item['datasetid'])):?>
|
||||
<a href="/admin/data/dataset/ac/getdataset/uuid/<?php echo $item['uuid'];?>" class="iframe">存档</a> |
|
||||
<a href="/admin/data/dataset/ac/getdataset/uuid/<?php echo $item['uuid'];?>" class="iframe">数据路径</a> |
|
||||
<a href="/admin/data/dataset/ac/import/uuid/<?php echo $item['uuid'];?>" class="iframe">重新导入数据目录</a> |
|
||||
<?php else: ?>
|
||||
<a href="/admin/data/dataset/ac/getdataset/uuid/<?php echo $item['uuid'];?>" class="iframe">添加存档</a> |
|
||||
<a href="/admin/data/dataset/ac/getdataset/uuid/<?php echo $item['uuid'];?>" class="iframe">设置数据路径</a> |
|
||||
<?php endif;?>
|
||||
<a href="/admin/down/sendmail/uuid/<?php echo $item['uuid'];?>" title="向数据下载者发送通知邮件">邮件通知</a> |
|
||||
<a href="/admin/data/fund/uuid/<?php echo $item['uuid'];?>">支持项目</a> |
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||
$this->breadcrumb('数据文献关联管理');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
$this->theme->AppendPlus($this,'colorbox');
|
||||
$this->theme->AppendModel($this,"author-literature");
|
||||
?>
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
|
@ -56,7 +58,7 @@ foreach ($this->paginator as $item):
|
|||
$u=$item['uuid'];
|
||||
endif;
|
||||
if ($i==0) echo '<ul><li>元数据:<a href="/data/'.$item['uuid'].'">'.$item['title'].'</a>(<a href="/admin/data/reference/add/1/uuid/'.$item['uuid'].'">添加</a>)</li>';
|
||||
echo '<li>文献(<a href="/admin/data/reference/edit/'.$item['mdid'].'">编辑</a> <a href="/admin/data/reference/delete/'.$item['mdid'].'">删除</a>):'.$item['reference'].'</li>';
|
||||
echo '<li>文献(<a href="/admin/data/reference/edit/'.$item['mdid'].'">编辑</a> <a href="/admin/data/reference/delete/'.$item['mdid'].'">删除</a> <a href="javascript:void(0);" class="order" rel="'.$item['mdid'].'" rev="'.$item['place'].'">排序</a>):'.$item['reference'].'</li>';
|
||||
endforeach;
|
||||
echo '</ul>';
|
||||
?>
|
||||
|
|
|
@ -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);
|
||||
//用户发表文献
|
||||
|
|
|
@ -43,9 +43,9 @@ $this->headLink()->appendStylesheet('/css/author.css');
|
|||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="publisher">发布者</label>
|
||||
<label class="control-label" for="publisher">发布机构</label>
|
||||
<div class="controls">
|
||||
<input type="text" id="publisher" name="publisher" value="<?= isset($this->data['publisher']) ? $this->data['publisher']:"" ?>" />
|
||||
<input type="text" id="publisher" name="publisher" readonly="readonly" value="<?= isset($this->data['publisher']) ? $this->data['publisher']:"" ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
|
@ -63,13 +63,13 @@ $this->headLink()->appendStylesheet('/css/author.css');
|
|||
<div class="control-group">
|
||||
<label class="control-label" for="title_en">英文标题</label>
|
||||
<div class="controls">
|
||||
<input type="text" id="title_en" name="title_en" value="<?= isset($this->data['title_en']) ? $this->data['title_en']:"" ?>" />
|
||||
<input type="text" id="title_en" name="title_en" readonly="readonly" value="<?= isset($this->data['title_en']) ? $this->data['title_en']:"" ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="publisher_en">发布者英文</label>
|
||||
<label class="control-label" for="publisher_en">发布机构英文</label>
|
||||
<div class="controls">
|
||||
<input type="text" id="publisher_en" name="publisher_en" value="<?= isset($this->data['publisher_en']) ? $this->data['publisher_en']:"" ?>" />
|
||||
<input type="text" id="publisher_en" name="publisher_en" readonly="readonly" value="<?= isset($this->data['publisher_en']) ? $this->data['publisher_en']:"" ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<?php if(empty($this->data['info']) || !is_array($this->data['info'])) {?>
|
||||
|
|
|
@ -39,7 +39,7 @@ $this->breadcrumb()->setSeparator(' > ');
|
|||
<p>
|
||||
【 <a href="/author/literature/id/<?php echo $item['id'];?>">查看详细</a>
|
||||
| <a href="javascript:void(0);" class="edit" rel="<?= $item['id'];?>">编辑</a>
|
||||
| <a href="javascript:void(0);" class="order" rel="<?= $item['id'];?>" rev="<?= $item['place']?>">排序</a>
|
||||
| <a href="javascript:void(0);" class="order" rel="<?= $item['mrid'];?>" rev="<?= $item['place']?>">排序</a>
|
||||
| <a onclick="return confirm('是否确定删除该文献?');" href="javascript:action('delete&id=<?php echo $item['id'];?>','<?php echo $item['uuid'];?>');" class="more">删除</a>
|
||||
| <a href="/author/literature/ac/add/uuid/<?php echo $item['uuid'];?>" class="more iframe">添加文献</a>
|
||||
】</p>
|
||||
|
|
|
@ -13,10 +13,10 @@ $this->headTitle()->setSeparator(' - ');
|
|||
<div class="span12">
|
||||
<h4><i class="icon-folder-open"></i>专题数据集</h4>
|
||||
<a class="btn btn-info" href="/heihe/"><i class="icon-folder-open"></i>黑河计划数据管理中心</a>
|
||||
<a class="btn btn-info" href="/hiwater"><i class="icon-folder-open"></i>黑河生态水文遥感试验</a>
|
||||
<a class="btn btn-info disabled" href="/hiwater"><i class="icon-folder-open"></i>黑河生态水文遥感试验</a>
|
||||
<a class="btn btn-info" href="/water"><i class="icon-folder-open"></i>黑河综合遥感联合试验</a>
|
||||
<a class="btn btn-info" href="/glacier"><i class="icon-folder-open"></i>中国冰川资源及其变化调查</a>
|
||||
<a class="btn btn-info" href="/yrnmr"><i class="icon-folder-open"></i>黄河上游宁蒙河段数据</a>
|
||||
<a class="btn btn-info disabled" href="/glacier"><i class="icon-folder-open"></i>中国冰川资源及其变化调查</a>
|
||||
<a class="btn btn-info disabled" href="/yrnmr"><i class="icon-folder-open"></i>黄河上游宁蒙河段数据</a>
|
||||
</div>
|
||||
<div class="span12">
|
||||
<h4><i class="icon-flag"></i>特色导航</h4>
|
||||
|
|
|
@ -10,8 +10,9 @@ $this->breadcrumb('<a href="/data">'.$this->config->title->data.'</a>');
|
|||
$this->breadcrumb('最近20条离线数据申请');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<div><?= $this->breadcrumb() ?> </div>
|
||||
<div id="offlinelist">
|
||||
<table>
|
||||
<table class="table table-striped">
|
||||
<thead><tr>
|
||||
<td class="name">姓名</td>
|
||||
<td class="unit">单位</td>
|
||||
|
|
|
@ -30,9 +30,14 @@ if ($md->title_en) echo '<br />'.$this->escape($md->title_en);?>
|
|||
<?php if ($md->citation) : ?>
|
||||
<hr />
|
||||
<h4><i class="icon-quote-left muted"></i>本数据引用方式<a class="btn btn-danger pull-right" href="/archives/help/dataplatformhelp/archive-23.html" ><i class="icon-comment"></i>数据引用帮助</a></h4>
|
||||
<p><?php echo $this->escape($md->citation);?></p>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->ref) : ?>
|
||||
<p><?php if (empty($md->datadoi) || strpos($md->citation,$md->datadoi)) : ?><span class="label label-info">文章的引用</span>
|
||||
<?php endif; echo $this->escape($md->citation);?></p>
|
||||
<?php if (!empty($md->datadoi) && !strpos($md->citation,$md->datadoi)) : ?>
|
||||
<p><span class="label label-info">数据的引用</span><?php
|
||||
echo substr($md->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.']';
|
||||
?> (下载引用:<a href="/service/ris/lang/cn/uuid/<?php echo $md->uuid; ?>">RIS格式</a> | <a href="/service/ris/lang/en/uuid/<?php echo $md->uuid; ?>">RIS英文格式</a> | <a href="/service/bibtex/lang/cn/uuid/<?php echo $md->uuid; ?>">Bibtex格式</a> | <a href="/service/bibtex/lang/en/uuid/<?php echo $md->uuid; ?>">Bibtex英文格式</a>)</p>
|
||||
<?php endif; endif; if ($this->ref) : ?>
|
||||
<hr />
|
||||
<h4><i class="icon-eye-open text-success"></i>建议参考文献</h4>
|
||||
<ol>
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
$auth = Zend_Auth::getInstance();
|
||||
$this->headLink()->appendStylesheet('/css/index.css');
|
||||
?>
|
||||
<style>
|
||||
.carousel-inner .item .featured-image-link{text-align:center;}
|
||||
.featured-image{min-width:100%;text-align:center; margin:auto 0px;min-height:100%;}
|
||||
</style>
|
||||
<div class="row">
|
||||
<div class="span5" id="main-news">
|
||||
<h4><a href="archives">新闻</a></h4>
|
||||
|
@ -30,7 +34,7 @@
|
|||
foreach($this->news as $k=>$v)
|
||||
{
|
||||
echo '<div class="item'.($k==0?' active':'').'">';
|
||||
echo '<a href="'.$v['url'].'" title="'.$v['description'].'" ><img src="'.$v['image'].'" class="img-rounded featured-image" /></a>';
|
||||
echo '<a href="'.$v['url'].'" title="'.$v['description'].'" class="featured-image-link" ><img src="'.$v['image'].'" class="img-rounded featured-image" /></a>';
|
||||
echo '<div class="carousel-caption">';
|
||||
echo '<h4><a href="'.$v['url'].'">'.$v['title'].'</a><span class="pull-right">['.date("Y-m-d",strtotime($v['ts_published'])).']</span></h4>';
|
||||
//echo '<p>'.$v['description'].'</p>';
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -117,10 +117,10 @@ class Doi extends Zend_Controller_Plugin_Abstract
|
|||
}
|
||||
|
||||
function array_split($a){
|
||||
$a = str_replace("{",'',$a);
|
||||
/*$a = str_replace("{",'',$a);
|
||||
$a = str_replace("}",'',$a);
|
||||
$a = explode(",",$a);
|
||||
return $a;
|
||||
$a = explode(",",$a); */
|
||||
return $explode(',',substr($a,1,-1));
|
||||
}
|
||||
|
||||
function view($id)
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
ul{clear:left;list-style-type: none;}
|
||||
li{float:left;}
|
||||
.name {width:60px;}
|
||||
.unit {width:120px;}
|
||||
.date {width:80px;}
|
||||
|
|
Loading…
Reference in New Issue