merge trunk r3756 to r3792 for crensed branch

This commit is contained in:
wlx 2013-07-09 06:29:13 +00:00
commit e35d26ff4f
23 changed files with 469 additions and 174 deletions

View File

@ -3627,6 +3627,7 @@ class Admin_DataController extends Zend_Controller_Action
$ac = $this->_getParam('ac'); $ac = $this->_getParam('ac');
$submit = $this->_getParam('submit'); $submit = $this->_getParam('submit');
$uuid = $this->_getParam('uuid'); $uuid = $this->_getParam('uuid');
$q=$this->_getParam('q');
include_once("data/Doi.php"); include_once("data/Doi.php");
$doi = new Doi($this->db); $doi = new Doi($this->db);
@ -3636,7 +3637,7 @@ class Admin_DataController extends Zend_Controller_Action
{ {
if(empty($uuid)) if(empty($uuid))
{ {
$rows = $doi->fetch(); $rows = $doi->fetch(0,$q);
view::addPaginator($rows,$this->view,$this->_request); view::addPaginator($rows,$this->view,$this->_request);
}else{ }else{
$this->_redirect('/admin/data/doi/ac/edit/?uuid='.$uuid); $this->_redirect('/admin/data/doi/ac/edit/?uuid='.$uuid);

View File

@ -6,6 +6,7 @@
@license http:// @license http://
@link http:// @link http://
*/ */
include_once("data/Author.php");
class AuthorController extends Zend_Controller_Action class AuthorController extends Zend_Controller_Action
{ {
private $limit=10; private $limit=10;
@ -2565,7 +2566,7 @@ class AuthorController extends Zend_Controller_Action
function literatureAction() function literatureAction()
{ {
$ac = $this->_request->getParam('ac'); $ac = $this->_request->getParam('ac');
$uuid = $this->_request->getParam('uuid'); $this->view->uuid = $uuid = $this->_request->getParam('uuid');
$id = $this->_request->getParam('id'); $id = $this->_request->getParam('id');
$auth = Zend_Auth::getInstance(); $auth = Zend_Auth::getInstance();
@ -2596,9 +2597,14 @@ class AuthorController extends Zend_Controller_Action
$this->_helper->viewRenderer->setNoRender(); $this->_helper->viewRenderer->setNoRender();
$id = $this->_getParam('id'); $id = $this->_getParam('id');
$refid = $this->_getParam('refid');
$content = $this->_getParam('content'); $content = $this->_getParam('content');
$link = $this->_getParam('link');
$reftype = $this->_getParam('reftype');
$uuid = $this->_getParam('uuid');
if(empty($id))
if(empty($id) || empty($uuid))
{ {
$this->jsonexit(array('error'=>'参数错误')); $this->jsonexit(array('error'=>'参数错误'));
return true; return true;
@ -2610,7 +2616,13 @@ class AuthorController extends Zend_Controller_Action
return true; return true;
} }
$s = $author->Literature->edit($id,$content); if(empty($reftype))
{
$this->jsonexit(array('error'=>'请选择文献类型'));
return true;
}
$s = $author->Literature->edit($id,$refid,$uuid,$content,$link,$reftype);
if($s !== true) if($s !== true)
{ {
$this->jsonexit(array('error'=>'出现错误')); $this->jsonexit(array('error'=>'出现错误'));
@ -2744,6 +2756,17 @@ class AuthorController extends Zend_Controller_Action
$this->_helper->viewRenderer('literature-byliter'); $this->_helper->viewRenderer('literature-byliter');
} }
//单条文献的信息
else if ($ac == "get")
{
$this->_helper->layout->disableLayout();
$this->_helper->viewRenderer->setNoRender();
$id = $this->_getParam('id');
$data = $author->Literature->getOne($id);
$this->jsonexit($data);
return true;
}
//按数据浏览 //按数据浏览
else if($ac=="bydata") else if($ac=="bydata")
{ {
@ -2775,6 +2798,7 @@ class AuthorController extends Zend_Controller_Action
$ref=$this->_request->getParam('ref'); $ref=$this->_request->getParam('ref');
$reftype=$this->_request->getParam('reftype'); $reftype=$this->_request->getParam('reftype');
$url = $this->_request->getParam('url'); $url = $this->_request->getParam('url');
if(empty($uuid) || empty($ref) || !is_numeric($reftype)) if(empty($uuid) || empty($ref) || !is_numeric($reftype))
{ {
$data = array("error"=>"参数错误"); $data = array("error"=>"参数错误");
@ -2782,11 +2806,8 @@ class AuthorController extends Zend_Controller_Action
return true; return true;
} }
$sql="select * from mdauthor where userid=? and uuid=? and status=1"; $author = new Author($this->db);
$sth = $this->db->prepare($sql); if(!$author->checkAuthor($uuid))
$sth->execute(array($u_id,$uuid));
$row = $sth->fetch();
if (empty($row))
{ {
$data = array("error"=>$this->alertbox('warning','您不是该数据作者,无法添加对应文献信息。')); $data = array("error"=>$this->alertbox('warning','您不是该数据作者,无法添加对应文献信息。'));
$this->jsonexit($data); $this->jsonexit($data);
@ -2797,7 +2818,8 @@ class AuthorController extends Zend_Controller_Action
$sth = $this->db->prepare($sql); $sth = $this->db->prepare($sql);
$sth->execute(array($ref)); $sth->execute(array($ref));
$row = $sth->fetch(); $row = $sth->fetch();
if (!$row)
if(empty($row['id']))
{ {
$sql="insert into reference (reference,link) values(?,?)"; $sql="insert into reference (reference,link) values(?,?)";
$sth = $this->db->prepare($sql); $sth = $this->db->prepare($sql);
@ -2821,8 +2843,9 @@ class AuthorController extends Zend_Controller_Action
$this->jsonexit($data); $this->jsonexit($data);
return true; return true;
} }
}catch(Exception $e) { }catch(Exception $e) {
$msg = "提交失败,请确认权限后重试"; $msg = "提交失败,您提交的数据可能已经存在";
if($this->debug>0) if($this->debug>0)
{$msg .= $e->getMessage();} {$msg .= $e->getMessage();}
$data = array("error"=>$this->alertbox('error',$msg)); $data = array("error"=>$this->alertbox('error',$msg));

View File

@ -1540,7 +1540,17 @@ class DataController extends Zend_Controller_Action
//生成PDF离线申请文件 //生成PDF离线申请文件
//用户信息可以从SESSION中读取离线申请信息 //用户信息可以从SESSION中读取离线申请信息
//$sql="select * from users where id=?"; //$sql="select * from users where id=?";
$sql="select m.title||'('||m.filesize::text||'MB)' as title,m.citation,m.suppinfo from dataorder d left join metadata m on d.uuid=m.uuid where d.status=2 and d.userid=? order by d.ts_created desc"; $sql="select m.title||'('||m.filesize::text||'MB)' as title,m.ts_published,date_part('year',doi.ts_published) as publish_year,m.citation,m.suppinfo,
array_to_string(ARRAY(
select r.reference from mdref mr left join reference r on mr.refid=r.id
where mr.reftype=3 and mr.uuid=d.uuid order by mr.place),'\n'::text) as reference,
array_to_string(array(
select fund.fund_type||':'||fund.title||'(编号:'||fund.fund_id||')'
from fund left join mdfund on fund.id=mdfund.fid where mdfund.uuid=d.uuid),'\n'::text) as fund,
doi.doi as datadoi,doi.authors,doi.publisher,doi.title as doititle,doi.author_en,doi.publisher_en,doi.title_en
from dataorder d left join metadata m on d.uuid=m.uuid left join datadoi doi on doi.uuid=d.uuid
where d.status=2 and d.userid=? order by d.ts_created desc
";
$rows=$this->db->fetchAll($sql,array($userid)); $rows=$this->db->fetchAll($sql,array($userid));
if ($rows) { if ($rows) {
$this->view->data2=$rows; $this->view->data2=$rows;

View File

@ -190,16 +190,23 @@ class HiwaterController extends DataController
{ {
$this->getmd(array('','自动气象站')); $this->getmd(array('','自动气象站'));
$this->_helper->viewRenderer('base'); $this->_helper->viewRenderer('base');
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('HiWATER-通量观测矩阵','about');
} }
function ecAction() function ecAction()
{ {
$this->getmd(array('','涡动相关仪')); $this->getmd(array('','涡动相关仪'));
$this->_helper->viewRenderer('base'); $this->_helper->viewRenderer('base');
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('HiWATER-通量观测矩阵','about');
} }
function lasAction() function lasAction()
{ {
$this->getmd(array('','大孔径闪烁仪')); $this->getmd(array('','大孔径闪烁仪'));
$this->_helper->viewRenderer('base'); $this->_helper->viewRenderer('base');
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('HiWATER-通量观测矩阵','about');
} }
function precAction() function precAction()
{ {
@ -289,6 +296,8 @@ class HiwaterController extends DataController
{ {
$this->getmd(array('自动气象站','涡动相关仪','大孔径闪烁仪','稳定同位素观测系统','热扩散液流计TDP','宇宙射线土壤水分')); $this->getmd(array('自动气象站','涡动相关仪','大孔径闪烁仪','稳定同位素观测系统','热扩散液流计TDP','宇宙射线土壤水分'));
$this->_helper->viewRenderer('base'); $this->_helper->viewRenderer('base');
$archive = new Archive($this->db);
$this->view->info = $archive->getOneArchive('HiWATER-通量观测矩阵','about');
} }
function isotopeAction() function isotopeAction()
@ -494,7 +503,7 @@ class HiwaterController extends DataController
$row=$state->fetchAll(); $row=$state->fetchAll();
$sum=$row[0]['count']; $sum=$row[0]['count'];
//@todo: add order with title //@todo: add order with title
$sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and id in (select id from keyword where keytype='".$type."' and keyword in ".$keyword.") order by timebegin,title limit ? offset ?"; $sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and id in (select id from keyword where keytype='".$type."' and keyword in ".$keyword.") order by title limit ? offset ?";
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset)); $this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
$this->view->page=new Pagination($sum,$page,$this->limit); $this->view->page=new Pagination($sum,$page,$this->limit);
$this->view->offset=$offset+1; $this->view->offset=$offset+1;
@ -525,7 +534,7 @@ class HiwaterController extends DataController
$row=$state->fetchAll(); $row=$state->fetchAll();
$sum=$row[0]['count']; $sum=$row[0]['count'];
//@todo: add order with title //@todo: add order with title
$sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and id in (select id from keyword where keyword='".$limited."') and id in (select id from keyword where keyword in ".$keyword.") order by timebegin,title limit ? offset ?"; $sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and id in (select id from keyword where keyword='".$limited."') and id in (select id from keyword where keyword in ".$keyword.") order by title limit ? offset ?";
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset)); $this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
$this->view->page=new Pagination($sum,$page,$this->limit); $this->view->page=new Pagination($sum,$page,$this->limit);
$this->view->offset=$offset+1; $this->view->offset=$offset+1;

View File

@ -123,6 +123,12 @@ class ReviewController extends Zend_Controller_Action
* mdstatus status 字段值为 2,3,4 的元数据为正在进行评审的元数据 * mdstatus status 字段值为 2,3,4 的元数据为正在进行评审的元数据
*/ */
function inreviewAction(){ function inreviewAction(){
include_once("helper/view.php");
$ac = $this->_getParam('ac');
if(empty($ac))
{
$this->view->pageID = "review-inreview"; $this->view->pageID = "review-inreview";
$page=@(int)$this->_request->getParam('page'); $page=@(int)$this->_request->getParam('page');
if (empty($page)) $page=1; if (empty($page)) $page=1;
@ -132,6 +138,57 @@ class ReviewController extends Zend_Controller_Action
$sql="select m.uuid,m.title,m.id,m.description,s.status,s.ts_accepted,g.id as gid,t.filename from mdstatus s right join normalmetadata m on s.uuid=m.uuid left join geonetworkmetadata g on g.uuid=m.uuid left join thumbnail t on t.id=m.id where s.status in (2,3,4) order by s.ts_created desc,m.title limit ? offset ?"; $sql="select m.uuid,m.title,m.id,m.description,s.status,s.ts_accepted,g.id as gid,t.filename from mdstatus s right join normalmetadata m on s.uuid=m.uuid left join geonetworkmetadata g on g.uuid=m.uuid left join thumbnail t on t.id=m.id where s.status in (2,3,4) order by s.ts_created desc,m.title limit ? offset ?";
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset)); $this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
$this->view->page = new Pagination($sum,$page,$this->limit); $this->view->page = new Pagination($sum,$page,$this->limit);
}
if($ac == "require")
{
$this->_helper->viewRenderer('inreview-require');
$this->view->pageID = "review-inreview-require";
$uid = view::User('id');
if(empty($uid))
{
view::Post($this,"请先登录","/account/login/?href=".urlencode("/review/inreview/ac/require"));
}
$sql = "select m.uuid,m.title,m.id,m.description,s.status,s.ts_accepted,g.id as gid,t.filename,r.ts_created,r.id as rid,e.id as eid
from mdstatus s
right join normalmetadata m on s.uuid=m.uuid
left join geonetworkmetadata g on g.uuid=m.uuid
left join thumbnail t on t.id=m.id
left join mdreview r ON m.uuid=r.uuid
left join mdexpertreview e ON e.uuid=m.uuid
WHERE s.status in (2,3,4) AND r.id IS NULL
GROUP BY m.uuid,m.title,m.id,m.description,s.status,s.ts_accepted,g.id,t.filename,s.ts_created,r.ts_created,r.id,e.id
order by e.id DESC,s.ts_created desc,m.title";
$rs = $this->db->query($sql);
view::addPaginator($rs->fetchAll(),$this,NULL,$this->limit);
}
if($ac == "reviewed")
{
$this->_helper->viewRenderer('inreview-reviewed');
$this->view->pageID = "review-inreview-reviewed";
$uid = view::User('id');
if(empty($uid))
{
view::Post($this,"请先登录","/account/login/?href=".urlencode("/review/inreview/ac/reviewed"));
}
$sql = "select m.uuid,m.title,m.id,m.description,s.status,s.ts_accepted,g.id as gid,t.filename,r.ts_created
from mdstatus s
right join normalmetadata m on s.uuid=m.uuid
left join geonetworkmetadata g on g.uuid=m.uuid
left join thumbnail t on t.id=m.id
left join mdreview r ON m.uuid=r.uuid
WHERE s.status in (2,3,4) AND r.userid=$uid
GROUP BY m.uuid,m.title,m.id,m.description,s.status,s.ts_accepted,g.id,t.filename,s.ts_created,r.ts_created
order by s.ts_created desc,m.title";
$rs = $this->db->query($sql);
view::addPaginator($rs->fetchAll(),$this,NULL,$this->limit);
}
}//在审阶段的元数据 }//在审阶段的元数据

View File

@ -2,6 +2,7 @@
$this->headTitle($this->config->title->site); $this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->author); $this->headTitle($this->config->title->author);
$this->headTitle()->setSeparator(' - '); $this->headTitle()->setSeparator(' - ');
$this->theme->AppendPlus($this,'colorbox');
$this->headLink()->appendStylesheet('/css/author.css'); $this->headLink()->appendStylesheet('/css/author.css');
$this->breadcrumb('<a href="/">首页</a>'); $this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/author">数据作者</a>'); $this->breadcrumb('<a href="/author">数据作者</a>');
@ -36,7 +37,7 @@ $this->breadcrumb()->setSeparator(' > ');
<a href="/author/comment/ac/view/uuid/<?php echo $item['uuid']; ?>">反馈</a> | <a href="/author/comment/ac/view/uuid/<?php echo $item['uuid']; ?>">反馈</a> |
<a href="/author/document/uuid/<?php echo $item['uuid']; ?>">文档</a> | <a href="/author/document/uuid/<?php echo $item['uuid']; ?>">文档</a> |
<a href="/author/literature/uuid/<?php echo $item['uuid']; ?>">文献</a> | <a href="/author/literature/uuid/<?php echo $item['uuid']; ?>">文献</a> |
<a href="/author/literature/ac/add/uuid/<?php echo $item['uuid']; ?>">添加文献</a> | <a href="/author/literature/ac/add/uuid/<?php echo $item['uuid']; ?>" class="more iframe">添加文献</a> |
<a href="/service/geonetwork?url=metadata.edit?id=<?php echo $item['gid']; ?>" target="_blank">修改元数据</a> | <a href="/service/geonetwork?url=metadata.edit?id=<?php echo $item['gid']; ?>" target="_blank">修改元数据</a> |
<a href="/author/version/uuid/<?php echo $item['uuid']; ?>">版本</a> | <a href="/author/version/uuid/<?php echo $item['uuid']; ?>">版本</a> |
<a href="/author/qa/uuid/<?php echo $item['uuid']; ?>">QA</a> | <a href="/author/qa/uuid/<?php echo $item['uuid']; ?>">QA</a> |
@ -73,3 +74,6 @@ $this->breadcrumb()->setSeparator(' > ');
</div> </div>
</div> </div>
<script>
$(".iframe").colorbox({iframe:true, width:"60%", height:"80%"});
</script>

View File

@ -38,7 +38,7 @@ $this->breadcrumb()->setSeparator(' > ');
<p><?php echo $item['reference'];?></p> <p><?php echo $item['reference'];?></p>
<p> <p>
<a href="/author/literature/id/<?php echo $item['id'];?>">查看详细</a> <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="edit" rel="<?= $item['mrid'];?>" rev="<?= $item['uuid']?>">编辑</a>
| <a href="javascript:void(0);" class="order" rel="<?= $item['mrid'];?>" 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 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> | <a href="/author/literature/ac/add/uuid/<?php echo $item['uuid'];?>" class="more iframe">添加文献</a>

View File

@ -79,8 +79,8 @@ if ($md->title_en) echo '<br />'.$this->escape($md->title_en);?>
?> ?>
<?php else : ?> <?php else : ?>
<p>为尊重知识产权、保障数据作者的权益、扩展数据中心的服务、评估数据的应用潜力,请数据使用者在使用数据所产生的研究成果中(包括公开发表的论文、论著、数据产品和未公开发表的研究报告、数据产品等成果),明确注明数据来源和数据作者。对于转载(二次或多次发布)的数据,作者还须注明原始数据来源。</p> <p>为尊重知识产权、保障数据作者的权益、扩展数据中心的服务、评估数据的应用潜力,请数据使用者在使用数据所产生的研究成果中(包括公开发表的论文、论著、数据产品和未公开发表的研究报告、数据产品等成果),明确注明数据来源和数据作者。对于转载(二次或多次发布)的数据,作者还须注明原始数据来源。</p>
<p>中文发表的成果参考以下规范注明: 数据来源于国家自然科学基金委员会"中国西部环境与生态科学数据中心"(http://westdc.westgis.ac.cn)</p> <p>中文发表的成果参考以下规范注明: 数据来源于黑河计划数据管理中心、寒区旱区科学数据中心(http://westdc.westgis.ac.cn)</p>
<p>英文发表的成果依据以下规范注明: The data set is provided by Environmental and Ecological Science Data Center for West China,National Natural Science Foundation of China (http://westdc.westgis.ac.cn)</p> <p>英文发表的成果依据以下规范注明: The data set is provided by Cold and Arid Regions Sciences Data Center at Lanzhou (http://westdc.westgis.ac.cn)</p>
</p> </p>
<?php endif; ?> <?php endif; ?>
<?php if($this->data_archives){ ?> <?php if($this->data_archives){ ?>

View File

@ -102,8 +102,8 @@ if ($md->title_en) echo '<br />'.$this->escape($md->title_en);?>
?> ?>
<?php else : ?> <?php else : ?>
<p>为尊重知识产权、保障数据作者的权益、扩展数据中心的服务、评估数据的应用潜力,请数据使用者在使用数据所产生的研究成果中(包括公开发表的论文、论著、数据产品和未公开发表的研究报告、数据产品等成果),明确注明数据来源和数据作者。对于转载(二次或多次发布)的数据,作者还须注明原始数据来源。</p> <p>为尊重知识产权、保障数据作者的权益、扩展数据中心的服务、评估数据的应用潜力,请数据使用者在使用数据所产生的研究成果中(包括公开发表的论文、论著、数据产品和未公开发表的研究报告、数据产品等成果),明确注明数据来源和数据作者。对于转载(二次或多次发布)的数据,作者还须注明原始数据来源。</p>
<p>中文发表的成果参考以下规范注明: 数据来源于国家自然科学基金委员会"中国西部环境与生态科学数据中心"(http://westdc.westgis.ac.cn)</p> <p>中文发表的成果参考以下规范注明: 数据来源于黑河计划数据管理中心、寒区旱区科学数据中心(http://westdc.westgis.ac.cn)</p>
<p>英文发表的成果依据以下规范注明: The data set is provided by Environmental and Ecological Science Data Center for West China,National Natural Science Foundation of China (http://westdc.westgis.ac.cn)</p> <p>英文发表的成果依据以下规范注明: The data set is provided by Cold and Arid Regions Sciences Data Center at Lanzhou (http://westdc.westgis.ac.cn)</p>
</p> </p>
<?php endif; ?> <?php endif; ?>
<?php if($this->data_archives){ ?> <?php if($this->data_archives){ ?>

View File

@ -105,7 +105,7 @@
<div class="accordion-heading" id="Nav-hiwater-mso"> <div class="accordion-heading" id="Nav-hiwater-mso">
<a href="/hiwater/mso" title="查看详细" class="pull-right detail-link"><i class="icon-arrow-right"></i></a> <a href="/hiwater/mso" title="查看详细" class="pull-right detail-link"><i class="icon-arrow-right"></i></a>
<a class="accordion-toggle" data-toggle="collapse" data-parent="#side_accordion" href="#collapse6"> <a class="accordion-toggle" data-toggle="collapse" data-parent="#side_accordion" href="#collapse6">
地表蒸散发的多尺度观测试验 非均匀下垫面地表蒸散发的多尺度观测试验
</a> </a>
</div> </div>
<div id="collapse6" class="accordion-body collapse"> <div id="collapse6" class="accordion-body collapse">

View File

@ -100,8 +100,8 @@ if ($md->title_en) echo '<br />'.$this->escape($md->title_en);?>
?> ?>
<?php else : ?> <?php else : ?>
<p>为尊重知识产权、保障数据作者的权益、扩展数据中心的服务、评估数据的应用潜力,请数据使用者在使用数据所产生的研究成果中(包括公开发表的论文、论著、数据产品和未公开发表的研究报告、数据产品等成果),明确注明数据来源和数据作者。对于转载(二次或多次发布)的数据,作者还须注明原始数据来源。</p> <p>为尊重知识产权、保障数据作者的权益、扩展数据中心的服务、评估数据的应用潜力,请数据使用者在使用数据所产生的研究成果中(包括公开发表的论文、论著、数据产品和未公开发表的研究报告、数据产品等成果),明确注明数据来源和数据作者。对于转载(二次或多次发布)的数据,作者还须注明原始数据来源。</p>
<p>中文发表的成果参考以下规范注明: 数据来源于国家自然科学基金委员会"中国西部环境与生态科学数据中心"(http://westdc.westgis.ac.cn)</p> <p>中文发表的成果参考以下规范注明: 数据来源于黑河计划数据管理中心、寒区旱区科学数据中心(http://westdc.westgis.ac.cn)</p>
<p>英文发表的成果依据以下规范注明: The data set is provided by Environmental and Ecological Science Data Center for West China,National Natural Science Foundation of China (http://westdc.westgis.ac.cn)</p> <p>英文发表的成果依据以下规范注明: The data set is provided by Cold and Arid Regions Sciences Data Center at Lanzhou (http://westdc.westgis.ac.cn)</p>
</p> </p>
<?php endif; ?> <?php endif; ?>
<?php if($this->data_archives){ ?> <?php if($this->data_archives){ ?>

View File

@ -90,9 +90,9 @@
<div class="span4"> <div class="span4">
<h4>专题数据集</h4> <h4>专题数据集</h4>
<ul class="unstyled"> <ul class="unstyled">
<li><a href="/heihe"><i class="icon-folder-open"></i>黑河计划数据管理中心</a></li> <li><a href="/hiwater" class="btn btn-danger"><i class="icon-folder-open"></i>黑河生态水文遥感试验(HiWATER)</a></li>
<li><a href="/hiwater"><i class="icon-folder-open"></i>黑河生态水文遥感试验</a></li> <li><a href="/heihe" class="btn"><i class="icon-folder-open"></i>黑河计划数据管理中心</a></li>
<li><a href="/water"><i class="icon-folder-open"></i>黑河综合遥感联合试验</a></li> <li><a href="/water" class="btn"><i class="icon-folder-open"></i>黑河综合遥感联合试验(WATER)</a></li>
<li><a href="/glacier"><i class="icon-folder-open"></i>中国冰川资源及其变化调查</a></li> <li><a href="/glacier"><i class="icon-folder-open"></i>中国冰川资源及其变化调查</a></li>
<li><a href="/yrnmr"><i class="icon-folder-open"></i>黄河上游宁蒙河段数据</a></li> <li><a href="/yrnmr"><i class="icon-folder-open"></i>黄河上游宁蒙河段数据</a></li>
</ul> </ul>

View File

@ -0,0 +1,53 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->review);
$this->headTitle('在审元数据');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/mdreview.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/review">'.$this->config->title->review.'</a>');
$this->breadcrumb('在审元数据');
$this->breadcrumb()->setSeparator(' > ');
?>
<style>
table thead tr th {background:#EBF2F6;}
</style>
<div class="row">
<div class="span3">
<?= $this->partial('review/navi.phtml'); ?>
</div>
<div class="span9">
<?php if (count($this->paginator)): ?>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>名称</th>
<th>接收时间</th>
<th width="70">操作</th>
</tr>
</thead>
<tbody>
<?php $autoindex=0;
foreach ($this->paginator as $item):
$autoindex++;?>
<tr>
<td><a href="/review/review/uuid/<?= $item['uuid'] ?>"><?= $item['title'] ?></a><?= empty($item['eid']) ? "":"[受邀评审]"?></td>
<td><?= date("Y-m-d",strtotime($item['ts_accepted'])) ?></td>
<td>
<a href="/review/review/uuid/<?= $item['uuid']?>">评审</a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php else: ?>
<?php if(!empty($this->md)) { ?>
暂无数据,点击标题右侧添加按钮为此数据添加项目
<?php }else{ ?>
暂无数据
<?php } ?>
<?php endif; ?>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
</div>
</div>

View File

@ -0,0 +1,55 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->review);
$this->headTitle('在审元数据');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/mdreview.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/review">'.$this->config->title->review.'</a>');
$this->breadcrumb('在审元数据');
$this->breadcrumb()->setSeparator(' > ');
?>
<style>
table thead tr th {background:#EBF2F6;}
</style>
<div class="row">
<div class="span3">
<?= $this->partial('review/navi.phtml'); ?>
</div>
<div class="span9">
<?php if (count($this->paginator)): ?>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>名称</th>
<th>接收时间</th>
<th>评审时间</th>
<th width="70">操作</th>
</tr>
</thead>
<tbody>
<?php $autoindex=0;
foreach ($this->paginator as $item):
$autoindex++;?>
<tr>
<td><a href="/review/review/uuid/<?= $item['uuid'] ?>"><?= $item['title'] ?></a></td>
<td><?= date("Y-m-d",strtotime($item['ts_accepted'])) ?></td>
<td><?= date("Y-m-d",strtotime($item['ts_created'])) ?></td>
<td>
<a href="/review/review/uuid/<?= $item['uuid']?>">查看</a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php else: ?>
<?php if(!empty($this->md)) { ?>
暂无数据,点击标题右侧添加按钮为此数据添加项目
<?php }else{ ?>
暂无数据
<?php } ?>
<?php endif; ?>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
</div>
</div>

View File

@ -3,7 +3,9 @@
<li id="Nav-review-myreview"><a href="/review/myreview"><i class="icon-chevron-right"></i>我参审的元数据</a></li> <li id="Nav-review-myreview"><a href="/review/myreview"><i class="icon-chevron-right"></i>我参审的元数据</a></li>
<li id="Nav-review-draft"><a href="/review/draft"><i class="icon-chevron-right"></i>投稿元数据</a></li> <li id="Nav-review-draft"><a href="/review/draft"><i class="icon-chevron-right"></i>投稿元数据</a></li>
<li id="Nav-review-accept"><a href="/review/accept"><i class="icon-chevron-right"></i>已接收元数据</a></li> <li id="Nav-review-accept"><a href="/review/accept"><i class="icon-chevron-right"></i>已接收元数据</a></li>
<li id="Nav-review-inreview"><a href="/review/inreview"><i class="icon-chevron-right"></i>评审中元数据</a></li> <li id="Nav-review-inreview-require"><a href="/review/inreview/ac/require"><i class="icon-chevron-right"></i>等待我评审的元数据</a></li>
<li id="Nav-review-inreview-reviewed"><a href="/review/inreview/ac/reviewed"><i class="icon-chevron-right"></i>我评审过的元数据</a></li>
<li id="Nav-review-inreview"><a href="/review/inreview"><i class="icon-chevron-right"></i>所有评审中元数据</a></li>
<li id="Nav-review-reviewed"><a href="/review/reviewed"><i class="icon-chevron-right"></i>已通过元数据</a></li> <li id="Nav-review-reviewed"><a href="/review/reviewed"><i class="icon-chevron-right"></i>已通过元数据</a></li>
<li id="Nav-review-help"><a href="/review/help"><i class="icon-chevron-right"></i>元数据评审说明</a></li> <li id="Nav-review-help"><a href="/review/help"><i class="icon-chevron-right"></i>元数据评审说明</a></li>
</ul> </ul>

View File

@ -79,8 +79,8 @@ if ($md->title_en) echo '<br />'.$this->escape($md->title_en);?>
?> ?>
<?php else : ?> <?php else : ?>
<p>为尊重知识产权、保障数据作者的权益、扩展数据中心的服务、评估数据的应用潜力,请数据使用者在使用数据所产生的研究成果中(包括公开发表的论文、论著、数据产品和未公开发表的研究报告、数据产品等成果),明确注明数据来源和数据作者。对于转载(二次或多次发布)的数据,作者还须注明原始数据来源。</p> <p>为尊重知识产权、保障数据作者的权益、扩展数据中心的服务、评估数据的应用潜力,请数据使用者在使用数据所产生的研究成果中(包括公开发表的论文、论著、数据产品和未公开发表的研究报告、数据产品等成果),明确注明数据来源和数据作者。对于转载(二次或多次发布)的数据,作者还须注明原始数据来源。</p>
<p>中文发表的成果参考以下规范注明: 数据来源于国家自然科学基金委员会"中国西部环境与生态科学数据中心"(http://westdc.westgis.ac.cn)</p> <p>中文发表的成果参考以下规范注明: 数据来源于黑河计划数据管理中心、寒区旱区科学数据中心(http://westdc.westgis.ac.cn)</p>
<p>英文发表的成果依据以下规范注明: The data set is provided by Environmental and Ecological Science Data Center for West China,National Natural Science Foundation of China (http://westdc.westgis.ac.cn)</p> <p>英文发表的成果依据以下规范注明: The data set is provided by Cold and Arid Regions Sciences Data Center at Lanzhou (http://westdc.westgis.ac.cn)</p>
</p> </p>
<?php endif; ?> <?php endif; ?>
<?php if($this->data_archives){ ?> <?php if($this->data_archives){ ?>

View File

@ -49,15 +49,36 @@ class ApplicantPDF extends FPDI
$this->SetFont('ugb','',12); $this->SetFont('ugb','',12);
$this->Write(5,($i+1).'. '.$md['title']); $this->Write(5,($i+1).'. '.$md['title']);
$this->ln(); $this->ln();
if ($md['citation']) if ($md['reference'])
{ {
$this->Write(5,'【建议引用方式】'.$md['citation']); $this->Write(5,'【引用方式】'.$md['reference']);
$this->ln();
if (!empty($md['publish_year']))
{
$this->Write(5,'【数据的引用】'.substr($md['authors'],1,-1).'. '.$md['doititle'].'. '.$md['publisher'].', '
.(empty($md['ts_published'])?$md['publish_year']:date('Y',strtotime($md['ts_published']))).
'. doi:'.$md['datadoi'].' ['.str_replace('"','',substr($md['author_en'],1,-1)).'. '.$md['title_en']
.'. '.$md['publisher_en'].', '.(empty($md['ts_published'])?$md['publish_year']:date('Y',strtotime($md['ts_published']))).'. doi:'.$md['datadoi'].']');
$this->ln(); $this->ln();
} }
if ($md['suppinfo']) } elseif ($md['citation'])
{
$this->Write(5,'【引用方式】'.$md['citation']);
$this->ln();
if (!empty($md['publish_year']) && !strpos($md['citation'],$md['datadoi']))
{
$this->Write(5,'【数据的引用】'.substr($md['authors'],1,-1).'. '.$md['doititle'].'. '.$md['publisher'].', '
.(empty($md['ts_published'])?$md['publish_year']:date('Y',strtotime($md['ts_published']))).
'. doi:'.$md['datadoi'].' ['.str_replace('"','',substr($md['author_en'],1,-1)).'. '.$md['title_en']
.'. '.$md['publisher_en'].', '.(empty($md['ts_published'])?$md['publish_year']:date('Y',strtotime($md['ts_published']))).'. doi:'.$md['datadoi'].']');
$this->ln();
}
}
if ($md['suppinfo'] || $md['fund'])
{ {
$this->SetFont('ugb','I',10); $this->SetFont('ugb','I',10);
$this->Write(5,'【项目支持信息】'.$md['suppinfo']); $p=(!empty($md['fund']))?$md['fund']:$md['suppinfo'];
$this->Write(5,'【项目信息】'.$p);
$this->ln(); $this->ln();
} }
$this->ln(); $this->ln();
@ -70,21 +91,21 @@ class ApplicantPDF extends FPDI
$this->addPage(); $this->addPage();
$this->useTemplate($tplidx); $this->useTemplate($tplidx);
$this->SetFont('ugb','B',14); $this->SetFont('ugb','B',14);
$this->setXY(46,43); $this->setXY(46,51);
$this->Write(10,$this->data['realname']); $this->Write(10,$this->data['realname']);
$this->SetFont('ugb','',12); $this->SetFont('ugb','',12);
$this->setXY(122,194); $this->setXY(122,194);
$this->Write(10,$this->data['realname']); $this->Write(10,$this->data['realname']);
$this->setXY(122,201); $this->setXY(122,201);
$this->Write($this->fontsize,$this->data['address']); $this->Write($this->fontsize,$this->data['address']);
$this->setXY(122,209); $this->setXY(122,208);
$this->Write($this->fontsize,$this->data['phone']); $this->Write($this->fontsize,$this->data['phone']);
$this->setXY(122,216); $this->setXY(122,215);
$this->Write($this->fontsize,$this->data['email']); $this->Write($this->fontsize,$this->data['email']);
$t=date("Y-m-d"); $t=date("Y-m-d");
$this->setXY(32,246); $this->setXY(32,242);
$this->Write($this->fontsize,$t); $this->Write($this->fontsize,$t);
$this->setXY(122,246); $this->setXY(122,242);
$this->Write($this->fontsize,$t); $this->Write($this->fontsize,$t);
} }
} }

View File

@ -48,7 +48,7 @@ class RegisterForm extends Zend_Form
$address=new Zend_Form_Element_Text('address'); $address=new Zend_Form_Element_Text('address');
$address->setLabel('联系地址')->setRequired(false); $address->setLabel('联系地址')->setRequired(false);
$project=new Zend_Form_Element_Textarea('project'); $project=new Zend_Form_Element_Textarea('project');
$project->setLabel('隶属西部项目')->setRequired(false)->setAttrib('rows',4); $project->setLabel('科研项目')->setRequired(false)->setAttrib('rows',4);
$id = new Zend_Form_Element_Hidden('id'); $id = new Zend_Form_Element_Hidden('id');

View File

@ -74,6 +74,14 @@ class Literature extends Author
$this->db = $db; $this->db = $db;
} }
function getOne($id,$uuid = ""){
$sql = "select m.uuid,r.reference,r.link,m.reftype,r.id as refid from reference r left join mdref m on r.id=m.refid where m.id=?";
$sth = $this->db->prepare($sql);
$sth->execute(array($id));
$row = $sth->fetch();
return $row;
}
function byuuid($uuid){ function byuuid($uuid){
include_once("helper/view.php"); include_once("helper/view.php");
$uid = view::User('id'); $uid = view::User('id');
@ -90,16 +98,33 @@ class Literature extends Author
return $rows; return $rows;
} }
function edit($id,$content){ function edit($mdrefid,$refid,$uuid,$content,$link,$reftype){
include_once("helper/dbh.php"); include_once("helper/dbh.php");
$dbh = new dbh($this->db); $dbh = new dbh($this->db);
$data = array( $data = array(
'reference' => $content 'reference' => $content,
'link'=>$link
); );
$s = $dbh->update("reference",$data," id=$id ",false); $s = $dbh->update("reference",$data," id=$refid ",false);
return $s;
if($s)
{
$data = array(
'reftype'=>$reftype
);
$d = $dbh->update("mdref",$data," id=$mdrefid ",false);
if($d)
{
return true;
}else{
return false;
}
}else{
return false;
}
} }
function order($id,$order){ function order($id,$order){

View File

@ -12,16 +12,25 @@ class Doi extends Zend_Controller_Plugin_Abstract
$this->db = $db; $this->db = $db;
} }
function fetch($uid=0) function fetch($uid=0,$keyword='')
{ {
$wheresql=' 1=1 ';
if(!empty($keyword))
{
if(preg_match("/\'/",$keyword))
{
$keyword = preg_replace("/\'/","''",$keyword);
}
$wheresql.=" and d.title like '%$keyword%'";
}
if(empty($uid)) if(empty($uid))
{ {
$sql = "SELECT * FROM ".$this->tbl_doi." ORDER BY ts_published desc,ts_submitted desc,ts_created DESC"; $sql = "SELECT * FROM ".$this->tbl_doi." d where ".$wheresql."ORDER BY d.ts_published desc,d.ts_submitted desc,d.ts_created DESC";
}else{ }else{
$sql = "SELECT doi.* FROM ".$this->tbl_doi." doi $sql = "SELECT d.* FROM ".$this->tbl_doi." d
LEFT JOIN mdauthor a ON doi.uuid=a.uuid LEFT JOIN mdauthor a ON d.uuid=a.uuid
WHERE a.userid=".$uid." AND a.status>0 WHERE a.userid=".$uid." AND a.status>0 and ".$wheresql."
ORDER BY ts_published desc,ts_submitted desc,ts_created DESC ORDER BY d.ts_published desc,d.ts_submitted desc,d.ts_created DESC
"; ";
} }
$rs = $this->db->query($sql); $rs = $this->db->query($sql);

Binary file not shown.

Binary file not shown.

View File

@ -14,6 +14,7 @@ $(document).ready(function(e) {
var settings = $.extend( { var settings = $.extend( {
id:'', id:'',
content : '', content : '',
uuid:''
}, options); }, options);
var methods = { var methods = {
@ -21,11 +22,11 @@ $(document).ready(function(e) {
{ {
methods.creatWindow(id); methods.creatWindow(id);
}, },
creatWindow : function(id){ creatWindow : function(id,html){
$.colorbox({ $.colorbox({
initialHeight: '0', initialHeight: '0',
initialWidth: '0', initialWidth: '0',
html: methods.dialog, html: html,
opacity: '0.3', opacity: '0.3',
onComplete: function(){ onComplete: function(){
$('.confirm_yes').click(function(e){ $('.confirm_yes').click(function(e){
@ -44,7 +45,7 @@ $(document).ready(function(e) {
$.ajax({ $.ajax({
'type':"POST", 'type':"POST",
'url':'/author/literature/', 'url':'/author/literature/',
'data':'ac=edit&id='+id+'&content='+$('#content_input_area').val(), 'data':'ac=edit&'+$('#edit-mdref').serialize(),
'success':function(data){ 'success':function(data){
if (typeof(data)=='object') if (typeof(data)=='object')
{ {
@ -65,9 +66,34 @@ $(document).ready(function(e) {
} }
}); });
}, },
dialog : function(content){ loadinfo : function(id){
$.ajax({
'type':"POST",
'url':'/author/literature/',
'data':'ac=get&id='+id,
'success':function(data){
html = methods.dialog(data);
methods.creatWindow(id,html);
},
'timeout': 30000,
'error': function(){
alert('出现错误,请刷新后重试');
}
});
},
dialog : function(data){
HTML = '<div class=""><div class="modal-header"><h3>修改文献</h3></div>' HTML = '<div class=""><div class="modal-header"><h3>修改文献</h3></div>'
+ '<div class="modal-body"><textarea class="span8" id="content_input_area">'+settings.content+'</textarea></div>' + '<div class="modal-body"><form id="edit-mdref">'
+ '<div><textarea class="span8" id="content_input_area" name="content">'+data.reference+'</textarea></div>'
+ '<div><input type="text" name="link" value="'+((data.link == null) ? "":data.link)+'" class="span8" placeholder="链接" /></div>'
+ '<div><label class="radio"><input type="radio" name="reftype" value="0" '+ ((data.reftype == 0) ? "checked":"") +'>作者文献</label></div>'
+ '<div><label class="radio"><input type="radio" name="reftype" value="1" '+ ((data.reftype == 1) ? "checked":"") +'>用户文献</label></div>'
+ '<div><label class="radio"><input type="radio" name="reftype" value="2" '+ ((data.reftype == 2) ? "checked":"") +'>数据的参考文献</label></div>'
+ '<div><label class="radio"><input type="radio" name="reftype" value="3" '+ ((data.reftype == 3) ? "checked":"") +'>作者要求的文献引用方式(多篇)</label></div>'
+ '<input type="hidden" name="refid" value="'+data.refid+'" />'
+ '<input type="hidden" name="uuid" value="'+settings.uuid+'" />'
+ '<input type="hidden" name="id" value="'+settings.id+'" />'
+ '</form></div>'
+ '<div class="modal-footer"><a href="javascript:void(0);" class="btn btn-primary confirm_yes">是</a><a href="javascript:void(0);" class="btn confirm_no">否</a></div></div>'; + '<div class="modal-footer"><a href="javascript:void(0);" class="btn btn-primary confirm_yes">是</a><a href="javascript:void(0);" class="btn confirm_no">否</a></div></div>';
return HTML; return HTML;
} }
@ -79,9 +105,9 @@ $(document).ready(function(e) {
alert('参数错误'); alert('参数错误');
} }
settings.content = $(this).parent('p').prev('p').html(); settings.uuid = $(this).attr('rev');
methods.edit(settings.id); methods.loadinfo(settings.id);
}); });
}; };