diff --git a/application/default/controllers/DataController.php b/application/default/controllers/DataController.php index 5768028c..1e34826e 100755 --- a/application/default/controllers/DataController.php +++ b/application/default/controllers/DataController.php @@ -618,7 +618,7 @@ class DataController extends Zend_Controller_Action $sql=$this->db->quoteInto($sql,$uuid); $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); $this->view->userref=$this->db->fetchAll($sql); //多篇引用形式:hiwater diff --git a/application/default/controllers/KnowledgeController.php b/application/default/controllers/KnowledgeController.php index db750d94..9e76286c 100755 --- a/application/default/controllers/KnowledgeController.php +++ b/application/default/controllers/KnowledgeController.php @@ -42,7 +42,16 @@ class KnowledgeController extends Zend_Controller_Action function userAction() { - $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"; + $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"; $sth = $this->db->prepare($sql); $sth->execute(); $rows = $sth->fetchAll(); diff --git a/application/default/views/scripts/data/view.phtml b/application/default/views/scripts/data/view.phtml index 88c54e7c..6e60839d 100755 --- a/application/default/views/scripts/data/view.phtml +++ b/application/default/views/scripts/data/view.phtml @@ -100,6 +100,10 @@ if ($md->title_en) echo '
'.$this->escape($md->title_en);?> } echo ""; endforeach; + if (count($this->userref)==15) + { + echo '更多施引文献'; + } ?> diff --git a/application/default/views/scripts/heihe/view.phtml b/application/default/views/scripts/heihe/view.phtml index 7e752c00..5136e386 100755 --- a/application/default/views/scripts/heihe/view.phtml +++ b/application/default/views/scripts/heihe/view.phtml @@ -122,6 +122,10 @@ if ($md->title_en) echo '
'.$this->escape($md->title_en);?> } echo ""; endforeach; + if (count($this->userref)==15) + { + echo '更多施引文献'; + } ?> diff --git a/application/default/views/scripts/hiwater/view.phtml b/application/default/views/scripts/hiwater/view.phtml index 2330ecdc..5a8a2783 100644 --- a/application/default/views/scripts/hiwater/view.phtml +++ b/application/default/views/scripts/hiwater/view.phtml @@ -120,6 +120,10 @@ if ($md->title_en) echo '
'.$this->escape($md->title_en);?> } echo ""; endforeach; + if (count($this->userref)==15) + { + echo '更多施引文献'; + } ?> diff --git a/application/default/views/scripts/knowledge/user.phtml b/application/default/views/scripts/knowledge/user.phtml index 08bceb34..d30d8d99 100644 --- a/application/default/views/scripts/knowledge/user.phtml +++ b/application/default/views/scripts/knowledge/user.phtml @@ -16,7 +16,11 @@ $this->headLink()->appendStylesheet('/css/colorbox.css');
-

数据施引文献库

+

数据施引文献库

+ md) : + echo '

'.$this->md['title'].'

'; + endif; + ?>
paginator)): ?>
    diff --git a/application/default/views/scripts/water/view.phtml b/application/default/views/scripts/water/view.phtml index db5ab149..a548d2bb 100755 --- a/application/default/views/scripts/water/view.phtml +++ b/application/default/views/scripts/water/view.phtml @@ -101,6 +101,10 @@ h3.gs_rt{font-size:110%;} } echo ""; endforeach; + if (count($this->userref)==15) + { + echo '更多施引文献'; + } ?>