2014-09-02 05:20:24 +00:00
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
$this->headLink()->appendStylesheet('/css/author.css');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->headLink()->appendStylesheet('/js/lib/colorbox/colorbox.css');
$this->headScript()->appendFile('/js/lib/colorbox/jquery.colorbox-min.js');
$this->breadcrumb('< a href = "/" > 首页< / a > ');
$this->breadcrumb('< a href = "/admin" > 后台首页< / a > ');
$this->breadcrumb('< a href = "/admin/data" > 数据管理< / a > ');
$this->breadcrumb('新建元数据');
$this->breadcrumb()->setSeparator(' > ');
?>
< div class = "row" >
<!-- 左侧导航 -->
< div class = "hidden-sm hidden-xs col-md-2" >
<? = $this -> partial ( 'data/left.phtml' ); ?>
< / div >
<!-- //左侧导航 -->
<!-- 页面内容 -->
< div class = "col-md-10 col-sm-12" >
< div class = "form-group" >
< a class = "btn btn-primary btn-sm" href = "/admin/data/newdata" > 未提交数据列表< / a >
< a class = "btn btn-primary btn-sm" href = "/service/geonetwork?url=metadata.xmlinsert.form" > 导入元数据< / a >
< a class = "btn btn-primary btn-sm" href = "/admin/data/newdata/ac/add-by-template" > 根据模板新建元数据< / a >
< a class = "btn btn-primary btn-sm" href = "/admin/data/newdata/ac/add-by-data" > 根据已有数据新建元数据< / a >
< / div >
< div id = "datalistZ" >
<?php
if (count($this->paginator)):
echo "< ul class = list-unstyled > ";
$autoindex=0;
foreach ($this->paginator as $item):
$autoindex++;
?>
< li class = "well well-sm" >
< h4 > <?php echo $item [ 'title' ]; ?> < small > <?php echo $item [ 'username' ]; ?> ( <?php echo $item [ 'realname' ]; ?> ) </ small ></ h4 >
< a class = "label label-info" href = "/service/geonetwork?url=metadata.show?id= <?php echo $item [ 'id' ]; ?> " target = "_blank" >< span class = "glyphicon glyphicon-zoom-in" ></ span > 在geonetwork里查看</ a >
< a class = "label label-primary" href = "/service/geonetwork?url=metadata.edit?id= <?php echo $item [ 'id' ]; ?> " target = "_blank" >< span class = "glyphicon glyphicon-pencil" ></ span > 在geonetwork里修改</ a >
< a class = "label label-danger" href = "/service/geonetwork?url=metadata.delete?id= <?php echo $item [ 'id' ]; ?> " target = "_blank" >< span class = "glyphicon glyphicon-remove" ></ span > 删除此条数据</ a >
< a class = "label label-primary" onclick = "validate( <?php echo $item [ 'id' ]; ?> );" class = "more inline" >< span class = "glyphicon glyphicon-search" ></ span > 检查元数据错误</ a >
< a class = "label label-success more inline" onclick = "$('#commit_submit').attr('onclick','commit(\' <?php echo $item [ 'id' ]; ?> \');');" href = "#commitform" >< span class = "glyphicon glyphicon-ok" ></ span > 提交评审发布</ a >
< span class = "text-primary" > 版本数:<? = $item [ 'version_count' ] ?> 个</ span >
< / li >
<?php
endforeach;
echo "< / ul > ";
else :
echo "< p > 您当前没有未提交的数据。< / p > ";
endif; ?>
< / div >
< div class = "pagenavi" > <? = $this -> paginator ; ?> </ div >
< / div >
< / div >
<!-- //页面内容 -->
< script >
$('#wapper').width($('body').width()-300);
2012-05-31 14:16:11 +00:00
function action(ac,id){
$.ajax({
'type':"POST",
'url':'/admin/data/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 > '});
}
});
}
2014-09-02 05:20:24 +00:00
$(".inline").colorbox({inline:true, width:"50%", height:"50%"});
2012-05-31 14:16:11 +00:00
$(".iframe").colorbox({iframe:true, width:"80%", height:"80%"});
function commit(id){
action('commit&changelog='+$('#changelog').val(),id);
}
2012-12-11 11:39:13 +00:00
function validate(id){
action('validate',id);
}
2012-05-31 14:16:11 +00:00
< / script >
< div class = "colorbox" style = "display:none;" >
< div id = "commitform" >
< form >
< p >
< label > 简要功能:< / label > < br / >
2014-09-02 05:20:24 +00:00
< textarea rows = "12" class = "full" style = "width:100%;" id = "changelog" > < / textarea >
2012-05-31 14:16:11 +00:00
< br / > < small > 请输入此数据的简要功能和特色< / small >
< / p >
2014-09-02 05:20:24 +00:00
< input type = "button" onclick = "" id = "commit_submit" class = "btn btn-success pull-right" value = "提交" / >
2012-05-31 14:16:11 +00:00
< / 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 >