Update for bootstrap

This commit is contained in:
Michael RICOIS 2014-06-18 07:59:36 +00:00
parent cbddecf560
commit a16ddf86a6
24 changed files with 201 additions and 194 deletions

View File

@ -0,0 +1,99 @@
<?php
return array(
array(
'label'=> "Ciblage",
'title' => "Ciblage",
'controller' => 'index',
'action' => 'index',
),
array(
'label' => "Tableau de bord",
'title' => "Tableau de bord",
'controller' => 'dashboard',
'action' => 'index',
'pages' => array(
array(
'label'=> "Résumé",
'title' => "Résumé",
'controller' => 'dashboard',
'action' => 'index',
),
array(
'label'=> "Ciblages",
'title' => "Liste des vos ciblages",
'controller' => 'dashboard',
'action' => 'ciblages',
),
array(
'label'=> "Enrichissements",
'title' => "Liste de vos enrichissements",
'controller' => 'dashboard',
'action' => 'enrichissements',
),
array(
'label'=> "Préférences",
'title' => "Préférences de l'application",
'controller' => 'dashboard',
'action' => 'configuration',
),
)
),
array(
'label'=> "Aide",
'title' => "Aide",
'controller' => 'aide',
'action' => 'index',
'pages' => array()
),
array(
'label'=> "A propos",
'title' => "A propos",
'controller' => 'aide',
'action' => 'apropos',
'pages' => array()
),
array(
'label'=> "Gestion",
'title' => "Gestion",
'controller' => 'gestion',
'action' => 'index',
'pages' => array(
array(
'label'=> "Menu",
'title' => "Menu",
'controller' => 'gestion',
'action' => 'index',
),
array(
'label'=> "Liste des commandes",
'title' => "Liste des commandes",
'controller' => 'gestion',
'action' => 'commandes',
),
array(
'label'=> "Liste des enrichissements",
'title' => "Liste des enrichissements",
'controller' => 'gestion',
'action' => 'enrichissements',
),
array(
'label'=> "Liste des ciblages",
'title' => "Liste des ciblages",
'controller' => 'gestion',
'action' => 'ciblages',
),
array(
'label'=> "Gestion des paramètres clients",
'title' => "Gestion des paramètres clients",
'controller' => 'gestion',
'action' => 'customerparams',
),
array(
'label'=> "Extraction des logs",
'title' => "Extraction des logs",
'controller' => 'gestion',
'action' => 'index',
),
),
),
);

View File

@ -9,7 +9,7 @@ class AideController extends Zend_Controller_Action
public function indexAction(){}
public function aproposdeAction(){}
public function aproposAction(){}
public function messageAction()
{

View File

@ -0,0 +1,17 @@
<?php
class Zend_View_Helper_ProfileLink extends Zend_View_Helper_Abstract
{
public function profileLink()
{
$auth = Zend_Auth::getInstance();
if ($auth->hasIdentity()) {
$username = $auth->getIdentity()->username;
$logoutUrl = $this->view->url(array(
'controller' => 'user',
'action' => 'logout'
), null, true);
return '<a href="'.$logoutUrl.'" title="Se déconnecter" class="navbar-link">Déconnexion : ' . $username . '</a>';
}
}
}

View File

@ -1,3 +1,4 @@
<div class="container">
<div id="help">
<h2>Préambule</h2>
<p>
@ -48,6 +49,6 @@ critères multiples. Utiliser les liens "Sélectionner" pour inclure les filtres
</ul>
</div>
</div>

View File

@ -1,3 +1,4 @@
<div class="container">
<div id="help">
<?php if ($this->typeMsg == 'support') {?>
Les paramètres de votre compte n'ont pas été définis. <br/>Veuillez contacter le <a href="mailto:support@scores-decisions.com">support</a>.
@ -5,4 +6,5 @@ Les paramètres de votre compte n'ont pas été définis. <br/>Veuillez contacte
<br/>Par téléphone : 00 00 00 00 00
<br/>Ou contactez votre commercial.
<?php }?>
</div>
</div>

View File

@ -1,14 +1,4 @@
<ul class="chemin clearfix rounded_t">
<li class="e0"><a class="lir" href="/">Accueil</a></li>
<li>
<a href="<?=$this->url(array('controller'=>'dashboard', 'action'=>'index'))?>">
<span>Tableau de bord</span>
</a>
</li>
<li class="last">
<span>Liste de vos ciblages</span>
</li>
</ul>
<div class="container">
<div id="dashboard" class="clearfix">
@ -68,3 +58,4 @@ $('.pagination').jqPagination({
</div>
</div>
</div>

View File

@ -1,14 +1,4 @@
<ul class="chemin clearfix rounded_t">
<li class="e0"><a class="lir" href="/">Accueil</a></li>
<li>
<a href="<?=$this->url(array('controller'=>'dashboard', 'action'=>'index'))?>">
<span>Tableau de bord</span>
</a>
</li>
<li class="last">
<span>Préférences</span>
</li>
</ul>
<div class="container">
<div id="dashboard">
@ -83,4 +73,5 @@ $('input[type=checkbox]').click(function(){
<p>Aucun profil d'enrichissement (Veuillez contacter le service commercial)</p>
<?php }?>
</div>
</div>

View File

@ -1,14 +1,4 @@
<ul class="chemin clearfix rounded_t">
<li class="e0"><a class="lir" href="/">Accueil</a></li>
<li>
<a href="<?=$this->url(array('controller'=>'dashboard', 'action'=>'index'))?>">
<span>Tableau de bord</span>
</a>
</li>
<li class="last">
<span>Enrichissements</span>
</li>
</ul>
<div class="container">
<div id="dashboard">
@ -99,3 +89,5 @@ function updateInfo()
});
}
</script>
</div>

View File

@ -1,22 +1,10 @@
<ul class="chemin clearfix rounded_t">
<li class="e0"><a class="lir" href="/">Accueil</a></li>
<li>
<a href="<?=$this->url(array('controller'=>'dashboard', 'action'=>'index'))?>">
<span><?=$this->translate('Tableau de bord')?></span>
</a>
</li>
<li class="last">
<span></span>
</li>
</ul>
<div class="container">
<div id="dashboard">
<div id="menu">
<a href="<?=$this->url(array('controller'=>'dashboard', 'action'=>'ciblages'))?>"><?=$this->translate('Liste de vos ciblages')?></a> -
<a href="<?=$this->url(array('controller'=>'dashboard', 'action'=>'enrichissements'))?>"><?=$this->translate('Liste de vos enrichissements')?></a> -
<a href="<?=$this->url(array('controller'=>'dashboard', 'action'=>'configuration'))?>"><?=$this->translate('Préférences de l\'application')?></a> -
<a href="<?=$this->url(array('controller'=>'dashboard', 'action'=>''))?>"><?=$this->translate('Enrichissement de fichier')?></a>
<div class="btn-group">
<a type="button" class="btn btn-default" href="<?=$this->url(array('controller'=>'dashboard', 'action'=>'ciblages'))?>"><?=$this->translate('Liste de vos ciblages')?></a>
<a type="button" class="btn btn-default" href="<?=$this->url(array('controller'=>'dashboard', 'action'=>'enrichissements'))?>"><?=$this->translate('Liste de vos enrichissements')?></a>
<a type="button" class="btn btn-default" href="<?=$this->url(array('controller'=>'dashboard', 'action'=>'configuration'))?>"><?=$this->translate('Préférences de l\'application')?></a>
</div>
<div id="rechercheCiblage">
@ -93,4 +81,5 @@
<?php endif;?>
</div>
</div>
</div>

View File

@ -1,6 +1,3 @@
<div class="container">
<p class="text-muted credit"> &copy; <?=date('Y')?> <a href="http://www.scores-decisions.com">Scores & Décisions</a>.
<img class="flag" id="fr" src="/themes/default/images/drapeaux/fr.png"/>
<img class="flag" id="en" src="/themes/default/images/drapeaux/en.png"/>
</p>
<p class="text-muted credit"> &copy; <?=date('Y')?> <a href="http://www.scores-decisions.com">Scores & Décisions</a>.</p>
</div>

View File

@ -1,3 +1,4 @@
<div class="container">
<?php
$YearBegin = 2012;
$Years = date('Y') - $YearBegin;
@ -69,3 +70,4 @@ $('table tr').on('click', function(){
}
});
</script>
</div>

View File

@ -1,3 +1,4 @@
<div class="container">
<?php
$YearBegin = 2012;
$Years = date('Y') - $YearBegin;
@ -48,4 +49,5 @@ $Years = date('Y') - $YearBegin;
<?php endforeach; ?>
</table>
</div>
</div>
</div>

View File

@ -1,3 +1,4 @@
<div class="container">
<div id="dashboard">
<h2>Paramètres client</h2>
@ -56,4 +57,5 @@
</table>
</div>
</div>
</div>

View File

@ -1,3 +1,4 @@
<div class="container">
<div id="dashboard">
<?php if ($this->message) {?>
@ -109,4 +110,5 @@ Nombre maximal de fichier pouvant être extrait
</form>
<?php }?>
</div>
</div>

View File

@ -1,3 +1,4 @@
<div class="container">
<div id="dashboard">
<h2>Liste des paramètres clients</h2>
@ -33,3 +34,4 @@
</div>
</div>

View File

@ -1,3 +1,4 @@
<div class="container">
<?php
$YearBegin = 2012;
$Years = date('Y') - $YearBegin;
@ -43,4 +44,5 @@ $Years = date('Y') - $YearBegin;
<?php endforeach; ?>
</table>
</div>
</div>
</div>

View File

@ -1,3 +1,5 @@
<div class="container">
<div id="dashboard">
<h2>Gestion des commandes</h2>
@ -9,4 +11,6 @@
<a href="<?=$this->url(array('controller' => 'gestion', 'action' => 'customerparams'))?>">Gestion des paramètres clients</a><br/>
<a href="#">Extraction Logs</a>
</div>
</div>

View File

@ -1,3 +1,4 @@
<div class="container">
<div id="dashboard">
<?=$this->message?>
@ -31,4 +32,5 @@
</form>
<?php }?>
</div>
</div>

View File

@ -1,3 +1,4 @@
<div class="container">
<div id="dashboard">
<div>
@ -42,4 +43,5 @@ IdClient : <input type="text" name="idClient" /> - Login : <input type="text" n
</tbody>
</table>
</div>
</div>

View File

@ -7,26 +7,45 @@
<!-- Fixed navbar -->
<div class="navbar navbar-default">
<div class="container">
<div class="navbar-header">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="<?=$this->url(array('controller'=>'index', 'action'=>'index'), null, true)?>">ODEA</a>
</div>
<div class="collapse navbar-collapse">
<?$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>
<?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> -->
<p class="navbar-text pull-right"><a href="<?=$this->url(array('controller'=>'user', 'action'=>'logout'), null, true)?>">Déconnexion</a></p>
<ul class="nav navbar-nav">
<?php foreach ($this->navigation()->getContainer() as $page) {?>
<li class="dropdown<?php if ( $page->isActive(true) ) { echo ' active'; } ?>">
<?php if ( $page->hasPages() ) {?>
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><?=$page->label?> <b class="caret"></b></a>
<ul class="dropdown-menu">
<?php foreach ( $page->getPages() as $child ) {?>
<?php if ( $child->getHref() == '#') {?>
<li class="divider"></li>
<?php } else {?>
<li <?php if ( $child->isActive(true) ) { echo "class='active'"; } ?>><a href="<?=$child->getHref()?>"><?=$child->label?></a></li>
<?php }?>
<?php }?>
</ul>
<?php } else {?>
<a href="<?=$page->getHref()?>"><?=$page->label?></a>
<?php }?>
</li>
<?php }?>
</ul>
<p class="navbar-text pull-right"><?=$this->profileLink()?></p>
</div><!--/.nav-collapse -->
</div>
</div>
<!-- Breadcrumbs -->
<?php if ($this->navigation()->breadcrumbs() != '') {?>
<div class="container">
<ol class="breadcrumb">
<?php echo $this->navigation()->breadcrumbs()->setLinkLast(false)->setSeparator(' / '); ?>
</ol>
</div>
<?php }?>

View File

@ -1,33 +0,0 @@
<?php echo $this->doctype(); ?>
<html>
<head>
<?php echo $this->headMeta(); ?>
<?php echo $this->headTitle(); ?>
<?php echo $this->headStyle(); ?>
<?php echo $this->headLink(); ?>
<?php echo $this->headScript(); ?>
</head>
<body>
<div id="header">
<?php echo $this->render('header.phtml') ?>
</div>
<div id="navigation">
<?php echo $this->render('menu.phtml') ?>
</div>
<div id="global">
<div id="content" class="clearfix">
<?php echo $this->layout()->content; ?>
</div>
</div>
<div id="footer">
<?php echo $this->render('footer.phtml'); ?>
</div>
</body>
</html>

View File

@ -1,34 +0,0 @@
<div id="primaryNavigation">
<div id="message">
<?php if ($this->msgComptage){?>
<div id="comptage" >
<?php if ( $this->total!==null ) {?>
<?=$this->translate('Sélection')?> :
<span class="valeur"><?=number_format($this->total, 0, '', ' ')?></span>
<?php if ( $this->insee!==null ) {?>
(dont <span class="valeur"><?=number_format($this->insee, 0, '', ' ')?></span> unité(s) insee)
<?php }?>
<?php } else {
echo $this->translate('Aucune sélection');
}?>
</div>
<div id="attente" style="display:none;">
<img src="/themes/default/images/ajax.gif" />
</div>
<div id="control">
[<a href="<?=$this->url(array('controller'=>'comptage', 'action'=> 'reset'))?>">Initialiser les critères</a>],
[<a class="saveciblage" href="<?=$this->url(array('controller'=>'comptage', 'action'=>'savedialog'))?>">Sauvegarder le profil du ciblage</a>]
</div>
<?php }?>
</div>
<ul>
<li><a href="<?=$this->url(array('controller'=>'index', 'action'=>'index'), null, true)?>"<?php if ($this->menuActive=='accueil') echo ' class="active"';?>><?=$this->translate('Accueil')?></a></li>
<li><a href="<?=$this->url(array('controller'=>'dashboard', 'action'=>'index'), null, true)?>"<?php if ($this->menuActive=='dashboard') echo ' class="active"';?>><?=$this->translate('Tableau de bord')?></a></li>
<li><a href="<?=$this->url(array('controller'=>'aide', 'action'=>'index'), null, true)?>"<?php if ($this->menuActive=='aide') echo ' active';?>><?=$this->translate('Aide')?></a></li>
<li><a href="<?=$this->url(array('controller'=>'aide', 'action'=>'aproposde'), null, true)?>"<?php if ($this->menuActive=='aproposde') echo ' class="active"';?>><?=$this->translate('A propos de')?></a></li>
<?php if ( $this->admin ) {?>
<li><a href="<?=$this->url(array('controller'=>'gestion', 'action'=>'index'), null, true)?>"<?php if ($this->menuActive=='gestion') echo ' class="active"';?>><?=$this->translate('Gestion')?></a></li>
<?php }?>
<li><a href="<?=$this->url(array('controller'=>'user', 'action'=>'logout'), null, true)?>"><?=$this->translate('Déconnexion')?></a></li>
</ul>
</div>

View File

@ -1,68 +1,24 @@
<?php
class Application_Controller_Plugin_Menu extends Zend_Controller_Plugin_Abstract
{
/**
* Vérifie les autorisations
* Utilise _request et _response hérités et injectés par le FC
*
* @param Zend_Controller_Request_Abstract $request : non utilisé, mais demandé par l'héritage
*/
/**
* Créer le menu en fonction des besoins et des paramètres en entrée
* @param Zend_Controller_Request_Abstract $request
*/
public function preDispatch(Zend_Controller_Request_Abstract $request)
{
$layout = Zend_Layout::getMVCInstance();
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();
$action = $request->getActionName();
$controller = $request->getControllerName();
$action = $request->getActionName();
if ( $layout->isEnabled() && $controller!='user' )
{
$view = $layout->getView();
$config = include APPLICATION_PATH . '/configs/menu.config.php';
$container = new Zend_Navigation($config);
$view->navigation($container);
}
switch ( $controller ) {
case 'index':
$view->menuActive = 'accueil';
break;
case 'dashboard':
$view->menuActive = 'dashboard';
break;
case 'aide':
switch ( $action ) {
case 'index':
$view->menuActive = 'aide';
break;
case 'aproposde':
$view->menuActive = 'aproposde';
break;
}
break;
case 'gestion':
$view->menuActive = 'gestion';
break;
}*/
}
}
}