issue #0001811: Zend_Navigation for menu (beta)
This commit is contained in:
parent
1c029fafe4
commit
85aa5af7fe
@ -4,7 +4,6 @@
|
||||
<div class="col-md-8"><h3>Outils D'Extraction Automatique</h3></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Fixed navbar -->
|
||||
<div class="navbar navbar-default">
|
||||
<div class="container">
|
||||
@ -16,15 +15,17 @@
|
||||
</button>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li<?php if ($this->menuActive=='accueil') echo ' class="active"';?>><a href="<?=$this->url(array('controller'=>'index', 'action'=>'index'), null, true)?>">Ciblage</a></li>
|
||||
<?$this->navigation()->menu()->setUlClass('nav navbar-nav');?>
|
||||
<?php echo $this->navigation()->menu()->render();?>
|
||||
<!-- <ul class="nav navbar-nav">
|
||||
<li<?php/* if ($this->menuActive=='accueil') echo ' class="active"';?>><a href="<?=$this->url(array('controller'=>'index', 'action'=>'index'), null, true)?>">Ciblage</a></li>
|
||||
<li<?php if ($this->menuActive=='dashboard') echo ' class="active"';?>><a href="<?=$this->url(array('controller'=>'dashboard', 'action'=>'index'), null, true)?>">Tableau de bord</a></li>
|
||||
<li<?php if ($this->menuActive=='aide') echo ' active';?>><a href="<?=$this->url(array('controller'=>'aide', 'action'=>'index'), null, true)?>">Aide</a></li>
|
||||
<li<?php if ($this->menuActive=='aproposde') echo ' class="active"';?>><a href="<?=$this->url(array('controller'=>'aide', 'action'=>'aproposde'), null, true)?>">A propos de</a></li>
|
||||
<li<?php if ($this->menuActive=='aproposde') echo ' class="active"';?>><a href="<?=$this->url(array('controller'=>'aide', 'action'=>'aproposde'), null, true)*/?>">A propos de</a></li>
|
||||
<?php if ( $this->admin ) {?>
|
||||
<li<?php if ($this->menuActive=='gestion') echo ' class="active"';?>><a href="<?=$this->url(array('controller'=>'gestion', 'action'=>'index'), null, true)?>">Gestion</a></li>
|
||||
<?php }?>
|
||||
</ul>
|
||||
</ul> -->
|
||||
<p class="navbar-text pull-right"><a href="<?=$this->url(array('controller'=>'user', 'action'=>'logout'), null, true)?>">Déconnexion</a></p>
|
||||
</div><!--/.nav-collapse -->
|
||||
</div>
|
||||
|
@ -14,8 +14,31 @@ class Application_Controller_Plugin_Menu extends Zend_Controller_Plugin_Abstract
|
||||
if ( $layout->isEnabled() )
|
||||
{
|
||||
$view = $layout->getView();
|
||||
$container = new Zend_Navigation(array(
|
||||
array(
|
||||
'label' => 'Ciblage',
|
||||
'action' => 'index',
|
||||
'controller' => 'index',
|
||||
),
|
||||
array(
|
||||
'label' => 'Tableau de bord',
|
||||
'action' => 'index',
|
||||
'controller' => 'dashboard',
|
||||
),
|
||||
array(
|
||||
'label' => 'Aide',
|
||||
'action' => 'index',
|
||||
'controller' => 'aide',
|
||||
),
|
||||
array(
|
||||
'label' => 'A propos de',
|
||||
'action' => 'aproposde',
|
||||
'controller' => 'aide',
|
||||
),
|
||||
));
|
||||
$view->navigation($container);
|
||||
|
||||
$controller = $request->getControllerName();
|
||||
/*$controller = $request->getControllerName();
|
||||
$action = $request->getActionName();
|
||||
|
||||
switch ( $controller ) {
|
||||
@ -38,7 +61,7 @@ class Application_Controller_Plugin_Menu extends Zend_Controller_Plugin_Abstract
|
||||
case 'gestion':
|
||||
$view->menuActive = 'gestion';
|
||||
break;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user