完善DOI成功功能
This commit is contained in:
parent
8476c17bab
commit
f0eafe0bc3
|
@ -3722,6 +3722,7 @@ class Admin_DataController extends Zend_Controller_Action
|
||||||
$this->_helper->layout->disableLayout();
|
$this->_helper->layout->disableLayout();
|
||||||
$this->_helper->viewRenderer->setNoRender();
|
$this->_helper->viewRenderer->setNoRender();
|
||||||
$this->jsonexit(array('success'=>'成功申请'));
|
$this->jsonexit(array('success'=>'成功申请'));
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}//doi
|
}//doi
|
||||||
|
|
||||||
|
|
|
@ -1,81 +1,168 @@
|
||||||
<?php
|
<?php
|
||||||
$this->headTitle($this->config->title->site);
|
$this->headTitle($this->config->title->site);
|
||||||
$this->headTitle($this->config->title->author);
|
$this->headTitle($this->config->title->author);
|
||||||
$this->headTitle()->setSeparator(' - ');
|
$this->headTitle()->setSeparator(' - ');
|
||||||
$this->breadcrumb('<a href="/">首页</a>');
|
$this->breadcrumb('<a href="/">首页</a>');
|
||||||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||||
$this->breadcrumb('DOI');
|
$this->breadcrumb('DOI');
|
||||||
$this->breadcrumb()->setSeparator(' > ');
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
$this->theme->AppendPlus($this,'colorbox');
|
$this->theme->AppendPlus($this,'colorbox');
|
||||||
$this->theme->AppendPlus($this,'admin_plugin');
|
$this->theme->AppendPlus($this,'admin_plugin');
|
||||||
?>
|
?>
|
||||||
<style>
|
<style>
|
||||||
table thead tr th {background:#EBF2F6;}
|
table thead tr th {background:#EBF2F6;}
|
||||||
</style>
|
</style>
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span2">
|
<div class="span2">
|
||||||
<?= $this->partial('data/left.phtml'); ?>
|
<?= $this->partial('data/left.phtml'); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="span10">
|
<div class="span10">
|
||||||
<div>
|
<div>
|
||||||
<ul class="nav nav-tabs">
|
<ul class="nav nav-tabs">
|
||||||
<li class="active"><a href="/admin/data/doi">浏览所有</a></li>
|
<li class="active"><a href="/admin/data/doi">浏览所有</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div class="input-append">
|
<div class="input-append">
|
||||||
<form id="datasearch" class="search_form" action="">
|
<form id="datasearch" class="search_form" action="">
|
||||||
<input type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" />
|
<input type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" />
|
||||||
<button type="submit" class="btn" id="search_btn">搜索</button>
|
<button type="submit" class="btn" id="search_btn">搜索</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php if(!empty($this->error)) { ?>
|
<?php if(!empty($this->error)) { ?>
|
||||||
<?= $this->error ?>
|
<?= $this->error ?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if(!empty($this->msg)) { ?>
|
<?php if(!empty($this->msg)) { ?>
|
||||||
<?= $this->msg ?>
|
<?= $this->msg ?>
|
||||||
<?php } else{ ?>
|
<?php } else{ ?>
|
||||||
<div id="datalist">
|
<div id="datalist">
|
||||||
<?php if (count($this->paginator)): ?>
|
<?php if (count($this->paginator)): ?>
|
||||||
<table class="table table-bordered table-striped">
|
<table class="table table-bordered table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>状态</th>
|
<th>状态</th>
|
||||||
<th>元数据</th>
|
<th>元数据</th>
|
||||||
<th>DOI</th>
|
<th>DOI</th>
|
||||||
<th width="140">操作</th>
|
<th width="140">操作</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php $autoindex=0;
|
<?php $autoindex=0;
|
||||||
foreach ($this->paginator as $item):
|
foreach ($this->paginator as $item):
|
||||||
$autoindex++;?>
|
$autoindex++;?>
|
||||||
<tr id="DataLine_<?= $item['id']?>">
|
<tr id="DataLine_<?= $item['id']?>">
|
||||||
<td><?php if (!empty($item['ts_published'])) { echo '已发布'; } else if (!empty($item['ts_submitted'])) { echo '已提交'; } ?></td>
|
<td><?php if (!empty($item['ts_published'])) { echo '已发布'; } else if (!empty($item['ts_submitted'])) { echo '已提交'; } ?></td>
|
||||||
<td><a href="/data/<?= $item['uuid'] ?>"><?= $item['title'] ?></a></td>
|
<td><a href="/data/<?= $item['uuid'] ?>"><?= $item['title'] ?></a></td>
|
||||||
<td><?= $item['doi'] ?></td>
|
<td><?= $item['doi'] ?></td>
|
||||||
<td>
|
<td>
|
||||||
<a href="/admin/data/doi/ac/edit/uuid/<?= $item['uuid']?>">编辑</a>
|
<a href="/admin/data/doi/ac/edit/uuid/<?= $item['uuid']?>">编辑</a>
|
||||||
<a href="/admin/data/doi/ac/convert/uuid/<?= $item['uuid']?>">导出</a>
|
<a href="/admin/data/doi/ac/convert/uuid/<?= $item['uuid']?>">导出</a>
|
||||||
<a href="/admin/data/doi/ac/verified/uuid/<?= $item['uuid']?>">成功</a>
|
<a href="javascript:void(0);" rel="/admin/data/doi/ac/verified/uuid/<?= $item['uuid']?>" class="verified_btn">成功</a>
|
||||||
<a href="javascript:void(0);" onclick="onedel(<?= $item['id']?>)" id="delbtn_<?= $item['id']?>">删除</a>
|
<a href="javascript:void(0);" onclick="onedel(<?= $item['id']?>)" id="delbtn_<?= $item['id']?>">删除</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- //页面内容 -->
|
<!-- //页面内容 -->
|
||||||
<script>
|
<script>
|
||||||
var info = {
|
var info = {
|
||||||
btn_prefix : "delbtn_",
|
btn_prefix : "delbtn_",
|
||||||
item_prefix : "DataLine_",
|
item_prefix : "DataLine_",
|
||||||
url : "/admin/data/doi/ac/del"
|
url : "/admin/data/doi/ac/del"
|
||||||
}
|
}
|
||||||
</script>
|
$(document).ready(function(e) {
|
||||||
|
$('.verified_btn').click(function(e) {
|
||||||
|
$(this).ajaxmsg({
|
||||||
|
callback:function(){window.location.reload();}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
(function( $ ){
|
||||||
|
|
||||||
|
$.fn.ajaxmsg = function( options ) {
|
||||||
|
|
||||||
|
var settings = $.extend( {
|
||||||
|
url:'',
|
||||||
|
callback : '',
|
||||||
|
}, options);
|
||||||
|
|
||||||
|
var methods = {
|
||||||
|
msg : function(id)
|
||||||
|
{
|
||||||
|
methods.submited();
|
||||||
|
},
|
||||||
|
creatWindow : function(content){
|
||||||
|
$.colorbox({
|
||||||
|
initialHeight: '0',
|
||||||
|
initialWidth: '0',
|
||||||
|
html: methods.dialog(content),
|
||||||
|
opacity: '0.3',
|
||||||
|
onComplete: function(){
|
||||||
|
$('.confirm_yes').click(function(e){
|
||||||
|
e.preventDefault();
|
||||||
|
if(typeof(settings.callback)=='function')
|
||||||
|
{
|
||||||
|
settings.callback();
|
||||||
|
}
|
||||||
|
$.colorbox.close();
|
||||||
|
});
|
||||||
|
$('.confirm_no').click(function(e){
|
||||||
|
e.preventDefault();
|
||||||
|
$.colorbox.close();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
submited : function(){
|
||||||
|
$.ajax({
|
||||||
|
'type':"POST",
|
||||||
|
'url':settings.url,
|
||||||
|
'data':'',
|
||||||
|
'success':function(data){
|
||||||
|
if (typeof(data)=='object')
|
||||||
|
{
|
||||||
|
if(typeof(data.error)!='undefined')
|
||||||
|
{alert(data.error);}
|
||||||
|
if(typeof(data.success)!='undefined')
|
||||||
|
{
|
||||||
|
methods.creatWindow(data.success);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
alert('出现错误,请稍候再试');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'timeout': 30000,
|
||||||
|
'error': function(){
|
||||||
|
alert('出现错误,请刷新后重试');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
dialog : function(content){
|
||||||
|
HTML = '<div class=""><div class="modal-header"><h3>提示信息</h3></div>'
|
||||||
|
+ '<div class="modal-body"><div class=" span5">'+content+'</div></div>'
|
||||||
|
+ '<div class="modal-footer"><a href="javascript:void(0);" class="btn btn-primary confirm_yes">确定</a></div></div>';
|
||||||
|
return HTML;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.each(function() {
|
||||||
|
settings.url = $(this).attr('rel');
|
||||||
|
if(settings.url == '')
|
||||||
|
{
|
||||||
|
alert('参数错误');
|
||||||
|
}
|
||||||
|
methods.msg();
|
||||||
|
});
|
||||||
|
|
||||||
|
};
|
||||||
|
})( jQuery );
|
||||||
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue