105 lines
3.2 KiB
PHTML
105 lines
3.2 KiB
PHTML
<?php
|
|
$this->headTitle($this->config->title->site);
|
|
$this->headTitle('后台管理');
|
|
$this->headTitle()->setSeparator(' - ');
|
|
$this->breadcrumb('<a href="/">首页</a>');
|
|
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
|
$this->breadcrumb('文献管理');
|
|
$this->breadcrumb()->setSeparator(' > ');
|
|
$this->theme->AppendPlus($this,'colorbox');
|
|
$this->theme->AppendPlus($this,'admin_plugin');
|
|
?>
|
|
<style>
|
|
table thead tr th {background:#EBF2F6;}
|
|
</style>
|
|
<div class="row-fluid">
|
|
<div class="span2">
|
|
<?= $this->partial('data/left.phtml'); ?>
|
|
</div>
|
|
<div class="span10">
|
|
<div>
|
|
<?= $this->partial('data/ref-nav.phtml',array('ac'=>$this->ac)); ?>
|
|
</div>
|
|
<div>
|
|
<div class="input-append">
|
|
<form id="datasearch" class="search_form" action="">
|
|
<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>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<?php if(!empty($this->error)) { ?>
|
|
<?= $this->error ?>
|
|
<?php } ?>
|
|
<?php if(!empty($this->msg)) { ?>
|
|
<?= $this->msg ?>
|
|
<?php } else{ ?>
|
|
<div id="datalist">
|
|
<?php if (count($this->paginator)): ?>
|
|
<table class="table table-bordered table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th>文件名</th>
|
|
<th>状态</th>
|
|
<th width="140">操作</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php $autoindex=0;
|
|
foreach ($this->paginator as $item):
|
|
$autoindex++;?>
|
|
<tr id="DataLine_<?= $item['id']?>">
|
|
<td><?= $item['realname'] ?></td>
|
|
<td><?= empty($item['attid']) ? '<font color="#CC0000">未编辑</font>':"已编辑" ?></td>
|
|
<td>
|
|
<a class="file-editor" href="/admin/data/ref/ac/add/<?= empty($item['attid']) ? 'attid/'.$item['id'] : 'id/'.$item['refid']?>">编辑</a>
|
|
<a href="javascript:void(0);" onclick="file.delete(<?= $item['id']?>)" id="delbtn_<?= $item['id']?>">删除</a>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
<?php endif; ?>
|
|
<div class="pagenavi"><?= $this->paginator; ?></div>
|
|
</div>
|
|
<?php } ?>
|
|
</div>
|
|
</div>
|
|
<!-- //页面内容 -->
|
|
<script>
|
|
$(document).ready(function(e) {
|
|
|
|
});
|
|
var file = {
|
|
delete : function(id){
|
|
if(confirm("是否确定删除?") == false)
|
|
{
|
|
return false;
|
|
}
|
|
$.ajax({
|
|
'type':"POST",
|
|
'url':'/admin/data/ref/ac/delete',
|
|
'data':'attid=' + id,
|
|
'success':function(data){
|
|
if(typeof(data) == 'undefined')
|
|
{
|
|
alert("数据源错误,请联系管理员");
|
|
return false;
|
|
}
|
|
|
|
if(!$.isEmptyObject(data.error))
|
|
{
|
|
alert(data.error);
|
|
return false;
|
|
}
|
|
|
|
$('#DataLine_'+id).fadeOut();
|
|
},
|
|
'timeout': 30000,
|
|
'error': function(){
|
|
alert('附件删除出错');
|
|
}
|
|
});
|
|
}
|
|
}
|
|
</script>
|