fix #567, 限定施引文献的显示数量
This commit is contained in:
parent
69d3a94ef8
commit
1edecd120a
|
@ -618,7 +618,7 @@ class DataController extends Zend_Controller_Action
|
||||||
$sql=$this->db->quoteInto($sql,$uuid);
|
$sql=$this->db->quoteInto($sql,$uuid);
|
||||||
$this->view->themeref=$this->db->fetchAll($sql);
|
$this->view->themeref=$this->db->fetchAll($sql);
|
||||||
//用户发表文献
|
//用户发表文献
|
||||||
$sql="select r.* from reference r left join mdref m on m.refid=r.id where m.uuid=? and m.reftype=1";
|
$sql="select r.* from reference r left join mdref m on m.refid=r.id where m.uuid=? and m.reftype=1 order by r.language asc,r.year desc,r.ts_created desc limit 15";
|
||||||
$sql=$this->db->quoteInto($sql,$uuid);
|
$sql=$this->db->quoteInto($sql,$uuid);
|
||||||
$this->view->userref=$this->db->fetchAll($sql);
|
$this->view->userref=$this->db->fetchAll($sql);
|
||||||
//多篇引用形式:hiwater
|
//多篇引用形式:hiwater
|
||||||
|
|
|
@ -42,6 +42,15 @@ class KnowledgeController extends Zend_Controller_Action
|
||||||
|
|
||||||
function userAction()
|
function userAction()
|
||||||
{
|
{
|
||||||
|
$uuid=$this->_request->getParam('uuid');
|
||||||
|
if (preg_match('/([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12})/',$uuid))
|
||||||
|
{
|
||||||
|
$sql="select uuid,title from metadata where uuid='$uuid'";
|
||||||
|
$sth = $this->db->prepare($sql);
|
||||||
|
$sth->execute();
|
||||||
|
$this->view->md = $sth->fetch();
|
||||||
|
$sql="select * from reference where id in (select refid from mdref where reftype=1 and uuid='$uuid') order by year desc, reference desc";
|
||||||
|
} else
|
||||||
$sql="select * from reference where id in (select refid from mdref where reftype=1 and uuid in (select uuid from normalmetadata)) order by year desc, reference desc";
|
$sql="select * from reference where id in (select refid from mdref where reftype=1 and uuid in (select uuid from normalmetadata)) order by year desc, reference desc";
|
||||||
$sth = $this->db->prepare($sql);
|
$sth = $this->db->prepare($sql);
|
||||||
$sth->execute();
|
$sth->execute();
|
||||||
|
|
|
@ -100,6 +100,10 @@ if ($md->title_en) echo '<br />'.$this->escape($md->title_en);?>
|
||||||
}
|
}
|
||||||
echo "</li>";
|
echo "</li>";
|
||||||
endforeach;
|
endforeach;
|
||||||
|
if (count($this->userref)==15)
|
||||||
|
{
|
||||||
|
echo '<a class="btn btn-danger pull-right" href="/knowledge/user/uuid/'.$md->uuid.'" ><i class="icon-info-sign"></i>更多施引文献</a>';
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
</ol>
|
</ol>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
|
@ -122,6 +122,10 @@ if ($md->title_en) echo '<br />'.$this->escape($md->title_en);?>
|
||||||
}
|
}
|
||||||
echo "</li>";
|
echo "</li>";
|
||||||
endforeach;
|
endforeach;
|
||||||
|
if (count($this->userref)==15)
|
||||||
|
{
|
||||||
|
echo '<a class="btn btn-danger pull-right" href="/knowledge/user/uuid/'.$md->uuid.'" ><i class="icon-info-sign"></i>更多施引文献</a>';
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
</ol>
|
</ol>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
|
@ -120,6 +120,10 @@ if ($md->title_en) echo '<br />'.$this->escape($md->title_en);?>
|
||||||
}
|
}
|
||||||
echo "</li>";
|
echo "</li>";
|
||||||
endforeach;
|
endforeach;
|
||||||
|
if (count($this->userref)==15)
|
||||||
|
{
|
||||||
|
echo '<a class="btn btn-danger pull-right" href="/knowledge/user/uuid/'.$md->uuid.'" ><i class="icon-info-sign"></i>更多施引文献</a>';
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
</ol>
|
</ol>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
|
@ -17,6 +17,10 @@ $this->headLink()->appendStylesheet('/css/colorbox.css');
|
||||||
<div class="span9">
|
<div class="span9">
|
||||||
<div id="content">
|
<div id="content">
|
||||||
<h2>数据施引文献库</h2>
|
<h2>数据施引文献库</h2>
|
||||||
|
<?php if ($this->md) :
|
||||||
|
echo '<h3><a href="/data/'.$this->md['uuid'].'"><i class="icon-folder-open text-success"></i>'.$this->md['title'].'</a></h3>';
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
<div>
|
<div>
|
||||||
<?php if (count($this->paginator)): ?>
|
<?php if (count($this->paginator)): ?>
|
||||||
<ol start="<?php echo ($this->paginator->getCurrentPageNumber() - 1) * $this->paginator->getItemCountPerPage()+1; ?>">
|
<ol start="<?php echo ($this->paginator->getCurrentPageNumber() - 1) * $this->paginator->getItemCountPerPage()+1; ?>">
|
||||||
|
|
|
@ -101,6 +101,10 @@ h3.gs_rt{font-size:110%;}
|
||||||
}
|
}
|
||||||
echo "</li>";
|
echo "</li>";
|
||||||
endforeach;
|
endforeach;
|
||||||
|
if (count($this->userref)==15)
|
||||||
|
{
|
||||||
|
echo '<a class="btn btn-success pull-right" href="/knowledge/user/uuid/'.$md->uuid.'" ><i class="icon-info-sign"></i>更多施引文献</a>';
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
</ol>
|
</ol>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
Loading…
Reference in New Issue