westdc-zf1/application/admin/views/scripts/review/myreview.phtml

241 lines
7.9 KiB
PHTML
Raw Normal View History

<?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(' > ');
2013-05-14 08:57:30 +00:00
$this->theme->AppendPlus($this,'colorbox');
?>
<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 action="" method="get" class="search input-append">
<input type="hidden" name="search" value='1' />
<input type="text" class="q" name="keyword" value="<?php echo $this->keyword; ?>" />
<button type="submit" class="btn">搜索</button>
</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'>元数据标题</th>
<th width='80'>状态</th>
2013-05-14 08:57:30 +00:00
<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><input type="checkbox" class="select_item" value="<?= $item['id']?>" /></td>
2013-05-14 08:57:30 +00:00
<td><?= $item['title']?> [
2013-05-24 00:35:07 +00:00
<a href="/service/geonetwork?url=metadata.edit?id=<?= $item['gid'] ?>" target="_blank">编辑</a> |
2013-05-14 08:57:30 +00:00
<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>
2013-05-14 08:57:30 +00:00
<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>
var sfadmin = {
def_data_tag : 'tbody',
def_select_input : '.select_item',
init: function() {
$('.select_rows').click(function () {
var tableid = $(this).data(sfadmin.def_data_tag);
$('#'+tableid).find(sfadmin.def_select_input).attr('checked', this.checked);
});
sfadmin.ajax.error();
},
getSelected : function(tableid){
if(tableid == "")
{
dom = $(sfadmin.def_select_input + ':checked');
}else{
dom = $(sfadmin.def_select_input + ':checked', '#'+tableid);
}
datas = new Array();
dom.each(function(index, element) {
datas.push($(this).val());
});
return datas;
},
ajax : {
error : function(){
$(document).ajaxError(function(event, request, settings) {
sfadmin.Alert("请求中发生错误");
})
}
},
Alert : function(content){
$.colorbox({width:'50%',html:'<div class="ajax_error"><div class="text"><h2>'+content+'</h2></div></div>'});
}
}
2013-05-14 08:57:30 +00:00
$(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
});
2013-05-14 08:57:30 +00:00
});
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;
}
2013-05-14 08:57:30 +00:00
(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>