dataController的predispatch中添加导航信息,data/doi中引用breadcrumbs模板
This commit is contained in:
parent
9268e8e35d
commit
114d7e315d
|
@ -11,6 +11,11 @@ class DataController extends Zend_Controller_Action
|
|||
$this->view->messages = $this->messenger->getMessages();
|
||||
$this->view->theme = new Theme();
|
||||
$this->view->main_nav_pageID = "data";
|
||||
|
||||
$this->view->nav = array(
|
||||
array('link'=>'/','title'=>'<i class="icon-home"></i>'),
|
||||
array('link'=>'/data','title'=>$this->view->config->title->data),
|
||||
);
|
||||
}
|
||||
function indexAction()
|
||||
{
|
||||
|
|
|
@ -1,4 +1,11 @@
|
|||
<?php
|
||||
echo implode(', ', array_map(
|
||||
create_function('$a', 'return $a->getLabel();'),
|
||||
$this->pages));?>
|
||||
<?php if(!empty($this->nav)){ ?>
|
||||
<nav>
|
||||
<ul class="breadcrumb">
|
||||
<?php foreach ($this->nav as $k=>$v){?>
|
||||
<li>
|
||||
<a href="<?= $v['link'] ?>"><?= $v['title']?></a> <?php if(isset($this->nav[$k+1])) {?> <span class="divider">/</span> <?php } ?>
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</nav>
|
||||
<?php } ?>
|
|
@ -3,14 +3,12 @@ $this->headTitle($this->config->title->site);
|
|||
$this->headTitle($this->config->title->data);
|
||||
$this->headTitle('DOI浏览');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/data">'.$this->config->title->data.'</a>');
|
||||
$this->breadcrumb('<a href="/data/doi">DOI浏览</a>');
|
||||
$this->nav[] = array('link'=>"/data/doi",'title'=>'DOI浏览');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
$this->theme->AppendPlus($this,'colorbox');
|
||||
?>
|
||||
<div class='row-fluid'>
|
||||
<div><?= $this->breadcrumb() ?> </div>
|
||||
<?= $this->render('breadcrumbs.phtml') ?>
|
||||
<?= $this->partial('data/tools.phtml'); ?>
|
||||
<ul class="nav nav-tabs">
|
||||
<li id="Nav-doi-publish"><a href="/data/doi">已发布DOI的数据</a></li>
|
||||
|
|
Loading…
Reference in New Issue