111 lines
5.4 KiB
PHTML
111 lines
5.4 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');
|
|
$this->theme->AppendModel($this,'admin-data-ref');
|
|
?>
|
|
<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; ?>" />
|
|
<input type="hidden" name="order" value="<?php if(!empty($this->search_order)) echo $this->search_order; ?>" />
|
|
<input type="hidden" name="sort" value="<?php if(!empty($this->search_sort)) echo $this->search_sort; ?>" />
|
|
<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{ ?>
|
|
|
|
<?php if($this->ac == 'westdc'){ ?>
|
|
<button type="button" class="btn btn-success" onclick="$('#mdref')[0].reset();mdref.edit('','','e31f5ea7-a4af-4ae3-9ac1-1a84132c4338',0,0)">添加数据中心文献</button>
|
|
<?php } ?>
|
|
|
|
<?php if(!empty($this->years)) { ?>
|
|
<?php foreach($this->years as $k=>$v){ ?>
|
|
<a class="btn btn-info" href="?field[year]=<?= $v['year'] ?>"><?= empty($v['year']) ? "未知":$v['year'] ?>(<?= $v['num'] ?>)</a>
|
|
<?php } ?>
|
|
<?php } ?>
|
|
|
|
<div id="datalist">
|
|
<?php if (count($this->paginator)): ?>
|
|
<table class="table table-bordered table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th>标题
|
|
<a href="?order=title&sort=ASC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-up"></i></a>
|
|
<a href="?order=title&sort=DESC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-down"></i></a>
|
|
年份
|
|
<a href="?order=year&sort=ASC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-up"></i></a>
|
|
<a href="?order=year&sort=DESC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-down"></i></a>
|
|
</th>
|
|
<th>记录创建
|
|
<a href="?order=ts_created&sort=ASC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-up"></i></a>
|
|
<a href="?order=ts_created&sort=DESC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-down"></i></a>
|
|
</th>
|
|
<th width="140">操作</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
if($this->page > 1)
|
|
{
|
|
$autoindex = ($this->page - 1) * $this->pagelimit;
|
|
}else{
|
|
$autoindex=0;
|
|
}
|
|
foreach ($this->paginator as $item):
|
|
$autoindex++;?>
|
|
<tr id="DataLine_<?= $item['id']?>">
|
|
<td>
|
|
[<?= $autoindex ?>]
|
|
<?php if ($item['ris']) :
|
|
echo $item['reference'];
|
|
else :
|
|
?>
|
|
{<?php $authors = $this->reference->getAuthorByReference($item['id'],true); echo count($authors) ? join(",",$authors):'<font color="#CC0000">未知作者</font>'; ?>}
|
|
{<?= empty($item['title']) ? '<font color="#CC0000">未知标题</font>':$item['title'] ?>}
|
|
{<?= empty($item['publisher']) ? '<font color="#CC0000">未知期刊</font>':$item['publisher'] ?>}
|
|
{<?= empty($item['year']) ? '<font color="#CC0000">未知年份</font>':$item['year'] ?>}
|
|
<?php endif; ?>
|
|
</td>
|
|
<td><?= date("Y-m-d H:i",strtotime($item['ts_created'])) ?></td>
|
|
<td>
|
|
<a href="/admin/data/ref/ac/add/id/<?= $item['id']?>">编辑</a>
|
|
<a href="/admin/data/ref/ac/singleris/id/<?= $item['id'] ?>">RIS编辑</a>
|
|
<a href="/admin/data/ref/ac/data/id/<?= $item['id'] ?>">数据</a>(<a href="javascript:void(0);" onclick="$('#mdref')[0].reset();mdref.edit('',<?= $item['id']?>,'',0,0)">+</a>)
|
|
<a href="/admin/data/ref/ac/deleteref/id/<?= $item['id']?>">删除</a>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
<?php endif; ?>
|
|
<div class="pagenavi"><?= $this->paginator; ?></div>
|
|
</div>
|
|
<?php } ?>
|
|
</div>
|
|
</div>
|
|
<!-- //页面内容 -->
|
|
<?= $this->partial('data/ref-mdref-form.phtml',array('referenceType'=>$this->referenceType)); ?> |