2012-03-28 10:23:32 +00:00
|
|
|
<?php
|
|
|
|
$this->headTitle($this->config->title->site);
|
|
|
|
$this->headTitle($this->config->title->author);
|
|
|
|
$this->headTitle()->setSeparator(' - ');
|
2012-04-03 03:15:07 +00:00
|
|
|
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
|
|
|
|
$this->headScript()->appendFile('/js/jquery.colorbox-min.js');
|
|
|
|
$this->headLink()->appendStylesheet('/css/author.css');
|
|
|
|
$this->headLink()->appendStylesheet('/css/colorbox.css');
|
2012-03-28 10:23:32 +00:00
|
|
|
$this->breadcrumb('<a href="/">首页</a>');
|
2012-05-10 15:13:17 +00:00
|
|
|
$this->breadcrumb('<a href="/author">'.$this->config->title->author.'</a>');
|
|
|
|
$this->breadcrumb('新建数据');
|
2012-03-28 10:23:32 +00:00
|
|
|
$this->breadcrumb()->setSeparator(' > ');
|
|
|
|
?>
|
|
|
|
<!-- 左侧导航 -->
|
|
|
|
<div id='sidebar'>
|
|
|
|
<div id='leftnavi'>
|
|
|
|
<?= $this->partial('author/navi.phtml'); ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- //左侧导航 -->
|
|
|
|
|
|
|
|
<!-- 页面内容 -->
|
|
|
|
<div id="wapper">
|
|
|
|
<div id="tabs-controller">
|
|
|
|
<ul>
|
|
|
|
<li class="box-shadow active"><a class="text-shadow" href="/author/newdata">未提交数据列表</a></li>
|
2012-04-17 09:16:00 +00:00
|
|
|
<li class="box-shadow"><a class="text-shadow iframe" href="/service/geonetwork?url=metadata.xmlinsert.form">导入元数据</a></li>
|
2012-05-04 16:29:22 +00:00
|
|
|
<li class="box-shadow"><a class="text-shadow" href="/author/newdata/ac/add-by-template">根据模板新建元数据</a></li>
|
2012-05-04 16:30:00 +00:00
|
|
|
<li class="box-shadow"><a class="text-shadow" href="/author/newdata/ac/add-by-data">根据已有数据新建元数据</a></li>
|
2012-03-28 10:23:32 +00:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<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>
|
2012-11-17 03:24:09 +00:00
|
|
|
【<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>
|
2012-04-17 09:18:26 +00:00
|
|
|
| <a href="/service/geonetwork?url=metadata.delete?id=<?php echo $item['id']; ?>">删除此条数据</a>
|
2012-11-16 15:51:28 +00:00
|
|
|
| <a href="javascript:;" onclick="getFtp('<?php echo $item['uuid'];?>')">FTP数据上传</a>
|
2012-04-03 03:15:07 +00:00
|
|
|
| <a onclick="$('#commit_submit').attr('onclick','commit(\'<?php echo $item['id'];?>\');');" href="#commitform" class="more inline">提交评审发布</a>
|
|
|
|
】</p>
|
2012-03-28 10:23:32 +00:00
|
|
|
</li>
|
|
|
|
<?php
|
|
|
|
endforeach;
|
|
|
|
echo "</ul>";
|
|
|
|
else :
|
|
|
|
echo "<p>您当前没有未提交的数据。</p>";
|
|
|
|
endif; ?>
|
|
|
|
</div>
|
|
|
|
<div class="pagenavi"><?= $this->paginator; ?></div>
|
|
|
|
</div>
|
|
|
|
<!-- //页面内容 -->
|
|
|
|
<script>
|
|
|
|
$('#wapper').width($('body').width()-300);
|
|
|
|
|
2012-04-03 03:15:07 +00:00
|
|
|
function action(ac,id){
|
|
|
|
$.ajax({
|
|
|
|
'type':"POST",
|
|
|
|
'url':'/author/newdata/',
|
|
|
|
'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{
|
|
|
|
$.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>'});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
$(".inline").colorbox({inline:true, width:"50%"});
|
2012-04-17 09:16:00 +00:00
|
|
|
$(".iframe").colorbox({iframe:true, width:"80%", height:"80%"});
|
2012-04-03 03:15:07 +00:00
|
|
|
function commit(id){
|
|
|
|
action('commit&changelog='+$('#changelog').val(),id);
|
|
|
|
}
|
2012-11-16 15:51:28 +00:00
|
|
|
function getFtp(uuid){
|
|
|
|
$.ajax({
|
|
|
|
'type':"POST",
|
|
|
|
'url':'/author/newdata/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://ftp1.westgis.ac.cn/</p>'+
|
|
|
|
'<p>用户名:'+data.user+
|
|
|
|
'</p><p>密码:'+data.passwd+'</p>'
|
|
|
|
+'<p><a href="ftp://'+data.user+':'+data.passwd+'@ftp1.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>'});
|
|
|
|
}
|
2012-04-03 03:15:07 +00:00
|
|
|
</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>
|