2012-05-30 09:55:33 +00:00
|
|
|
|
<?php
|
|
|
|
|
$this->headTitle($this->config->title->site);
|
|
|
|
|
$this->headTitle($this->config->title->author);
|
|
|
|
|
$this->headTitle()->setSeparator(' - ');
|
|
|
|
|
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
|
|
|
|
|
$this->headLink()->appendStylesheet('/css/admin.css');
|
|
|
|
|
$this->headScript()->appendFile('/js/jquery.colorbox-min.js');
|
|
|
|
|
$this->headLink()->appendStylesheet('/css/author.css');
|
|
|
|
|
$this->headLink()->appendStylesheet('/css/colorbox.css');
|
|
|
|
|
$this->breadcrumb('<a href="/">首页</a>');
|
|
|
|
|
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
|
|
|
|
$this->breadcrumb('数据版本管理');
|
|
|
|
|
$this->breadcrumb()->setSeparator(' > ');
|
|
|
|
|
?>
|
|
|
|
|
<!-- 左侧导航 -->
|
|
|
|
|
<div id="leftPanel">
|
|
|
|
|
<?= $this->partial('data/left.phtml'); ?>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- //左侧导航 -->
|
|
|
|
|
|
|
|
|
|
<!-- 页面内容 -->
|
|
|
|
|
<div id="rightPanel">
|
|
|
|
|
<div id="tabs-controller">
|
|
|
|
|
<ul>
|
|
|
|
|
<li class="box-shadow <?php if(!$this->mdtitle) echo "active";?>"><a class="text-shadow" href="/admin/data/version">所有版本概况</a></li>
|
|
|
|
|
<li class="box-shadow"><a class="text-shadow" href="/admin/data/version/ac/bydata">逐数据浏览</a></li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
<div id="datalist">
|
|
|
|
|
<?php
|
|
|
|
|
if (count($this->paginator)):
|
|
|
|
|
if ($this->mdtitle) echo "<h2>元数据:".$this->mdtitle."</h2>";
|
|
|
|
|
echo "<ul>";
|
|
|
|
|
$autoindex=0;
|
2013-05-16 01:19:12 +00:00
|
|
|
|
$edited=false;
|
2012-05-30 09:55:33 +00:00
|
|
|
|
foreach ($this->paginator as $item):
|
|
|
|
|
$autoindex++;?>
|
|
|
|
|
<li id="list_<?php echo $item['id'];?>">
|
|
|
|
|
<p><a href="/data/<?php echo $item['uuid'];?>" target="_blank"><?php echo $item['title'];?></a>
|
2013-05-16 01:19:12 +00:00
|
|
|
|
【<a href="/admin/data/version/uuid/<?php echo $item['uuid']; ?>">查看此数据所有版本</a>
|
|
|
|
|
<?php
|
|
|
|
|
if (!$edited && @$item['gid'])
|
|
|
|
|
{
|
|
|
|
|
$edited=true;
|
|
|
|
|
echo '<a href="/service/geonetwork?url=metadata.edit?id='.$item['gid'].'" target="_blank">编辑最新版本</a> ';
|
|
|
|
|
}
|
|
|
|
|
?>
|
|
|
|
|
】</p>
|
2012-05-30 09:55:33 +00:00
|
|
|
|
<p>版本创建时间: <?php echo date("Y-m-d H:i",strtotime($item['ts_created']));?>
|
|
|
|
|
<?php if ($item['userid']) :
|
2012-06-12 11:39:50 +00:00
|
|
|
|
echo "发布人: ".(empty($item['realname'])?$item['username']:$item['realname'])." ";
|
|
|
|
|
endif;
|
2012-05-30 09:55:33 +00:00
|
|
|
|
?>
|
|
|
|
|
【<a onclick="return confirm('是否确定删除该版本?');" href="javascript:action('delete','<?php echo $item['id'];?>');" class="more">删除</a>
|
|
|
|
|
<a onclick="return confirm('是否确定将这个版本恢复到geonetwork?');" href="javascript:action('restore','<?php echo $item['id'];?>');" class="more">恢复到geonetwork</a>
|
|
|
|
|
<a href="/admin/data/version/ac/diff/id/<?php echo $item['id'];?>" class="more">与前一版对比</a>
|
2013-05-16 01:38:54 +00:00
|
|
|
|
<a href="/admin/data/version/ac/diff1/id/<?php echo $item['id'];?>" class="more">与前一发布或提交版对比</a>
|
2012-05-30 09:55:33 +00:00
|
|
|
|
<a onclick="$('#commit_submit').attr('onclick','commit(\'<?php echo $item['id'];?>\');');" href="#commitform" class="more inline">提交评审发布</a>
|
|
|
|
|
】</p>
|
|
|
|
|
<?php if ($item['changelog']) : ?>
|
|
|
|
|
<p><?php echo $item['changelog']; ?></p>
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
</li>
|
|
|
|
|
<?php endforeach;
|
|
|
|
|
echo "</ul>";
|
|
|
|
|
endif; ?>
|
|
|
|
|
<div class="pagenavi"><?= $this->paginator; ?></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- //页面内容 -->
|
|
|
|
|
<script>
|
|
|
|
|
$('#wapper').width($('body').width()-300);
|
|
|
|
|
function action(ac,id){
|
|
|
|
|
$.ajax({
|
|
|
|
|
'type':"POST",
|
|
|
|
|
'url':'/admin/data/version/',
|
|
|
|
|
'data':'ac='+ ac +'&id='+id,
|
|
|
|
|
'success':function(data){
|
|
|
|
|
if (typeof(data)=='object')
|
|
|
|
|
{
|
|
|
|
|
if(typeof(data.error)!='undefined')
|
|
|
|
|
{$.colorbox({'innerWidth':'50%','html':data.error});}
|
|
|
|
|
if(typeof(data.deleted)!='undefined')
|
|
|
|
|
{$('#list_'+data.deleted).fadeOut("slow",function(){$(this).remove();});}
|
|
|
|
|
if(typeof(data.commited)!='undefined')
|
|
|
|
|
{$('#changelog').val('');$('#commit_submit').attr('onclick','');}
|
|
|
|
|
}
|
|
|
|
|
else{
|
2012-06-12 01:49:51 +00:00
|
|
|
|
$.colorbox({'innerWidth':'50%','html':'<h4>出现错误,请稍候再试</h4>'});
|
2012-05-30 09:55:33 +00:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
'timeout': 30000,
|
|
|
|
|
'error': function(){
|
2012-06-12 01:49:51 +00:00
|
|
|
|
$.colorbox({'innerWidth':'50%','html':'<h4>处理中出现错误,请刷新页面后重试</h4>'});
|
2012-05-30 09:55:33 +00:00
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
$(".inline").colorbox({inline:true, width:"50%"});
|
|
|
|
|
function commit(id){
|
|
|
|
|
action('commit&changelog='+$('#changelog').val(),id);
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<div class="colorbox" style="display:none;">
|
|
|
|
|
<div id="commitform">
|
|
|
|
|
<form>
|
|
|
|
|
<p>
|
|
|
|
|
<label>版本改动:</label><br />
|
|
|
|
|
<textarea class="full" style="resize:none;height:200px;" id="changelog"></textarea>
|
|
|
|
|
<br /><small>请输入此版本与之前版本的差别</small>
|
|
|
|
|
</p>
|
|
|
|
|
<input type="button" onclick="" id="commit_submit" class="btn btn-green big" value="提交"/>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="error"><img src="/images/alert_big_error.png" /><span></span></div>
|
|
|
|
|
<div class="ok"><img src="/images/alert_big_ok.png" /><span></span></div>
|
|
|
|
|
<div class="warning"><img src="/images/alert_big_warning.png" /><span></span></div>
|
|
|
|
|
</div>
|