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->layout->disableLayout();
$this->_helper->viewRenderer->setNoRender(); $this->_helper->viewRenderer->setNoRender();
$this->jsonexit(array('success'=>'成功申请')); $this->jsonexit(array('success'=>'成功申请'));
return true;
} }
}//doi }//doi

View File

@ -579,37 +579,23 @@ class Admin_ReviewController extends Zend_Controller_Action
*/ */
function myreviewAction(){ function myreviewAction(){
$auth = Zend_Auth::getInstance(); include_once("data/Review.php");
if($auth->hasIdentity()) include_once("helper/view.php");
{
$user = $auth->getIdentity();
$userid = $user->id;
}
$search=$this->_request->getParam('search'); $search=$this->_request->getParam('search');
$keyword = $this->_request->getParam('keyword'); $keyword = $this->_request->getParam('keyword');
$searchjoin = ""; $review = new Review($this->db);
if(!empty($search) && !empty($keyword)) if(!empty($search) && !empty($keyword))
{ {
$searchjoin = " and md.title like '%$keyword%'"; $rows = $review->adminReviews($keyword);
$this->view->keyword = $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 view::addPaginator($rows,$this->view,$this->_request);
right join metadata md on md.uuid=m.uuid return true;
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 File

@ -58,7 +58,7 @@ table thead tr th {background:#EBF2F6;}
<td> <td>
<a href="/admin/data/doi/ac/edit/uuid/<?= $item['uuid']?>">编辑</a> <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/convert/uuid/<?= $item['uuid']?>">导出</a>
<a href="/admin/data/doi/ac/verified/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> <a href="javascript:void(0);" onclick="onedel(<?= $item['id']?>)" id="delbtn_<?= $item['id']?>">删除</a>
</td> </td>
</tr> </tr>
@ -78,4 +78,91 @@ var info = {
item_prefix : "DataLine_", item_prefix : "DataLine_",
url : "/admin/data/doi/ac/del" 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> </script>

View File

@ -2,7 +2,6 @@
$this->headTitle($this->config->title->site); $this->headTitle($this->config->title->site);
$this->headTitle('后台管理'); $this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - '); $this->headTitle()->setSeparator(' - ');
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
$this->headLink()->appendStylesheet('/css/admin.css'); $this->headLink()->appendStylesheet('/css/admin.css');
$this->headScript()->appendFile('/static/js/jquery.tagInput.min.js'); $this->headScript()->appendFile('/static/js/jquery.tagInput.min.js');
$this->headScript()->appendFile('/static/js/kindeditor-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> <tr>
<th width='600'>元数据标题</th> <th width='600'>元数据标题</th>
<th width='120'>负责编辑</th> <th width='120'>负责编辑</th>
<th width='120'>时间</th> <th width='120'>接收时间</th>
<th width='180'>操作</th> <th width='180'>操作</th>
</tr></thead> </tr></thead>
<?php if (count($this->paginator)): ?> <?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 $item['realname'].'['.$item['username'].']'; ?></td>
<td><?php echo date("Y-m-d H:i",strtotime($item['ts_accepted']));?></td> <td><?php echo date("Y-m-d H:i",strtotime($item['ts_accepted']));?></td>
<td> <td>
<a href='/admin/review/accept/cancel/<?php echo $item['id'];?>' onclick="return confirm('是否确定取消评审')">取消评审</a> <a href="/admin/review/changeadmin/?id=<?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> </td>
</tr> </tr>
<?php endforeach; ?> <?php endforeach; ?>

View File

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

View File

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

View File

@ -2,7 +2,7 @@
<span class="label"><h4>元数据评审</h4></span> <span class="label"><h4>元数据评审</h4></span>
<li id="Nav-review-draft"><a href="/admin/review/draft">投稿元数据</a></li> <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-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-myreview"><a href="/admin/review/myreview">我负责的元数据</a></li>
<li id="Nav-review-reviewed"><a href="/admin/review/reviewed">通过评审的元数据</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> <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('<a href="/admin">后台首页</a>');
$this->breadcrumb('元数据评审'); $this->breadcrumb('元数据评审');
$this->breadcrumb()->setSeparator(' > '); $this->breadcrumb()->setSeparator(' > ');
$this->theme->AppendPlus($this,'colorbox');
?> ?>
<style> <style>
table thead tr th {background:#EBF2F6;color:#444;} table thead tr th {background:#EBF2F6;color:#444;}
@ -36,14 +37,19 @@ table thead tr th {background:#EBF2F6;color:#444;}
<tr> <tr>
<th width='500'>元数据标题</th> <th width='500'>元数据标题</th>
<th width='80'>状态</th> <th width='80'>状态</th>
<th>操作</th> <th>接收时间</th>
<th>作者</th>
<th width="300">操作</th>
</tr> </tr>
</thead> </thead>
<?php if (count($this->paginator)): ?> <?php if (count($this->paginator)): ?>
<tbody id="list"> <tbody id="list">
<?php foreach ($this->paginator as $item): ?> <?php foreach ($this->paginator as $item): ?>
<tr> <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 <td><?php
if($item['status'] == 0) echo "初始"; if($item['status'] == 0) echo "初始";
if($item['status'] == -1) 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'] == 4) echo "专家反馈";
if($item['status'] == 5) echo "已发布"; if($item['status'] == 5) echo "已发布";
?></td> ?></td>
<td><?php echo date("Y-m-d H:i",strtotime($item['ts_accepted']));?></td>
<td><?= $item['author']?></td>
<td> <td>
<a href="/admin/review/invite/id/<?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> <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>
</div> </div>
<script> <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> </script>

View File

@ -1376,4 +1376,106 @@ class ServiceController extends Zend_Controller_Action
->setBody($footer); ->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,9 +97,17 @@ if ($md->title_en) echo '<br />'.$this->escape($md->title_en);?>
</ul> </ul>
<hr /> <hr />
<?php }?> <?php }?>
<?php if ($md->suppinfo) : ?> <?php if ($md->suppinfo || $this->fund) : ?>
<h4><i class="icon-money text-info"></i>资助项目</h4> <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 echo '<p>'.str_replace(array("\r\n", "\n", "\r"),'</p><p>',$this->escape($md->suppinfo)).'</p>';?>
<?php endif; ?>
<hr /> <hr />
<?php endif; ?> <?php endif; ?>
<?php if ($this->resources) : ?> <?php if ($this->resources) : ?>

View File

@ -10,10 +10,12 @@
$this->breadcrumb()->setSeparator(' > '); $this->breadcrumb()->setSeparator(' > ');
$this->theme->AppendPlus($this,'google_map_v3'); $this->theme->AppendPlus($this,'google_map_v3');
$this->theme->AppendPlus($this,'colorbox'); $this->theme->AppendPlus($this,'colorbox');
$this->nav[] = array('link'=>"/water",'title'=>'黑河综合遥感联合试验');
?> ?>
<style> <style>
h3.gs_rt{font-size:110%;} h3.gs_rt{font-size:110%;}
</style> </style>
<?= $this->render('breadcrumbs.phtml'); ?>
<?php $md=$this->metadata;if ($md):?> <?php $md=$this->metadata;if ($md):?>
<h3><?php echo $this->escape($md->title); <h3><?php echo $this->escape($md->title);
if ($md->title_en) echo '<br />'.$this->escape($md->title_en);?> if ($md->title_en) echo '<br />'.$this->escape($md->title_en);?>
@ -88,9 +90,17 @@ if ($md->title_en) echo '<br />'.$this->escape($md->title_en);?>
</ul> </ul>
<hr /> <hr />
<?php }?> <?php }?>
<?php if ($md->suppinfo) : ?> <?php if ($md->suppinfo || $this->fund) : ?>
<h4><i class="icon-money text-info"></i>资助项目</h4> <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 echo '<p>'.str_replace(array("\r\n", "\n", "\r"),'</p><p>',$this->escape($md->suppinfo)).'</p>';?>
<?php endif; ?>
<hr /> <hr />
<?php endif; ?> <?php endif; ?>
<?php if ($this->resources) : ?> <?php if ($this->resources) : ?>

View File

@ -52,4 +52,40 @@ class Review extends Zend_Controller_Plugin_Abstract
return $reviews; 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;
}
} }