140 lines
5.4 KiB
PHTML
140 lines
5.4 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->theme->AppendPlus($this,'colorbox');
|
|
$this->nav[] = array('link'=>"/heihe/submit",'title'=>'数据汇交');
|
|
?>
|
|
<?= $this->render('breadcrumbs.phtml') ?>
|
|
<div class="row">
|
|
<div class="span2">
|
|
<?= $this->partial('heihe/navi.phtml'); ?>
|
|
</div>
|
|
<div class="span10">
|
|
<div>
|
|
<ul class="nav nav-tabs">
|
|
<li class="active"><a href="/heihe/submit/ac/unsubmit">未提交元数据</a></li>
|
|
<li><a href="/heihe/submit/ac/newdata">根据模板创建元数据</a></li>
|
|
<li><a href="/heihe/submit/ac/newdata/do/add">根据已有数据创建元数据</a></li>
|
|
<li><a class="iframe" href="/service/geonetwork?url=metadata.xmlinsert.form">导入元数据</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 class="unstyled">';
|
|
$autoindex=0;
|
|
foreach ($this->paginator as $item):
|
|
$autoindex++;
|
|
?>
|
|
<li class="well well-small">
|
|
<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>
|
|
</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://ftp2.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>
|