Déplacement des menus

This commit is contained in:
Michael RICOIS 2016-03-01 14:43:12 +00:00
parent 227668d903
commit 6db0fafa7f
6 changed files with 60 additions and 139 deletions

View File

@ -1,14 +1,14 @@
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="./">Scores & Décisions</a>
<a class="navbar-brand sd-txtblue" href="./">Scores & Décisions</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<?php if ($this->MenuSaisie !== null) {?>
<?php if ($this->MenuEdit !== null) {?>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
Saisie <span class="caret"></span></a>
Mode Edition <span class="caret"></span></a>
<ul class="dropdown-menu">
</ul>
</li>
@ -17,15 +17,14 @@
<?php if ($this->print) {?>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
Impression <span class="caret"></span></a>
Imprimer <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a title="Impression" href="/editer/ecran/<?=$this->print.'.html'?>"
target="_blank"><span class="glyphicon glyphicon-print" aria-hidden="true"></span> Ecran</a></li>
target="_blank"><span class="glyphicon glyphicon-print" aria-hidden="true"></span> Papier</a></li>
<?php if ($this->pdf) {?>
<li><a title="Impression PDF" href="/editer/pdf/<?=$this->pdf.'.pdf'?>"
target="_blank"><span class="fa fa-file-pdf-o" aria-hidden="true"></span> PDF</a></li>
<?php }?>
<?php if ($this->xml) {?>
<li><a title="Export XML" href="/editer/xml/<?=$this->xml.'.xml'?>" target="_blank">XML</a></li>
<?php }?>
@ -53,20 +52,33 @@
<?php }?>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
<a href="#" class="dropdown-toggle sd-txtblue" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
Tableau de bord <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="#">Commandes</a></li>
<li><a href="#">Surveillances</a></li>
<li><a href="#">Portefeuille</a></li>
<?php if (in_array($this->UserProfil, array('Administrateur', 'SuperAdministrateur'))) {?>
<li><a href="<?=$this->url(array('module'=>'default', 'controller'=>'user', 'action'=>'liste'),
'default', true)?>">Administration</a></li>
<?php }?>
<li><a href="<?=$this->url(array('module'=>'default', 'controller'=>'aide', 'action'=>'newliste'),
'default', true)?>">Nouveautés</a></li>
<li><a href="<?=$this->url(array('module'=>'default', 'controller'=>'user', 'action'=>'index'),
'default', true)?>">Paramètres</a></li>
<?php if (in_array($this->UserProfil, array('SuperAdministrateur'))) {?>
<li role="separator" class="divider"></li>
<li><a href="#">Administration</a></li>
<li><a href="#">Nouveautés</a></li>
<li><a href="#">Paramètres</a></li>
<li><a href="<?=$this->url(array('module'=>'default', 'controller'=>'dashboard', 'action'=>'index'),
'default', true)?>">Extranet Dashboard</a></li>
<?php }?>
<li role="separator" class="divider"></li>
<li><a href="<?=$this->url(array('module'=>'default', 'controller'=>'order', 'action'=>'index'),
'default', true)?>">Commandes</a></li>
<li><a href="<?=$this->url(array('module'=>'default', 'controller'=>'surveillance', 'action'=>'liste'),
'default', true)?>">Surveillances</a></li>
<li><a href="<?=$this->url(array('module'=>'default', 'controller'=>'surveillance', 'action'=>'portefeuille'),
'default', true)?>">Portefeuille</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
<a href="#" class="dropdown-toggle sd-txtblue" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
Outils Métier <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="http://ws.scores-decisions.com" target="_blank">WebService</a></li>

View File

@ -1,35 +1,6 @@
<?php if ($this->navigation()->menu()->hasPages()) { ?>
<div id="menu">
<div id="logo">
<img src="/themes/default/images/logos/logo_sd.gif" width="200" height="65" />
</div>
<?=$this->navigation()->menu();?>
<div class="icones">
<?php if ($this->print) {?>
<a target="_blank" title="Impression" href="/editer/ecran/<?=$this->print.'.html'?>">
<img alt="<?=$this->translate("Impression")?>" src="/themes/default/images/interfaces/printer.png">
</a>
<?php }?>
<?php if ($this->pdf) {?>
<a target="_blank" title="Impression PDF" href="/editer/pdf/<?=$this->pdf.'.pdf'?>">
<img alt="<?=$this->translate("Impression en PDF")?>" src="/themes/default/images/interfaces/pdf.png">
</a>
<?php }?>
<?php if ($this->xml) {?>
<a target="_blank" title="Export XML" href="/editer/xml/<?=$this->xml.'.xml'?>">
<img alt="<?=$this->translate("Export en XML")?>" src="/themes/default/images/interfaces/xml.png">
</a>
<?php }?>
<?php if ($this->aide) {?>
<a id="aideLigne" title="Aide en ligne" href="#">
<img alt="<?=$this->translate("Activer l'aide en ligne")?>" src="/themes/default/images/interfaces/aideligne.png">
</a>
<?php }?>
</div>
</div>
<script>
$('div#menu ul.navigation').accordion({

View File

@ -23,7 +23,6 @@
<div class="row">
<?=$form->raisonSociale?>
</div>
<br/><br/>
<div class="row">
<?=$form->numero?>
<?=$form->voie?>
@ -34,7 +33,6 @@
<div class="row">
<?=$form->telFax?>
</div>
<br/><br/>
<div class="row">
<?=$form->naf?>
</div>

View File

@ -0,0 +1,30 @@
<?php
class Application_Controller_Plugin_Acl extends Zend_Controller_Plugin_Abstract
{
public function preDispatch(Zend_Controller_Request_Abstract $request)
{
// --- initialisation
$menu = null;
$continue = true;
if ($request->getControllerName()=='print') {
$continue = false;
}
$layout = Zend_Layout::getMVCInstance();
$view = $layout->getView();
if ($continue) {
$auth = Zend_Auth::getInstance();
if ($auth->hasIdentity()) {
$identity = $auth->getIdentity();
// --- Params User
$view->UserProfil = $identity->profil;
$view->UserModeEdit = $identity->modeEdition;
// --- Menu Edition
}
}
$view->MenuEdit = $menu;
}
}

View File

@ -424,99 +424,6 @@ class Scores_Menu
),
),
),
array(
'label' => 'TABLEAU DE BORD',
'activateMenu' => array(
array('controller'=> 'order', 'action'=>'kbis'),
array('controller'=> 'order', 'action'=>'bilaninput'),
array('controller'=> 'order', 'action'=>'greffeacte'),
array('controller'=> 'order', 'action'=>'greffebilan'),
),
'pages' => array(
array(
'label' => 'Données et prospection',
'controller' => 'index',
'action' => 'odea',
),
array(
'label' => 'Nouveautés',
'controller' => 'aide',
'action' => 'newliste',
),
array(
'label' => "Paramètres",
'controller' => 'user',
'action' => 'index',
'permission' => 'MONPROFIL'
),
array(
'label' => "Commandes",
'controller' => 'order',
'action' => 'index',
),
array(
'label' => "Surveillances",
'controller' => 'surveillance',
'action' => 'liste',
'permission' => 'SURVLISTE'
),
array(
'label' => "Surveillances Fichier",
'controller' => 'surveillance',
'action' => 'fichier',
),
array(
'label' => "Portefeuille",
'controller' => 'surveillance',
'action' => 'portefeuille',
'permission' => 'PORTEFEUILLE',
),
array(
'label' => "Administration",
'controller' => 'user',
'action' => 'liste',
),
array(
'label' => "Deconnexion",
'controller' => 'user',
'action' => 'logout',
),
),
),
array(
'label' => 'GESTION S&D',
'check' => 'dashboard',
'activateMenu' => array(
array('controller'=>'dashboard', 'action'=>'clients'),
array('controller'=>'dashboard', 'action'=>'client'),
array('controller'=>'dashboard', 'action'=>'users'),
array('controller'=>'dashboard', 'action'=>'user'),
array('controller'=>'dashboard', 'action'=>'commandes'),
array('controller'=>'dashboard', 'action'=>'prestations'),
array('controller'=>'dashboard', 'action'=>'prestation'),
array('controller'=>'dashboard', 'action'=>'services'),
array('controller'=>'dashboard', 'action'=>'service'),
array('controller'=>'dashboard', 'action'=>'tarifs'),
array('controller'=>'dashboard', 'action'=>'tarif'),
),
'pages' => array(
array(
'label' => "Gestion",
'controller' => 'dashboard',
'action' => 'index',
),
array(
'label' => "Saisie / Edition",
'controller' => 'saisie',
'action' => 'fiche',
),
array(
'label' => "Saisie Fiche Etrangère",
'controller' => 'saisie',
'action' => 'lienetranger',
),
),
),
);

View File

@ -13,7 +13,6 @@ body {
#center h1 {clear:both;margin:5px;padding:5px;background:#8f8f8f;color:#ffffff;font:600 1.4em Arial, Verdana, Sans-serif;letter-spacing:1px;line-height:1.2em;}
#center h2 {clear:both; margin:5px; padding:5px;background:#1A5C7D;color:#ffffff;font:bold 1.2em Arial, Verdana, Sans-serif; }
div.paragraph {margin:5px;padding:5px;}
.clearfix:after {content:".";display:block;height:0;clear:both;visibility:hidden;zoom:1;}
a:link {color: #9c093a; text-decoration:none;}
a:visited {color: #0000CC; text-decoration:none;}
a:hover {color: #000066; text-decoration:none;}
@ -64,6 +63,10 @@ img {vertical-align:middle;}
vertical-align: middle;
width: 25px;
}
.navbar-default .navbar-nav > li > a.sd-txtblue {
color:#1A5C7D;
}
/* Menu
----------------------------------*/