#558 增加了从表中读取信息的功能
This commit is contained in:
parent
475f67534a
commit
c1f5c7de56
|
@ -1454,6 +1454,24 @@ class ServiceController extends Zend_Controller_Action
|
|||
echo $pagnation;
|
||||
}//文档页面相关数据
|
||||
|
||||
function refdatacountAction()
|
||||
{
|
||||
if(view::isXmlHttpRequest($this))
|
||||
{
|
||||
$id = (int)$this->_getParam('id');
|
||||
if($id < 1){
|
||||
echo 0;
|
||||
return;
|
||||
}
|
||||
$sql = "select count(md.id) as total from mdref mr
|
||||
right join normalmetadata md on md.uuid=mr.uuid
|
||||
where mr.refid=$id";
|
||||
$rs = $this->db->query($sql);
|
||||
$row = $rs->fetch();
|
||||
echo $row['total'];
|
||||
}
|
||||
}
|
||||
|
||||
function tagdatalistAction(){
|
||||
|
||||
$this->_helper->layout->disableLayout();
|
||||
|
|
|
@ -16,43 +16,66 @@ $this->headLink()->appendStylesheet('/css/colorbox.css');
|
|||
</div>
|
||||
<div class="span9">
|
||||
<div id="content">
|
||||
<?php if(!empty($this->paper['title'])){ ?>
|
||||
<h3><?php echo $this->paper['title']; ?></h3>
|
||||
<hr />
|
||||
<?php } ?>
|
||||
<?php if(count($this->author) > 0) {?>
|
||||
<h4>作者</h4>
|
||||
<ul>
|
||||
<?php foreach($this->author as $a) : ?>
|
||||
<li><a href="#"><?php echo $a['lastname'];if (!empty($a['firstname'])) echo ', '.$a['firstname']; ?></a></li>
|
||||
<li><?php echo $a['lastname'];if (!empty($a['firstname'])) echo ', '.$a['firstname']; ?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php if ($this->paper['abstract']) : ?>
|
||||
<strong>摘要:</strong>
|
||||
<?php echo $this->paper['abstract']; endif; if ($this->tag) : ?>
|
||||
<strong>关键词:</strong>
|
||||
<hr />
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($this->paper['abstract']){ ?>
|
||||
<h4>摘要</h4>
|
||||
<p><?php echo $this->paper['abstract']; ?></p>
|
||||
<hr />
|
||||
<?php } ?>
|
||||
|
||||
<?php if(count($this->tag) > 0) { ?>
|
||||
<h4>关键词</h4>
|
||||
<ul>
|
||||
<?php foreach($this->tag as $t) : ?>
|
||||
<li><a href="#"><?php echo $a['tag']; ?></a></li>
|
||||
<li><?php echo $t['tag']; ?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
<quote>
|
||||
<hr />
|
||||
<?php } ?>
|
||||
|
||||
<?php if(!empty($this->paper['reference'])) { ?>
|
||||
<h4>引用方式</h4>
|
||||
<blockquote>
|
||||
<?php echo $this->paper['reference']; ?>
|
||||
</quote>
|
||||
</blockquote>
|
||||
<hr />
|
||||
<?php } ?>
|
||||
|
||||
<div>
|
||||
<?php if (empty($this->paper['link']))
|
||||
<?php
|
||||
if (empty($this->paper['link']))
|
||||
{
|
||||
if(!empty($this->paper['attid']))
|
||||
{
|
||||
if(!empty($this->paper[‘attid’]))
|
||||
echo '<a href="/service/attach/id/'.$this->paper['attid'].'"><i class="icon-download text-success"></i>PDF下载</a>';
|
||||
}
|
||||
}else{
|
||||
echo '<a href="'.$this->paper['link'].'"><i class="icon-download text-success"></i>PDF下载</a>';
|
||||
}
|
||||
|
||||
|
||||
if (!empty($item['link'])) :
|
||||
echo ' <a href="'.$item['link'].'">下载</a>';
|
||||
endif;
|
||||
?>
|
||||
<a class="btn btn-mini btn-info" href="javascript:;" onclick="showdata('<?php echo $this->paper['id'];?>',0)">相关数据(共?条)</a>
|
||||
<a class="btn btn-mini btn-info" href="javascript:;" onclick="showdata('<?php echo $this->paper['id'];?>',0)">相关数据(共<span id="referenceDataCount">?</span>条)</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div><!-- content -->
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" >
|
||||
|
@ -69,4 +92,15 @@ function showdata(id,page){
|
|||
'success':function(html){$.colorbox({'html':html,'innerHeight':230});}
|
||||
});
|
||||
}
|
||||
function displayDataCount()
|
||||
{
|
||||
$.ajax({
|
||||
'type':"GET",
|
||||
'url':"/service/refdatacount/id/<?php echo $this->paper['id'];?>",
|
||||
'data':'',
|
||||
'dataType':'html',
|
||||
'success':function(html){$('#referenceDataCount').html(html)}
|
||||
});
|
||||
}
|
||||
displayDataCount();
|
||||
</script>
|
Loading…
Reference in New Issue