142 lines
5.3 KiB
PHTML
142 lines
5.3 KiB
PHTML
<?php
|
|
$this->headTitle($this->config->title->site);
|
|
$this->headTitle($this->config->title->data);
|
|
$this->headTitle()->setSeparator(' - ');
|
|
$this->headLink()->appendStylesheet('/css/water.css');
|
|
$this->breadcrumb('<a href="/">首页</a>');
|
|
$this->breadcrumb('<a href="/data">'.$this->config->title->data.'</a>');
|
|
$this->breadcrumb('<a href="/heihe/">'.$this->config->title->heihe.'</a>');
|
|
$this->breadcrumb('数据列表');
|
|
$this->breadcrumb()->setSeparator(' > ');
|
|
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
|
|
$this->headScript()->appendFile('/js/jquery.colorbox-min.js');
|
|
$this->headLink()->appendStylesheet('/css/colorbox.css');
|
|
?>
|
|
|
|
<div id='sidebar'>
|
|
<div id='leftnavi'>
|
|
<?= $this->partial('heihe/navi.phtml'); ?>
|
|
</div>
|
|
</div>
|
|
<div id='right'>
|
|
<div class="clear"> </div>
|
|
<div id="tabs-controller">
|
|
<ul>
|
|
<li class="box-shadow"><a class="text-shadow" href="/heihe/submit/ac/newdata">根据模板创建元数据</a></li>
|
|
<li class="box-shadow"><a class="text-shadow" href="/heihe/submit/ac/newdata/do/add">根据已有数据创建元数据</a></li>
|
|
<li class="box-shadow"><a class="text-shadow iframe" href="/service/geonetwork?url=metadata.xmlinsert.form">导入元数据</a></li>
|
|
<li class="box-shadow active"><a class="text-shadow" href="/heihe/submit/ac/unsubmit">未提交元数据</a></li>
|
|
</ul>
|
|
</div>
|
|
<?php if(!empty($this->error)) {?>
|
|
<div id="intro"><?php echo $this->error;?></div>
|
|
<?php }else{?>
|
|
<div id="datalist">
|
|
<?php
|
|
if (count($this->paginator)):
|
|
echo "<ul>";
|
|
$autoindex=0;
|
|
foreach ($this->paginator as $item):
|
|
$autoindex++;
|
|
?>
|
|
<li>
|
|
<p><span class="title"><?php echo $item['title'];?></span> </p>
|
|
<p>【<a href="/service/geonetwork?url=metadata.show?id=<?php echo $item['id']; ?>" target="_blank">在geonetwork里查看</a>
|
|
| <a href="/service/geonetwork?url=metadata.edit?id=<?php echo $item['id']; ?>" target="_blank">在geonetwork里修改</a>
|
|
| <a href="/service/geonetwork?url=metadata.delete?id=<?php echo $item['id']; ?>" target="_blank">删除此条数据</a>
|
|
| <a href="javascript:;" onclick="getFtp('<?php echo $item['uuid'];?>')">FTP数据上传</a>
|
|
| <a onclick="$('#commit_submit').attr('onclick','commit(\'<?php echo $item['id'];?>\');');" href="#commitform" class="inline">提交评审发布</a>
|
|
】</p>
|
|
</li>
|
|
<?php
|
|
endforeach;
|
|
echo "</ul>";
|
|
else :
|
|
echo "<p>您当前没有未提交的数据。</p>";
|
|
endif; ?>
|
|
</div>
|
|
<div class="pagenavi"><?= $this->paginator; ?></div>
|
|
<?php } ?>
|
|
</div>
|
|
<script>
|
|
$(".iframe").colorbox({iframe:true, width:"80%",height:"80%"});
|
|
function action(ac,id){
|
|
$.ajax({
|
|
'type':"POST",
|
|
'url':'/heihe/submit/ac/unsubmit',
|
|
'data':'do='+ 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{
|
|
Alert('出现错误,请稍候再试</h4>');
|
|
}
|
|
},
|
|
'timeout': 30000,
|
|
'error': function(){
|
|
Alert('处理中出现错误,请刷新页面后重试</h4>');
|
|
}
|
|
});
|
|
}
|
|
function getFtp(uuid){
|
|
$.ajax({
|
|
'type':"POST",
|
|
'url':'/heihe/submit/ac/ftp/uuid/'+uuid,
|
|
'data':'',
|
|
'success':function(data){
|
|
if (typeof(data)=='object')
|
|
{
|
|
if(typeof(data.error)!='undefined')
|
|
{Alert(data.error);return false;}
|
|
if(typeof(data.statu)!='undefined')
|
|
{
|
|
if(data.statu > 0)
|
|
{
|
|
var html = '<p>临时FTP帐号信息<b>(此帐号仅对应当前数据集!)</b></p><p>ftp://westdc.westgis.ac.cn/</p>'+
|
|
'<p>用户名:'+data.user+
|
|
'</p><p>密码:'+data.passwd+'</p>'
|
|
+'<p><a href="ftp://'+data.user+':'+data.passwd+'@westdc.westgis.ac.cn/">或直接点击此链接</a></p>';
|
|
Alert(html);
|
|
}
|
|
}
|
|
}
|
|
else{
|
|
Alert('出现错误,请稍候再试</h4>');
|
|
}
|
|
},
|
|
'timeout': 30000,
|
|
'error': function(){
|
|
Alert('处理中出现错误,请刷新页面后重试</h4>');
|
|
}
|
|
});
|
|
}
|
|
function Alert(html){
|
|
$.colorbox({'innerWidth':'50%','html':'<h4>'+html+'</h4>'});
|
|
}
|
|
$(".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" style="overflow:hidden;width:100%;">
|
|
<form style="width:99%;">
|
|
<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>
|