270 lines
9.8 KiB
PHTML
270 lines
9.8 KiB
PHTML
<?php
|
|
$this->headTitle($this->config->title->site);
|
|
$this->headTitle('后台管理');
|
|
$this->headTitle()->setSeparator(' - ');
|
|
$this->breadcrumb('<a href="/">首页</a>');
|
|
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
|
$this->breadcrumb('元数据评审');
|
|
$this->breadcrumb()->setSeparator(' > ');
|
|
$this->theme->AppendPlus($this,'colorbox');
|
|
$this->theme->AppendModel($this,'sfadmin');
|
|
?>
|
|
<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; ?>
|
|
<form method="get" id="search">
|
|
<input type="hidden" name="search" value='1' />
|
|
<input type="hidden" name="code" id="code" value="<?php echo $this->code; ?>" />
|
|
<div class="input-append">
|
|
<input type="text" class="q" name="keyword" value="<?php echo $this->keyword; ?>" tabindex="1" />
|
|
<div class="btn-group">
|
|
<button tabindex="-1" class="btn" type="submit">搜索</button>
|
|
<button tabindex="-1" data-toggle="dropdown" class="btn dropdown-toggle">
|
|
专题<span class="caret"></span>
|
|
</button>
|
|
<ul class="dropdown-menu">
|
|
<li><a href="javascript:void(0);" onclick="$('#code').val('');$('#search').submit()">所有专题</a></li>
|
|
<?php if(!empty($this->source)) { ?>
|
|
<?php foreach($this->source as $v) { ?>
|
|
<li<?php echo ($this->code==$v['id'])?' class="active"':''; ?>><a href="javascript:void(0);" onclick="$('#code').val('<?= $v['id'] ?>');$('#search').submit()"><?= $v['code'] ?></a></li>
|
|
<?php } }?>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
<table class="table table-bordered table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th style="width:13px;"><input type="checkbox" class="select_rows" data-tbody="list" /></th>
|
|
<th width='500'>元数据标题<br />
|
|
<a href="?order=title&sort=desc" data-order="title" data-sort="desc">↑</a>
|
|
<a href="?order=title&sort=asc" data-order="title" data-sort="asc">↓</a>
|
|
</th>
|
|
<th width='80'>
|
|
状态<br />
|
|
<a href="?order=status&sort=desc" data-order="status" data-sort="desc">↑</a>
|
|
<a href="?order=status&sort=asc" data-order="status" data-sort="asc">↓</a>
|
|
</th>
|
|
<th>意见<br />
|
|
<a href="?order=reviews&sort=desc" data-order="reviews" data-sort="desc">↑</a>
|
|
<a href="?order=reviews&sort=asc" data-order="reviews" data-sort="asc">↓</a>
|
|
</th>
|
|
<th>接收时间<br />
|
|
<a href="?order=ts_accepted&sort=desc" data-order="ts_accepted" data-sort="desc">↑</a>
|
|
<a href="?order=ts_accepted&sort=asc" data-order="ts_accepted" data-sort="asc">↓</a>
|
|
</th>
|
|
<th>投稿人<br />
|
|
<a href="?order=author&sort=desc" data-order="author" data-sort="desc">↑</a>
|
|
<a href="?order=author&sort=asc" data-order="author" data-sort="asc">↓</a>
|
|
</th>
|
|
<th width="300">操作</th>
|
|
</tr>
|
|
</thead>
|
|
<?php if (count($this->paginator)): ?>
|
|
<tbody id="list">
|
|
<?php foreach ($this->paginator as $item): ?>
|
|
<tr>
|
|
<td><input type="checkbox" class="select_item" value="<?= $item['id']?>" /></td>
|
|
<td><?= $item['title']?> [
|
|
<a href="/service/geonetwork?url=metadata.edit?id=<?= $item['gid'] ?>" 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 "取消审核";
|
|
if($item['status'] == 1) echo "进入评审";
|
|
if($item['status'] == 2) echo "邀请专家";
|
|
if($item['status'] == 3) echo "专家接受邀请";
|
|
if($item['status'] == 4) echo "专家反馈";
|
|
if($item['status'] == 5) echo "已发布";
|
|
?></td>
|
|
<td style="text-align:center"><a href="/admin/review/comments/ac/list/uuid/<?php echo $item['uuid'];?>"><?= $item['reviews'] ?></a></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>
|
|
<a href="/admin/review/inreview/show/<?php echo $item['id'];?>">查看详细</a>
|
|
<a href="/admin/review/comments/ac/list/uuid/<?php echo $item['uuid'];?>">查看评审意见</a>
|
|
<a href="/admin/review/reply/uuid/<?php echo $item['uuid'];?>">意见反馈</a>
|
|
<a href='/admin/review/accept/cancel/<?php echo $item['id'];?>' onclick="return confirm('是否确定取消评审')">取消评审</a>
|
|
<a href="/admin/review/checkmail/id/<?php echo $item['id'];?>" style="color:#6C0">发布</a>
|
|
<a href="/admin/review/delete/id/<?php echo $item['id'];?>" style="color:#F00" onclick="return confirm('是否确定删除?该操作不可逆')">删除</a>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
<?php endif; ?>
|
|
</table>
|
|
<div><a class="btn btn-primary post">发布</a></div>
|
|
<div class="pagenavi"><?= $this->paginator; ?></div>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
$(document).ready(function(e) {
|
|
$('.version').click(function(){
|
|
$(this).getversion({'id':$(this).attr('rel')});
|
|
});
|
|
sfadmin.init();
|
|
$('.post').click(function(e) {
|
|
ids = getids();
|
|
if(!ids)
|
|
{
|
|
return false;
|
|
}
|
|
url = "/admin/review/post/" + '?' +ids;
|
|
self.location=url
|
|
});
|
|
});
|
|
function getids(){
|
|
id = sfadmin.getSelected('list');
|
|
if(id.length == '')
|
|
{
|
|
alert('请选择要操作的项目');
|
|
return false;
|
|
}
|
|
|
|
url_data = new Array();
|
|
|
|
for(i in id)
|
|
{
|
|
url_data.push('id[]='+id[i]);
|
|
}
|
|
|
|
data = url_data.join("&");
|
|
|
|
return data;
|
|
}
|
|
|
|
(function( $ ){
|
|
|
|
$.fn.changeorder = function( options ) {
|
|
|
|
var settings = $.extend( {
|
|
order:'',
|
|
srt: '',
|
|
}, options);
|
|
|
|
var methods = {
|
|
change : function(dom)
|
|
{
|
|
href = window.location.href + "?order="+settings.order+'&sort';
|
|
}
|
|
}
|
|
|
|
this.each(function() {
|
|
|
|
settings.order = $(this).data('order');
|
|
settings.srt = $(this).data('sort');
|
|
|
|
if( settings.order == '' || settings.srt == "")
|
|
{
|
|
alert('参数错误');
|
|
}
|
|
|
|
methods.change(this);
|
|
});
|
|
};
|
|
})( jQuery );
|
|
|
|
(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>
|