101 lines
4.0 KiB
PHTML
101 lines
4.0 KiB
PHTML
|
<?php
|
||
|
$this->headTitle($this->config->title->site);
|
||
|
$this->headTitle($this->config->title->author);
|
||
|
$this->headTitle()->setSeparator(' - ');
|
||
|
$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');
|
||
|
$this->breadcrumb('<a href="/">首页</a>');
|
||
|
$this->breadcrumb('<a href="/author">数据管理</a>');
|
||
|
$this->breadcrumb('数据文献管理');
|
||
|
$this->breadcrumb()->setSeparator(' > ');
|
||
|
?>
|
||
|
<div id="page">
|
||
|
<div class="subnav">
|
||
|
<?= $this->partial('author/navi.phtml'); ?>
|
||
|
</div>
|
||
|
|
||
|
<!-- 页面内容 -->
|
||
|
<div id="wapper">
|
||
|
<div id="tabs-controller">
|
||
|
<ul>
|
||
|
<li class="box-shadow"><a class="text-shadow" href="/author/literature/">所有文献概况</a></li>
|
||
|
<li class="box-shadow"><a class="text-shadow" href="/author/literature/ac/byliter">逐文献浏览</a></li>
|
||
|
<li class="box-shadow active"><a class="text-shadow" href="/author/literature/ac/bydata">逐数据浏览</a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<p>请输入元数据标题关键字进行搜索</p>
|
||
|
<form id="datasearch" class="search_form" action="/author/literature/ac/bydata">
|
||
|
<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 id="datalist">
|
||
|
<?php
|
||
|
if (count($this->paginator)):
|
||
|
echo "<ul>";
|
||
|
$autoindex=0;
|
||
|
foreach ($this->paginator as $item):
|
||
|
$autoindex++;?>
|
||
|
<li id="list_<?php echo $item['id'].$item['uuid'];?>">
|
||
|
<p><a href="/data/<?php echo $item['uuid'];?>" target="_blank"><?php echo $item['title'];?></a></p>
|
||
|
<p>共有数据文献<?php echo $item['c'];?>篇。
|
||
|
【 <a href="/author/literature/uuid/<?php echo $item['uuid'];?>">查看详细</a>
|
||
|
| <a onclick="$('#commit_submit').attr('onclick','commit(\'<?php echo $item['uuid'];?>\');');" href="#addform" class="more inline">添加文献</a>
|
||
|
】</p>
|
||
|
</li>
|
||
|
<?php endforeach;
|
||
|
echo "</ul>";
|
||
|
endif; ?>
|
||
|
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<!-- //页面内容 -->
|
||
|
</div>
|
||
|
<script>
|
||
|
function action(ac,uuid){
|
||
|
$.ajax({
|
||
|
'type':"POST",
|
||
|
'url':'/author/literature/',
|
||
|
'data':'ac='+ ac +'&uuid='+uuid,
|
||
|
'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')
|
||
|
{window.location.reload();}
|
||
|
}
|
||
|
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%"});
|
||
|
function commit(id){
|
||
|
action('add&ref='+$('#ref').val()+'&reftype='+$('#reftype').val(),id);
|
||
|
}
|
||
|
</script>
|
||
|
<div class="colorbox" style="display:none;">
|
||
|
<div id="addform">
|
||
|
<form>
|
||
|
<p>
|
||
|
<label>文献引用信息:</label><br />
|
||
|
<textarea class="full" style="height:40px;" id="ref"></textarea>
|
||
|
<input type="radio" id="reftype" name="reftype" value="0" checked />数据作者的文献
|
||
|
<input type="radio" id="reftype" name="reftype" value="1" />数据用户的文献
|
||
|
</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>
|