merge heihedata branch from r3504 to r3514

This commit is contained in:
wlx 2013-05-14 23:23:00 +00:00
commit 78bcc82fad
13 changed files with 542 additions and 215 deletions

View File

@ -3722,6 +3722,7 @@ class Admin_DataController extends Zend_Controller_Action
$this->_helper->layout->disableLayout();
$this->_helper->viewRenderer->setNoRender();
$this->jsonexit(array('success'=>'成功申请'));
return true;
}
}//doi

View File

@ -579,37 +579,23 @@ class Admin_ReviewController extends Zend_Controller_Action
*/
function myreviewAction(){
$auth = Zend_Auth::getInstance();
if($auth->hasIdentity())
{
$user = $auth->getIdentity();
$userid = $user->id;
}
include_once("data/Review.php");
include_once("helper/view.php");
$search=$this->_request->getParam('search');
$keyword = $this->_request->getParam('keyword');
$searchjoin = "";
$review = new Review($this->db);
if(!empty($search) && !empty($keyword))
{
$searchjoin = " and md.title like '%$keyword%'";
$rows = $review->adminReviews($keyword);
$this->view->keyword = $keyword;
}else{
$rows = $review->adminReviews();
}
$sql = "select m.id,md.uuid,md.title,u.username,u.realname,m.status,md.id as mdid from mdstatus m
right join metadata md on md.uuid=m.uuid
left join users u on u.id=m.userid
where m.status in (0,1,2,3,4) and u.id='$userid' $searchjoin order by m.status desc,m.ts_accepted desc";
$re = $this->db->query($sql);
$rows = $re->fetchAll();
$paginator = Zend_Paginator::factory($rows);
$paginator->setCurrentPageNumber($this->_getParam('page'));
$paginator->setItemCountPerPage($this->view->config->page->max);
$paginator->setView($this->view);
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
$this->view->paginator=$paginator;
view::addPaginator($rows,$this->view,$this->_request);
return true;
}//我管理的元数据

View File

@ -1,81 +1,168 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->author);
$this->headTitle()->setSeparator(' - ');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
$this->breadcrumb('DOI');
$this->breadcrumb()->setSeparator(' > ');
$this->theme->AppendPlus($this,'colorbox');
$this->theme->AppendPlus($this,'admin_plugin');
?>
<style>
table thead tr th {background:#EBF2F6;}
</style>
<div class="row-fluid">
<div class="span2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div class="span10">
<div>
<ul class="nav nav-tabs">
<li class="active"><a href="/admin/data/doi">浏览所有</a></li>
</ul>
</div>
<div>
<div class="input-append">
<form id="datasearch" class="search_form" action="">
<input type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" />
<button type="submit" class="btn" id="search_btn">搜索</button>
</form>
</div>
</div>
<?php if(!empty($this->error)) { ?>
<?= $this->error ?>
<?php } ?>
<?php if(!empty($this->msg)) { ?>
<?= $this->msg ?>
<?php } else{ ?>
<div id="datalist">
<?php if (count($this->paginator)): ?>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>状态</th>
<th>元数据</th>
<th>DOI</th>
<th width="140">操作</th>
</tr>
</thead>
<tbody>
<?php $autoindex=0;
foreach ($this->paginator as $item):
$autoindex++;?>
<tr id="DataLine_<?= $item['id']?>">
<td><?php if (!empty($item['ts_published'])) { echo '已发布'; } else if (!empty($item['ts_submitted'])) { echo '已提交'; } ?></td>
<td><a href="/data/<?= $item['uuid'] ?>"><?= $item['title'] ?></a></td>
<td><?= $item['doi'] ?></td>
<td>
<a href="/admin/data/doi/ac/edit/uuid/<?= $item['uuid']?>">编辑</a>
<a href="/admin/data/doi/ac/convert/uuid/<?= $item['uuid']?>">导出</a>
<a href="/admin/data/doi/ac/verified/uuid/<?= $item['uuid']?>">成功</a>
<a href="javascript:void(0);" onclick="onedel(<?= $item['id']?>)" id="delbtn_<?= $item['id']?>">删除</a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endif; ?>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
<?php } ?>
</div>
</div>
<!-- //页面内容 -->
<script>
var info = {
btn_prefix : "delbtn_",
item_prefix : "DataLine_",
url : "/admin/data/doi/ac/del"
}
</script>
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->author);
$this->headTitle()->setSeparator(' - ');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
$this->breadcrumb('DOI');
$this->breadcrumb()->setSeparator(' > ');
$this->theme->AppendPlus($this,'colorbox');
$this->theme->AppendPlus($this,'admin_plugin');
?>
<style>
table thead tr th {background:#EBF2F6;}
</style>
<div class="row-fluid">
<div class="span2">
<?= $this->partial('data/left.phtml'); ?>
</div>
<div class="span10">
<div>
<ul class="nav nav-tabs">
<li class="active"><a href="/admin/data/doi">浏览所有</a></li>
</ul>
</div>
<div>
<div class="input-append">
<form id="datasearch" class="search_form" action="">
<input type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" />
<button type="submit" class="btn" id="search_btn">搜索</button>
</form>
</div>
</div>
<?php if(!empty($this->error)) { ?>
<?= $this->error ?>
<?php } ?>
<?php if(!empty($this->msg)) { ?>
<?= $this->msg ?>
<?php } else{ ?>
<div id="datalist">
<?php if (count($this->paginator)): ?>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>状态</th>
<th>元数据</th>
<th>DOI</th>
<th width="140">操作</th>
</tr>
</thead>
<tbody>
<?php $autoindex=0;
foreach ($this->paginator as $item):
$autoindex++;?>
<tr id="DataLine_<?= $item['id']?>">
<td><?php if (!empty($item['ts_published'])) { echo '已发布'; } else if (!empty($item['ts_submitted'])) { echo '已提交'; } ?></td>
<td><a href="/data/<?= $item['uuid'] ?>"><?= $item['title'] ?></a></td>
<td><?= $item['doi'] ?></td>
<td>
<a href="/admin/data/doi/ac/edit/uuid/<?= $item['uuid']?>">编辑</a>
<a href="/admin/data/doi/ac/convert/uuid/<?= $item['uuid']?>">导出</a>
<a href="javascript:void(0);" rel="/admin/data/doi/ac/verified/uuid/<?= $item['uuid']?>" class="verified_btn">成功</a>
<a href="javascript:void(0);" onclick="onedel(<?= $item['id']?>)" id="delbtn_<?= $item['id']?>">删除</a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endif; ?>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
<?php } ?>
</div>
</div>
<!-- //页面内容 -->
<script>
var info = {
btn_prefix : "delbtn_",
item_prefix : "DataLine_",
url : "/admin/data/doi/ac/del"
}
$(document).ready(function(e) {
$('.verified_btn').click(function(e) {
$(this).ajaxmsg({
callback:function(){window.location.reload();}
});
});
});
(function( $ ){
$.fn.ajaxmsg = function( options ) {
var settings = $.extend( {
url:'',
callback : '',
}, options);
var methods = {
msg : function(id)
{
methods.submited();
},
creatWindow : function(content){
$.colorbox({
initialHeight: '0',
initialWidth: '0',
html: methods.dialog(content),
opacity: '0.3',
onComplete: function(){
$('.confirm_yes').click(function(e){
e.preventDefault();
if(typeof(settings.callback)=='function')
{
settings.callback();
}
$.colorbox.close();
});
$('.confirm_no').click(function(e){
e.preventDefault();
$.colorbox.close();
});
}
});
},
submited : function(){
$.ajax({
'type':"POST",
'url':settings.url,
'data':'',
'success':function(data){
if (typeof(data)=='object')
{
if(typeof(data.error)!='undefined')
{alert(data.error);}
if(typeof(data.success)!='undefined')
{
methods.creatWindow(data.success);
}
}
else{
alert('出现错误,请稍候再试');
}
},
'timeout': 30000,
'error': function(){
alert('出现错误,请刷新后重试');
}
});
},
dialog : function(content){
HTML = '<div class=""><div class="modal-header"><h3>提示信息</h3></div>'
+ '<div class="modal-body"><div class=" span5">'+content+'</div></div>'
+ '<div class="modal-footer"><a href="javascript:void(0);" class="btn btn-primary confirm_yes">确定</a></div></div>';
return HTML;
}
}
this.each(function() {
settings.url = $(this).attr('rel');
if(settings.url == '')
{
alert('参数错误');
}
methods.msg();
});
};
})( jQuery );
</script>

View File

@ -2,7 +2,6 @@
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->headScript()->appendFile('/static/js/jquery.tagInput.min.js');
$this->headScript()->appendFile('/static/js/kindeditor-min.js');

View File

@ -37,7 +37,7 @@ table thead tr th {background:#EBF2F6;color:#444;}
<tr>
<th width='600'>元数据标题</th>
<th width='120'>负责编辑</th>
<th width='120'>时间</th>
<th width='120'>接收时间</th>
<th width='180'>操作</th>
</tr></thead>
<?php if (count($this->paginator)): ?>
@ -48,9 +48,7 @@ table thead tr th {background:#EBF2F6;color:#444;}
<td><?php echo $item['realname'].'['.$item['username'].']'; ?></td>
<td><?php echo date("Y-m-d H:i",strtotime($item['ts_accepted']));?></td>
<td>
<a href='/admin/review/accept/cancel/<?php echo $item['id'];?>' onclick="return confirm('是否确定取消评审')">取消评审</a>
<a href='/admin/review/invite/?id=<?php echo $item['id'];?>'>邀请专家</a>
<a href="/admin/review/changeadmin/?id=<?php echo $item['id'];?>">更改管理员</a>
<a href="/admin/review/changeadmin/?id=<?php echo $item['id'];?>">分配编辑</a>
</td>
</tr>
<?php endforeach; ?>

View File

@ -2,52 +2,52 @@
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin">后台首页</a>');
$this->breadcrumb('元数据评审');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="leftPanel">
<?= $this->partial('review/left.phtml'); ?>
</div>
<div id="rightPanel">
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
<p><?php echo $msg; ?></p>
<?php endforeach;endif; ?>
</div>
<?php endif; ?>
<table><thead>
<tr>
<td width='80'>用户ID</td>
<td width='100'>用户名</td>
<td width='100'>姓名</td>
<td width="250">单位</td>
<td width="100">联系电话</td>
<td width="100">电子邮箱</td>
<td width="100">操作</td>
</tr></thead>
<?php if (count($this->paginator)): ?>
<?php $autoindex=0;?>
<?php foreach ($this->paginator as $item): ?>
<?php $autoindex++;?>
<tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>">
<td><?php echo $item['id']; ?></td>
<td><?php echo $item['username']; ?></td>
<td><?php echo $item['realname']; ?></td>
<td><?php echo $item['unit']; ?></td>
<td><?php echo $item['phone']; ?></td>
<td><?php echo $item['email']; ?></td>
<td><a href="/admin/review/changeadmin/?id=<?php echo $this->id;?>&uid=<?php echo $item['id'];?>">设置为此评审的管理员</a></td>
</tr>
<?php endforeach; ?>
<?php endif; ?>
</table>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
<style>
table thead tr th {background:#EBF2F6;color:#444;}
.high{background:#444;color:#FFF;}
</style>
<div class="row-fluid">
<div class="span3">
<?= $this->partial('review/left.phtml'); ?>
</div>
<div class="span9">
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
<p><?php echo $msg; ?></p>
<?php endforeach;endif; ?>
</div>
<?php endif; ?>
<table class="table table-bordered table-hover"><thead>
<tr>
<th width='80'>用户ID</th>
<th width='100'>用户名</th>
<th width='100'>姓名</th>
<th width="100">电子邮箱</th>
<th width="100">操作</th>
</tr></thead>
<?php if (count($this->paginator)): ?>
<?php $autoindex=0;?>
<?php foreach ($this->paginator as $item): ?>
<?php $autoindex++;?>
<tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>">
<td><?php echo $item['id']; ?></td>
<td><?php echo $item['username']; ?></td>
<td><?php echo $item['realname']; ?></td>
<td><?php echo $item['email']; ?></td>
<td><a href="/admin/review/changeadmin/?id=<?php echo $this->id;?>&uid=<?php echo $item['id'];?>">设置为此评审的管理员</a></td>
</tr>
<?php endforeach; ?>
<?php endif; ?>
</table>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
</div>

View File

@ -2,58 +2,61 @@
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->headScript()->appendFile('/js/jquery-1.6.4.min.js');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin">后台首页</a>');
$this->breadcrumb('元数据评审');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="leftPanel">
<?= $this->partial('review/left.phtml'); ?>
</div>
<div id="rightPanel">
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
<p><?php echo $msg; ?></p>
<?php endforeach;endif; ?>
</div>
<?php endif; ?>
<style>
table thead tr th {background:#EBF2F6;color:#444;}
.high{background:#444;color:#FFF;}
</style>
<div class="row-fluid">
<div class="span3">
<?= $this->partial('review/left.phtml'); ?>
</div>
<div class="span9">
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
<p><?php echo $msg; ?></p>
<?php endforeach;endif; ?>
</div>
<?php endif; ?>
<div class="search">
<form action="" method="get">
<input type="hidden" name="search" value='1' />
<label>搜索关键字</label><input type="text" name="keyword" class="q" value="<?php echo $this->keyword; ?>" />
<input type="submit" class="btn" value="搜索" />
</form>
</div><!-- search DIV -->
<table class="stylized"><thead>
<tr>
<td>标题</td>
<td width='100'>状态</td>
<td width='100'>管理员</td>
<td width="180">操作</td>
</tr></thead>
<?php if (count($this->paginator)): ?>
<tbody id="list">
<?php foreach ($this->paginator as $item): ?>
<tr>
<td><a href="/data/<?php echo $item['uuid'];?>"><?php echo $item['title']; ?></a></td>
<td><?php echo $item['status']; ?></td>
<td><?php echo $item['realname'].'['.$item['username'].']'; ?></td>
<td><a href="/admin/review/inreview/show/<?php echo $item['id']; ?>">查看详细</a>
<a href="/admin/review/invite/?id=<?php echo $item['id'];?>">邀请专家</a>
<a href="/admin/review/changeadmin/?id=<?php echo $item['id'];?>">更改管理员</a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
<?php endif; ?>
</table>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
<script>$("#list tr").mouseover(function(){$(this).addClass("high")}).mouseout(function(){$(this).removeClass("high")})</script>
<div class="search">
<form action="" method="get">
<input type="hidden" name="search" value='1' />
<label>搜索关键字</label><input type="text" name="keyword" class="q" value="<?php echo $this->keyword; ?>" />
<input type="submit" class="btn" value="搜索" />
</form>
</div><!-- search DIV -->
<table class="table table-bordered table-hover"><thead>
<tr>
<th>标题</td>
<th>状态</th>
<th>责任编辑</th>
<th>操作</th>
</tr></thead>
<?php if (count($this->paginator)): ?>
<tbody id="list">
<?php foreach ($this->paginator as $item): ?>
<tr>
<td><a href="/data/<?php echo $item['uuid'];?>"><?php echo $item['title']; ?></a></td>
<td><?php echo $item['status']; ?></td>
<td><?php echo $item['realname'].'['.$item['username'].']'; ?></td>
<td><a href="/admin/review/inreview/show/<?php echo $item['id']; ?>">查看详细</a>
<a href="/admin/review/invite/?id=<?php echo $item['id'];?>">邀请专家</a>
<a href="/admin/review/changeadmin/?id=<?php echo $item['id'];?>">分配编辑</a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
<?php endif; ?>
</table>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
</div>

View File

@ -2,7 +2,7 @@
<span class="label"><h4>元数据评审</h4></span>
<li id="Nav-review-draft"><a href="/admin/review/draft">投稿元数据</a></li>
<li id="Nav-review-accept"><a href="/admin/review/accept">待审元数据</a></li>
<li id="Nav-review-inreview"><a href="/admin/review/inreview">在审元数据</a></li>
<!-- <li id="Nav-review-inreview"><a href="/admin/review/inreview">在审元数据</a></li> -->
<li id="Nav-review-myreview"><a href="/admin/review/myreview">我负责的元数据</a></li>
<li id="Nav-review-reviewed"><a href="/admin/review/reviewed">通过评审的元数据</a></li>
<li id="Nav-review-experts"><a href="/admin/review/experts">专家库</a></li>

View File

@ -6,6 +6,7 @@
$this->breadcrumb('<a href="/admin">后台首页</a>');
$this->breadcrumb('元数据评审');
$this->breadcrumb()->setSeparator(' > ');
$this->theme->AppendPlus($this,'colorbox');
?>
<style>
table thead tr th {background:#EBF2F6;color:#444;}
@ -36,14 +37,19 @@ table thead tr th {background:#EBF2F6;color:#444;}
<tr>
<th width='500'>元数据标题</th>
<th width='80'>状态</th>
<th>操作</th>
<th>接收时间</th>
<th>作者</th>
<th width="300">操作</th>
</tr>
</thead>
<?php if (count($this->paginator)): ?>
<tbody id="list">
<?php foreach ($this->paginator as $item): ?>
<tr>
<td><?= $item['title']?> [<a href="/service/geonetwork?url=metadata.edit?id=<?= $item['mdid'] ?>" target="_blank">编辑</a>]</td>
<td><?= $item['title']?> [
<a href="/service/geonetwork?url=metadata.edit?id=<?= $item['mdid'] ?>" target="_blank">编辑</a> |
<a href="javascript:void(0);" rel="<?= $item['uuid']?>" class="version">版本</a>
]</td>
<td><?php
if($item['status'] == 0) echo "初始";
if($item['status'] == -1) echo "取消审核";
@ -53,6 +59,8 @@ table thead tr th {background:#EBF2F6;color:#444;}
if($item['status'] == 4) echo "专家反馈";
if($item['status'] == 5) echo "已发布";
?></td>
<td><?php echo date("Y-m-d H:i",strtotime($item['ts_accepted']));?></td>
<td><?= $item['author']?></td>
<td>
<a href="/admin/review/invite/id/<?php echo $item['id'];?>">邀请专家</a>
<a href="/admin/review/changeadmin/id/<?php echo $item['id'];?>">更改管理员</a>
@ -72,5 +80,94 @@ table thead tr th {background:#EBF2F6;color:#444;}
</div>
</div>
<script>
//$("#list tr").mouseover(function(){$(this).addClass("high")}).mouseout(function(){$(this).removeClass("high")});
$(document).ready(function(e) {
$('.version').click(function(){
$(this).getversion({'id':$(this).attr('rel')});
});
});
(function( $ ){
$.fn.getversion = function( options ) {
var settings = $.extend( {
id:'',
content : '',
}, options);
var methods = {
edit : function(id)
{
methods.creatWindow(id);
},
creatWindow : function(id){
$.colorbox({
initialHeight: '0',
initialWidth: '0',
html: methods.dialog,
opacity: '0.3',
onComplete: function(){
$('.confirm_yes').click(function(e){
e.preventDefault();
methods.submited(id);
$.colorbox.close();
});
$('.confirm_no').click(function(e){
e.preventDefault();
$.colorbox.close();
});
}
});
},
getVersion : function(uuid){
$.ajax({
'type':"POST",
'url':'/data/getversion',
'data':'ac=list&uuid='+uuid,
'success':methods.onLoad,
'timeout': 30000,
'error': function(){
alert('处理中出现错误,请刷新页面后重试');
return false;
}
});
},
onLoad : function(data){
if (typeof(data)=='object')
{
if(typeof(data.error)!='undefined')
{
alert("没有版本信息");return false;
}
if(typeof(data.list)!='undefined')
{
var html = "";
for(v in data.list)
{
html+='<li><p>'+data.list[v].changelog+'</p><p>'+data.list[v].ts_created+' by '+data.list[v].username+'</p></li>';
}
$.colorbox({'innerWidth':'50%','innerHeight':'80%','html':'<div class="datalist"><ul>'+html+'</ul></div>'});
}
}
else{
alert('出现错误,请稍后再试');return false;
}
},
dialog : function(content){
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-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;
}
}
this.each(function() {
if( settings.id == '')
{
alert('参数错误');
}
methods.getVersion(settings.id);
});
};
})( jQuery );
</script>

View File

@ -1376,4 +1376,106 @@ class ServiceController extends Zend_Controller_Action
->setBody($footer);
}
//RIS format convert
function risAction()
{
$this->_helper->layout->disableLayout();
$this->_helper->viewRenderer->setNoRender();
$uuid=$this->_request->getParam('uuid');
$lang=$this->_request->getParam('lang');
$ris='';
if ($lang=='cn' && !empty($uuid))
{
$sql="select d.*,m.description from datadoi d left join metadata m on d.uuid=m.uuid where d.uuid='$uuid' and d.ts_published is not null";
$row=$this->db->fetchRow($sql);
$authors=explode(',',str_replace('"','',substr($row['authors'],1,-1)));
$ris.='TY - JOUR'."\r\n";
$ris.='T1 - '.$row['title']."\r\n";
foreach($authors as $a)
{
$ris.='A1 - '.$a."\r\n";
}
$ris.='Y1 - '.date('Y/m/d',strtotime($row['ts_published']))."\r\n";
$ris.='JF - '.$row['publisher']."\r\n";
$ris.='JA - '.$row['publisher']."\r\n";
$ris.='UR - http://dx.doi.org/'.$row['doi']."\r\n";
$ris.='PB - '.$row['publisher']."\r\n";
$ris.='M3 - doi:'.$row['doi']."\r\n";
$ris.='DO - doi:'.$row['doi']."\r\n";
$ris.='ER -'."\r\n";
}
else if ($lang=='en' && !empty($uuid))
{
$sql="select d.*,m.description from datadoi d left join metadata m on d.uuid=m.uuid where d.uuid='$uuid' and d.ts_published is not null";
$row=$this->db->fetchRow($sql);
$authors=explode(',',str_replace('"','',substr($row['author_en'],1,-1)));
$ris.='TY - JOUR'."\r\n";
$ris.='T1 - '.$row['title_en']."\r\n";
foreach($authors as $a)
{
$ris.='A1 - '.$a."\r\n";
}
$ris.='Y1 - '.date('Y/m/d',strtotime($row['ts_published']))."\r\n";
$ris.='JF - '.$row['publisher_en']."\r\n";
$ris.='JA - '.$row['publisher_en']."\r\n";
$ris.='UR - http://dx.doi.org/'.$row['doi']."\r\n";
$ris.='PB - '.$row['publisher_en']."\r\n";
$ris.='M3 - doi:'.$row['doi']."\r\n";
$ris.='DO - doi:'.$row['doi']."\r\n";
$ris.='ER -'."\r\n";
}
if (!empty($ris))
{
$this->getResponse()->setHeader('Content-Type', 'application/x-Research-Info-Systems')->setHeader('Content-Disposition','attachment; filename="'.$uuid.'.ris"')
//->setHeader('Content-Type','application/force-download')
->setBody($ris);
}
}
//Bibtex format convert
function bibtexAction()
{
$this->_helper->layout->disableLayout();
$this->_helper->viewRenderer->setNoRender();
$uuid=$this->_request->getParam('uuid');
$lang=$this->_request->getParam('lang');
$bib='';
if ($lang=='cn' && !empty($uuid))
{
$sql="select d.*,m.description from datadoi d left join metadata m on d.uuid=m.uuid where d.uuid='$uuid' and d.ts_published is not null";
$row=$this->db->fetchRow($sql);
$bib.='@article{'.$row['doi'].",\r\n";
$bib.=' author = '.str_replace('"','',str_replace(',',' and ',$row['authors'])).",\r\n";
$bib.=' journal = {'.$row['publisher']."},\r\n";
$bib.=' publisher = {'.$row['publisher']."},\r\n";
$bib.=' title = {'.$row['title']."},\r\n";
$bib.=' year = {'.date('Y',strtotime($row['ts_published']))."},\r\n";
$bib.=' month = {'.date('m',strtotime($row['ts_published']))."},\r\n";
$bib.=' url = {http://dx.doi.org/'.$row['doi']."},\r\n";
$bib.=' doi = {'.$row['doi']."}\r\n";
$bib.="}\r\n";
}
else if ($lang=='en' && !empty($uuid))
{
$sql="select d.*,m.description from datadoi d left join metadata m on d.uuid=m.uuid where d.uuid='$uuid' and d.ts_published is not null";
$row=$this->db->fetchRow($sql);
$bib.='@article{'.$row['doi'].",\r\n";
$bib.=' author = '.str_replace('"','',str_replace(',',' and ',$row['author_en'])).",\r\n";
$bib.=' journal = {'.$row['publisher_en']."},\r\n";
$bib.=' publisher = {'.$row['publisher_en']."},\r\n";
$bib.=' title = {'.$row['title']."},\r\n";
$bib.=' year = {'.date('Y',strtotime($row['ts_published']))."},\r\n";
$bib.=' month = {'.date('m',strtotime($row['ts_published']))."},\r\n";
$bib.=' url = {http://dx.doi.org/'.$row['doi']."},\r\n";
$bib.=' doi = {'.$row['doi']."}\r\n";
$bib.="}\r\n";
}
if (!empty($bib))
{
$this->getResponse()->setHeader('Content-Type', 'application/x-Bibtex')->setHeader('Content-Disposition','attachment; filename="'.$uuid.'.bib"')
//->setHeader('Content-Type','application/force-download')
->setBody($bib);
}
}
}

View File

@ -97,10 +97,18 @@ if ($md->title_en) echo '<br />'.$this->escape($md->title_en);?>
</ul>
<hr />
<?php }?>
<?php if ($md->suppinfo) : ?>
<h4><i class="icon-money text-info"></i>资助项目</h4>
<?php echo '<p>'.str_replace(array("\r\n", "\n", "\r"),'</p><p>',$this->escape($md->suppinfo)).'</p>';?>
<hr />
<?php if ($md->suppinfo || $this->fund) : ?>
<h4><i class="icon-money text-info"></i>资助项目</h4>
<?php if(!empty($this->fund)) : ?>
<ul>
<?php foreach($this->fund as $k=>$v) : ?>
<li><?= $v['fund_type'] ?><?= $v['title'] ?>(项目编号:<?= $v['fund_id']?>) [<?= $v['fund_type_en'] ?>(No. <?= $v['fund_id']?>)]</li>
<?php endforeach; ?>
</ul>
<?php elseif(!empty($md->suppinfo)) : ?>
<?php echo '<p>'.str_replace(array("\r\n", "\n", "\r"),'</p><p>',$this->escape($md->suppinfo)).'</p>';?>
<?php endif; ?>
<hr />
<?php endif; ?>
<?php if ($this->resources) : ?>
<h4><i class="icon-bolt text-warning"></i>相关资源</h4>

View File

@ -9,17 +9,19 @@
$this->breadcrumb('查看试验元数据');
$this->breadcrumb()->setSeparator(' > ');
$this->theme->AppendPlus($this,'google_map_v3');
$this->theme->AppendPlus($this,'colorbox');
$this->theme->AppendPlus($this,'colorbox');
$this->nav[] = array('link'=>"/water",'title'=>'黑河综合遥感联合试验');
?>
<style>
h3.gs_rt{font-size:110%;}
</style>
</style>
<?= $this->render('breadcrumbs.phtml'); ?>
<?php $md=$this->metadata;if ($md):?>
<h3><?php echo $this->escape($md->title);
if ($md->title_en) echo '<br />'.$this->escape($md->title_en);?>
</h3>
<hr />
<div class="row">
<div class="row">
<div class="span8">
<div>
<a class="colorbox pull-right" title="<?php echo $md->title; ?>" href="/service/bigthumb/uuid/<?php echo $md->uuid; ?>"><img src="/service/thumb/uuid/<?php echo $md->uuid;?>"/></a>
@ -88,10 +90,18 @@ if ($md->title_en) echo '<br />'.$this->escape($md->title_en);?>
</ul>
<hr />
<?php }?>
<?php if ($md->suppinfo) : ?>
<h4><i class="icon-money text-info"></i>资助项目</h4>
<?php echo '<p>'.str_replace(array("\r\n", "\n", "\r"),'</p><p>',$this->escape($md->suppinfo)).'</p>';?>
<hr />
<?php if ($md->suppinfo || $this->fund) : ?>
<h4><i class="icon-money text-info"></i>资助项目</h4>
<?php if(!empty($this->fund)) : ?>
<ul>
<?php foreach($this->fund as $k=>$v) : ?>
<li><?= $v['fund_type'] ?><?= $v['title'] ?>(项目编号:<?= $v['fund_id']?>) [<?= $v['fund_type_en'] ?>(No. <?= $v['fund_id']?>)]</li>
<?php endforeach; ?>
</ul>
<?php elseif(!empty($md->suppinfo)) : ?>
<?php echo '<p>'.str_replace(array("\r\n", "\n", "\r"),'</p><p>',$this->escape($md->suppinfo)).'</p>';?>
<?php endif; ?>
<hr />
<?php endif; ?>
<?php if ($this->resources) : ?>
<h4><i class="icon-bolt text-warning"></i>相关资源</h4>

View File

@ -52,4 +52,40 @@ class Review extends Zend_Controller_Plugin_Abstract
return $reviews;
}
//后台我负责的评审
function adminReviews($keyword = "",$order="")
{
include_once('helper/view.php');
$uid = view::User('id');
$wheresql = array();
$wheresql[] = " m.status in (0,1,2,3,4) ";
$wheresql[] = " u.id=$uid ";
if(!empty($keyword))
{
$wheresql[] = " md.title like '%$keyword%' ";
}
if(count($wheresql)>0)
{
$wheresql = " WHERE ".join(" AND ",$wheresql);
}else{
$wheresql = "";
}
$sql = "select m.id,md.uuid,md.title,u.username,u.realname,m.status,md.id as mdid,md.author,m.ts_accepted
FROM mdstatus m
right join metadata md on md.uuid=m.uuid
left join users u on u.id=m.userid
$wheresql
order by m.status desc,m.ts_accepted desc";
$re = $this->db->query($sql);
$rows = $re->fetchAll();
return $rows;
}
}