2012-03-26 04:16:36 +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');
|
2012-03-27 10:17:51 +00:00
|
|
|
|
$this->headScript()->appendFile('/js/jquery.colorbox-min.js');
|
2012-03-26 04:16:36 +00:00
|
|
|
|
$this->headLink()->appendStylesheet('/css/author.css');
|
2012-03-27 10:17:51 +00:00
|
|
|
|
$this->headLink()->appendStylesheet('/css/colorbox.css');
|
2012-03-26 04:16:36 +00:00
|
|
|
|
$this->breadcrumb('<a href="/">首页</a>');
|
|
|
|
|
$this->breadcrumb('<a href="/author">数据作者</a>');
|
|
|
|
|
$this->breadcrumb('数据版本管理');
|
|
|
|
|
$this->breadcrumb()->setSeparator(' > ');
|
|
|
|
|
?>
|
|
|
|
|
<!-- 左侧导航 -->
|
|
|
|
|
<div id='sidebar'>
|
|
|
|
|
<div id='leftnavi'>
|
|
|
|
|
<?= $this->partial('author/navi.phtml'); ?>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- //左侧导航 -->
|
|
|
|
|
|
|
|
|
|
<!-- 页面内容 -->
|
|
|
|
|
<div id="wapper">
|
|
|
|
|
<div id="tabs-controller">
|
|
|
|
|
<ul>
|
2012-03-27 10:17:51 +00:00
|
|
|
|
<li class="box-shadow <?php if(!$this->mdtitle) echo "active";?>"><a class="text-shadow" href="/author/version">所有版本概况</a></li>
|
2012-03-26 04:16:36 +00:00
|
|
|
|
<li class="box-shadow"><a class="text-shadow" href="/author/version/ac/bydata">逐数据浏览</a></li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
<div id="datalist">
|
|
|
|
|
<?php
|
2012-03-27 10:17:51 +00:00
|
|
|
|
if (count($this->paginator)):
|
2012-03-26 04:16:36 +00:00
|
|
|
|
if ($this->mdtitle) echo "<h2>元数据:".$this->mdtitle."</h2>";
|
|
|
|
|
echo "<ul>";
|
|
|
|
|
$autoindex=0;
|
|
|
|
|
foreach ($this->paginator as $item):
|
|
|
|
|
$autoindex++;?>
|
2012-03-27 10:17:51 +00:00
|
|
|
|
<li id="list_<?php echo $item['id'];?>">
|
|
|
|
|
<p><a href="/data/<?php echo $item['uuid'];?>" target="_blank"><?php echo $item['title'];?></a>
|
2012-03-26 04:16:36 +00:00
|
|
|
|
【<a href="/author/version/uuid/<?php echo $item['uuid']; ?>">查看此数据所有版本</a>】</p>
|
2012-03-27 10:17:51 +00:00
|
|
|
|
<p>版本创建时间: <?php echo date("Y-m-d H:i",strtotime($item['ts_created']));?>
|
|
|
|
|
<?php if ($item['userid']) :
|
|
|
|
|
echo "发布人: ".(empty($item['realname'])?$item['username']:$item['realname'])." 【";
|
|
|
|
|
else :
|
|
|
|
|
?>
|
|
|
|
|
【<a onclick="return confirm('是否确定删除该版本?');" href="javascript:action('delete','<?php echo $item['id'];?>');" class="more">删除</a>
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
<a onclick="return confirm('是否确定将这个版本恢复到geonetwork?');" href="javascript:action('restore','<?php echo $item['id'];?>');" class="more">恢复到geonetwork</a>
|
|
|
|
|
<a href="/author/version/ac/diff/id/<?php echo $item['id'];?>" class="more">与前一版对比</a>
|
2012-03-28 08:29:07 +00:00
|
|
|
|
<a onclick="$('#commit_submit').attr('onclick','commit(\'<?php echo $item['id'];?>\');');" href="#commitform" class="more inline">提交评审发布</a>
|
2012-03-27 10:17:51 +00:00
|
|
|
|
】</p>
|
|
|
|
|
<?php if ($item['changelog']) : ?>
|
|
|
|
|
<p><?php echo $item['changelog']; ?></p>
|
2012-03-26 04:16:36 +00:00
|
|
|
|
<?php endif; ?>
|
|
|
|
|
</li>
|
|
|
|
|
<?php endforeach;
|
|
|
|
|
echo "</ul>";
|
|
|
|
|
endif; ?>
|
|
|
|
|
<div class="pagenavi"><?= $this->paginator; ?></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- //页面内容 -->
|
|
|
|
|
<script>
|
|
|
|
|
$('#wapper').width($('body').width()-300);
|
2012-03-27 10:17:51 +00:00
|
|
|
|
function action(ac,id){
|
|
|
|
|
$.ajax({
|
|
|
|
|
'type':"POST",
|
|
|
|
|
'url':'/author/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();});}
|
2012-03-28 08:29:07 +00:00
|
|
|
|
if(typeof(data.commited)!='undefined')
|
|
|
|
|
{$('#changelog').val('');$('#commit_submit').attr('onclick','');}
|
2012-03-27 10:17:51 +00:00
|
|
|
|
}
|
|
|
|
|
else{
|
|
|
|
|
$.colorbox({'innerWidth':'50%','html':'<img src="/images/alert_big_warning.png" /><h4>出现错误,请稍候再试</h4>'});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
'timeout': 30000,
|
|
|
|
|
'error': function(){
|
|
|
|
|
$.colorbox({'innerWidth':'50%','html':'<img src="/images/alert_big_error.png" /><h4>处理中出现错误,请刷新页面后重试</h4>'});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
2012-03-28 08:29:07 +00:00
|
|
|
|
$(".inline").colorbox({inline:true, width:"50%"});
|
|
|
|
|
function commit(id){
|
|
|
|
|
action('commit&changelog='+$('#changelog').val(),id);
|
|
|
|
|
}
|
2012-03-27 10:17:51 +00:00
|
|
|
|
</script>
|
|
|
|
|
<div class="colorbox" style="display:none;">
|
2012-03-28 08:29:07 +00:00
|
|
|
|
<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>
|
2012-03-27 10:17:51 +00:00
|
|
|
|
<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>
|
2012-03-28 08:29:07 +00:00
|
|
|
|
</div>
|