merge heihedata branch from r3531 to r3539.

This commit is contained in:
wlx 2013-05-18 04:00:41 +00:00
commit f3b4c5cdcb
19 changed files with 46 additions and 49 deletions

View File

@ -10,6 +10,7 @@ class Admin_DataController extends Zend_Controller_Action
$this->debug = 0; //1:debug, 0:release $this->debug = 0; //1:debug, 0:release
$this->debug_email='wangliangxu@lzb.ac.cn'; $this->debug_email='wangliangxu@lzb.ac.cn';
$this->view->theme = new Theme(); $this->view->theme = new Theme();
$this->_helper->layout->setLayout('administry');
} }
function postDispatch() function postDispatch()
{ {
@ -1090,7 +1091,7 @@ class Admin_DataController extends Zend_Controller_Action
$select->from('mdref',array('id as mdid','refid','place')) $select->from('mdref',array('id as mdid','refid','place'))
->join('metadata','metadata.uuid=mdref.uuid') ->join('metadata','metadata.uuid=mdref.uuid')
->join('reference','reference.id=mdref.refid') ->join('reference','reference.id=mdref.refid')
->order('metadata.title') ->order('metadata.ts_created desc')
->order('mdref.place'); ->order('mdref.place');
$paginator = Zend_Paginator::factory($select); $paginator = Zend_Paginator::factory($select);
$paginator->setCurrentPageNumber($this->_getParam('page')); $paginator->setCurrentPageNumber($this->_getParam('page'));
@ -3592,7 +3593,6 @@ class Admin_DataController extends Zend_Controller_Action
public function doiAction() public function doiAction()
{ {
$this->_helper->layout->setLayout('administry');
$ac = $this->_getParam('ac'); $ac = $this->_getParam('ac');
$submit = $this->_getParam('submit'); $submit = $this->_getParam('submit');
$uuid = $this->_getParam('uuid'); $uuid = $this->_getParam('uuid');

View File

@ -7,6 +7,7 @@ class Admin_DownController extends Zend_Controller_Action
$this->view->config = Zend_Registry::get('config'); $this->view->config = Zend_Registry::get('config');
$this->messenger=$this->_helper->getHelper('FlashMessenger'); $this->messenger=$this->_helper->getHelper('FlashMessenger');
$this->view->messages = $this->messenger->getMessages(); $this->view->messages = $this->messenger->getMessages();
$this->_helper->layout->setLayout('administry');
} }
function postDispatch() function postDispatch()
{ {

View File

@ -11,6 +11,7 @@ class Admin_IndexController extends Zend_Controller_Action
{ {
$this->view->config = Zend_Registry::get('config'); $this->view->config = Zend_Registry::get('config');
$this->db=Zend_Registry::get('db'); $this->db=Zend_Registry::get('db');
$this->_helper->layout->setLayout('administry');
} }
function importAction() function importAction()

View File

@ -7,6 +7,7 @@ class Admin_NewsController extends Zend_Controller_Action
$this->view->config = Zend_Registry::get('config'); $this->view->config = Zend_Registry::get('config');
$this->messenger=$this->_helper->getHelper('FlashMessenger'); $this->messenger=$this->_helper->getHelper('FlashMessenger');
$this->view->messages = $this->messenger->getMessages(); $this->view->messages = $this->messenger->getMessages();
$this->_helper->layout->setLayout('administry');
} }
function postDispatch() function postDispatch()
{ {

View File

@ -8,6 +8,7 @@ class Admin_StatController extends Zend_Controller_Action
$this->messenger=$this->_helper->getHelper('FlashMessenger'); $this->messenger=$this->_helper->getHelper('FlashMessenger');
$this->view->messages = $this->messenger->getMessages(); $this->view->messages = $this->messenger->getMessages();
$this->view->theme = new Theme(); $this->view->theme = new Theme();
$this->_helper->layout->setLayout('administry');
} }
function postDispatch() function postDispatch()
{ {

View File

@ -7,7 +7,7 @@ class Admin_SysController extends Zend_Controller_Action
$this->view->config = Zend_Registry::get('config'); $this->view->config = Zend_Registry::get('config');
$this->messenger=$this->_helper->getHelper('FlashMessenger'); $this->messenger=$this->_helper->getHelper('FlashMessenger');
$this->view->messages = $this->messenger->getMessages(); $this->view->messages = $this->messenger->getMessages();
//$this->_helper->layout->setLayout('administry');//新UI $this->_helper->layout->setLayout('administry');//新UI
} }
function postDispatch() function postDispatch()

View File

@ -7,6 +7,7 @@ class Admin_TestController extends Zend_Controller_Action
$this->view->config = Zend_Registry::get('config'); $this->view->config = Zend_Registry::get('config');
$this->messenger=$this->_helper->getHelper('FlashMessenger'); $this->messenger=$this->_helper->getHelper('FlashMessenger');
$this->view->messages = $this->messenger->getMessages(); $this->view->messages = $this->messenger->getMessages();
$this->_helper->layout->setLayout('administry');
$this->wdb=Zend_Db::factory('Pdo_Pgsql', array('host'=> '210.77.68.252','username' => 'wlz','password' => 'glacier','dbname'=> 'new_geonetwork')); $this->wdb=Zend_Db::factory('Pdo_Pgsql', array('host'=> '210.77.68.252','username' => 'wlz','password' => 'glacier','dbname'=> 'new_geonetwork'));
} }
function postDispatch() function postDispatch()

View File

@ -8,6 +8,7 @@ class Admin_UserController extends Zend_Controller_Action
$this->messenger=$this->_helper->getHelper('FlashMessenger'); $this->messenger=$this->_helper->getHelper('FlashMessenger');
$this->view->messages = $this->messenger->getMessages(); $this->view->messages = $this->messenger->getMessages();
$this->view->theme = new Theme(); $this->view->theme = new Theme();
$this->_helper->layout->setLayout('administry');
} }
function postDispatch() function postDispatch()
{ {

View File

@ -7,6 +7,7 @@ class Admin_WatermdController extends Zend_Controller_Action
$this->view->config = Zend_Registry::get('config'); $this->view->config = Zend_Registry::get('config');
$this->messenger=$this->_helper->getHelper('FlashMessenger'); $this->messenger=$this->_helper->getHelper('FlashMessenger');
$this->view->messages = $this->messenger->getMessages(); $this->view->messages = $this->messenger->getMessages();
$this->_helper->layout->setLayout('administry');
$this->wdb=Zend_Db::factory($this->view->config->geonetwork); $this->wdb=Zend_Db::factory($this->view->config->geonetwork);
set_time_limit(0); set_time_limit(0);
} }

View File

@ -9,13 +9,13 @@
<li><a href="/admin/data/attachments">数据附件管理</a></li> <li><a href="/admin/data/attachments">数据附件管理</a></li>
<!-- <!--
<li><a href="/admin/data/import">上传元数据文件</a></li> <li><a href="/admin/data/import">上传元数据文件</a></li>
<li><a href="/admin/data/batchimport">导入服务器元数据目录</a></li> --> <li><a href="/admin/data/batchimport">导入服务器元数据目录</a></li>
<li><a href="/admin/data/datafileimport">导入数据目录</a></li> <li><a href="/admin/data/datafileimport">导入数据目录</a></li>
<li><a href="/admin/data/sync">同步GeoNetwork元数据</a></li> <li><a href="/admin/data/sync">同步GeoNetwork元数据</a></li>
<li><a href="/admin/data/datasetcd">特色数据集管理</a></li> <li><a href="/admin/data/datasetcd">特色数据集管理</a></li>
<li><a href="/admin/data/newsletter">数据中心通讯管理</a></li> <li><a href="/admin/data/newsletter">数据中心通讯管理</a></li>
<li><a href="/admin/data/feature">特色推荐</a></li> <li><a href="/admin/data/feature">特色推荐</a></li> -->
<li><a href="/admin/data/source">项目来源管理</a></li> <li><a href="/admin/data/source">专题管理</a></li>
<li><a href="/admin/data/project">汇交计划</a></li> <li><a href="/admin/data/project">汇交计划</a></li>
<li><a href="/admin/data/fund">支持项目</a></li> <li><a href="/admin/data/fund">支持项目</a></li>
<li><a href="/admin/data/doi">DOI</a></li> <li><a href="/admin/data/doi">DOI</a></li>

View File

@ -37,7 +37,7 @@
?> ?>
<li> <li>
<p><span class="title"><?php echo $item['title'];?></span></p> <p><span class="title"><?php echo $item['title'];?></span></p>
<p>编号:<label><?= $item['code'];?></label> | 负责人:<?= $item['name'];?> | 开始时间:<?= $item['pstart'];?> | <p>编号:<?= $item['code'];?> | 负责人:<?= $item['name'];?> | 开始时间:<?= $item['pstart'];?> |
 状态:<span id="status_alias_<?= $item['id']?>"><?= $item['status_alias'];?></span></p>  状态:<span id="status_alias_<?= $item['id']?>"><?= $item['status_alias'];?></span></p>
<p> <p>
<a href="javascript:void(0);" onclick="$('#inviteFrom_<?= $item['id'];?>').toggle();">邀请跟踪专家</a> |  <a href="javascript:void(0);" onclick="$('#inviteFrom_<?= $item['id'];?>').toggle();">邀请跟踪专家</a> | 

View File

@ -31,8 +31,8 @@
<form action="" method="get"> <form action="" method="get">
<input type="hidden" name="search" value='1' /> <input type="hidden" name="search" value='1' />
<ul> <ul>
<li><label>搜索关键字</label><input type="text" name="keyword" value="<?php echo $this->keyword; ?>" /></li> <li><input type="text" name="keyword" value="<?php echo $this->keyword; ?>" /></li>
<li><input type="submit" class="searchbtn" value="搜索" /></li> <li><input type="submit" class="btn" value="搜索" /></li>
</ul> </ul>
</form> </form>
</div><!-- search DIV --> </div><!-- search DIV -->
@ -45,7 +45,6 @@
</div> </div>
<?php if (count($this->paginator)): ?> <?php if (count($this->paginator)): ?>
<div id="datasetcd">
<?php <?php
$u=''; $u='';
$i=0; $i=0;
@ -53,16 +52,15 @@ foreach ($this->paginator as $item):
if ($u==$item['uuid']) : if ($u==$item['uuid']) :
$i+=1; $i+=1;
else : else :
if (!empty($u)) echo '</ul>'; if (!empty($u)) echo '</ol></div>';
$i=0; $i=0;
$u=$item['uuid']; $u=$item['uuid'];
endif; 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>'; if ($i==0) echo '<div class="well"><h4>元数据:<a href="/data/'.$item['uuid'].'">'.$item['title'].'</a><a href="/admin/data/reference/add/1/uuid/'.$item['uuid'].'">添加</a></h4><ol>';
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>'; 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['place'].'. '.$item['reference'].'</li>';
endforeach; endforeach;
echo '</ul>'; echo '</ul>';
?> ?>
</div>
<?php endif; ?> <?php endif; ?>
<?= $this->paginator; ?> <?= $this->paginator; ?>
</div> </div>

View File

@ -79,7 +79,7 @@ $(document).ready(function(){
<div class="control-group"> <div class="control-group">
<label class="control-label" for="source">来源</label> <label class="control-label" for="source">来源</label>
<div class="controls"> <div class="controls">
<input type="text" id="source" class="span12" name="source" value="中国西部环境与生态科学数据中心" /> <input type="text" id="source" class="span12" name="source" value="寒区旱区科学数据中心" />
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">

View File

@ -35,6 +35,8 @@ class AuthorController extends Zend_Controller_Action
function indexAction() function indexAction()
{ {
$this->view->pageID = "author-index"; $this->view->pageID = "author-index";
$archives=new Archive($this->db);
$this->view->item=$archives->getOneArchive('数据作者介绍','help');
} }

View File

@ -20,7 +20,7 @@ class DataController extends Zend_Controller_Action
function indexAction() function indexAction()
{ {
//序列 //序列
$state=$this->db->query('select s.id,name,count(*) from series s,dataseries d where d.sid=s.id group by s.id,s.name'); $state=$this->db->query('select s.id,s.name,count(*) as count from series s,dataseries d where d.sid=s.id and length(s.name)>2 group by s.id,s.name order by count desc limit 15');
$this->view->serie=$state->fetchAll(); $this->view->serie=$state->fetchAll();
//分类 //分类
$state=$this->db->query('select c.code,name,name_zh,count(*) from category c,categorycode cc where c.code=cc.code group by c.code,cc.name,cc.name_zh'); $state=$this->db->query('select c.code,name,name_zh,count(*) from category c,categorycode cc where c.code=cc.code group by c.code,cc.name,cc.name_zh');

View File

@ -85,6 +85,10 @@ class IndexController extends Zend_Controller_Action
$this->view->list_news = $rows; $this->view->list_news = $rows;
$sql="select * from datadoi where ts_published is not null order by ts_published desc limit 4";
$sth = $this->db->query($sql);
$this->view->dois = $sth->fetchAll();
} }
} }

View File

@ -15,32 +15,7 @@ $this->breadcrumb()->setSeparator(' > ');
<div class="span9"> <div class="span9">
<div class="helplist"> <div class="helplist">
<ul> <?= $this->item['body']; ?>
<li id="author_system">
<h1>数据作者系统有什么功能?</h1>
<div class="content">
<p>1、进行数据认证</p>
<p>您在数据中心发布了一条数据,若需对数据进行修改,则需要进行数据认证。</p>
</div>
</li>
<li id="help_apply">
<h1>如何成为已发布数据的作者</h1>
<div class="content">
<p>登录后,进入网站的“数据作者”→“数据认证”页面,在搜索框内输入您的数据的关键字,然后点击搜索,带列表加载后,点击数据介绍下方的“申请成为此数据的作者”即可进入申请步骤。该功能需要登录后使用(<a href="/author/apply">点击这里</a>可以进入数据认证)</p>
</div>
</li>
<li id="help_inauthor">
<h1>在线、离线数据查看与审批功能</h1>
<div class="content">
<p>1.在线数据申请记录查看:</p>
<p>点击网站主导航"数据作者",进入数据作者页面后,点击左侧导航栏的"数据申请管理"。默认进入在线数据申请记录页面,在线数据申请不需要审批,用户可直接下载。该功能需要登录后使用(<a href="/author/inauthor/ac/online">点击这里</a>可以进入在线申请记录)</p>
<p>2.离线数据申请记录查看:</p>
<p>点击网站主导航"数据作者",进入数据作者页面后,点击左侧导航栏的"数据申请管理"。然后点击右侧页面顶部的"离线申请记录"(默认选中的是"在线下载记录")。该功能需要登录后使用(<a href="/author/inauthor/ac/offline">点击这里</a>可以进入离线申请记录)</p>
<p>3.离线数据申请审批</p>
<p>进入"离线申请记录"页面后,在右侧页面可以看到离线申请列表,通过点击每条记录下面的"同意"按钮来确认同意用户的下载申请,点击"反对"来确认用户不能下载该数据。在数据送达前可以修改意见。当前数据如果已经有意见,则显示为淡蓝色背景(改类按钮表示被选中)</p>
</div>
</li>
</ul>
</div> </div>
</div> </div>

View File

@ -32,10 +32,10 @@ if ($md->title_en) echo '<br />'.$this->escape($md->title_en);?>
<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> <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 if (empty($md->datadoi) || !strpos($md->citation,$md->datadoi)) : ?><span class="label label-info">文章的引用</span> <p><?php if (empty($md->datadoi) || !strpos($md->citation,$md->datadoi)) : ?><span class="label label-info">文章的引用</span>
<?php endif; echo $this->escape($md->citation);if (strpos($md->citation,$md->datadoi)) : ?> <?php endif; echo $this->escape($md->citation);if (strpos($md->citation,$md->datadoi)) : ?>
</p>
<?php if (!empty($md->datadoi) && !strpos($md->citation,$md->datadoi)) : ?>
(下载引用:<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>) (下载引用:<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>)
<?php endif; ?> <?php endif; ?>
</p>
<?php if (!empty($md->datadoi) && !strpos($md->citation,$md->datadoi)) : ?>
<p><span class="label label-info">数据的引用</span><?php <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->authors,1,-1).'. '.$md->title.'. '.$md->publisher.', '.$md->publish_year.'. doi:'.$md->doi;
echo ' ['.str_replace('"','',substr($md->author_en,1,-1)).'. '.$md->title_en.'. '.$md->publisher_en.', '.$md->publish_year.'. doi:'.$md->doi.']'; echo ' ['.str_replace('"','',substr($md->author_en,1,-1)).'. '.$md->title_en.'. '.$md->publisher_en.', '.$md->publish_year.'. doi:'.$md->doi.']';

View File

@ -9,6 +9,9 @@
.carousel-inner .item .featured-image-link{text-align:center;} .carousel-inner .item .featured-image-link{text-align:center;}
.featured-image{min-width:100%;text-align:center; margin:auto 0px;/*min-height:100%;*/} .featured-image{min-width:100%;text-align:center; margin:auto 0px;/*min-height:100%;*/}
</style> </style>
<div class="row">
</div>
<div class="row"> <div class="row">
<div class="span5" id="main-news"> <div class="span5" id="main-news">
<h4><a href="archives">新闻</a></h4> <h4><a href="archives">新闻</a></h4>
@ -49,7 +52,7 @@
</div> </div>
<hr /> <hr />
<div class="row"> <div class="row">
<div class="span6"> <div class="span4">
<h4>在线下载热门数据</h4> <h4>在线下载热门数据</h4>
<ul class="unstyled"> <ul class="unstyled">
<?php foreach($this->mdtop as $i=>$md) : ?> <?php foreach($this->mdtop as $i=>$md) : ?>
@ -58,8 +61,6 @@
</li> </li>
<?php endforeach; ?> <?php endforeach; ?>
</ul> </ul>
</div>
<div class="span6">
<h4>离线申请热门数据</h4> <h4>离线申请热门数据</h4>
<ul class="unstyled"> <ul class="unstyled">
<?php foreach($this->offlinemdtop as $i=>$md) : ?> <?php foreach($this->offlinemdtop as $i=>$md) : ?>
@ -69,6 +70,16 @@
<?php endforeach; ?> <?php endforeach; ?>
</ul> </ul>
</div> </div>
<div class="span8">
<h4><a href="/data/doi">最新DOI数据</a></h4>
<ul class="unstyled">
<?php foreach($this->dois as $doi) :
echo '<li class="well well-small"><a href="/data/'.$doi->uuid.'">'.substr($doi->authors,1,-1).'. '.$doi->title.'. '.$doi->publisher.', '.date('Y',strtotime($doi->ts_published)).'. doi:'.$doi->doi.'</a></li>';
//echo ' ['.str_replace('"','',substr($md->author_en,1,-1)).'. '.$md->title_en.'. '.$md->publisher_en.', '.$md->publish_year.'. doi:'.$md->doi.']';
endforeach;
?>
</ul>
</div>
</div> </div>
<hr /> <hr />
<div class="row"> <div class="row">