Validating theme

This commit is contained in:
Michael RICOIS 2016-03-25 09:15:47 +00:00
parent ab45879b83
commit 962330f1c3
9 changed files with 52 additions and 47 deletions

View File

@ -20,7 +20,6 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
$front = $this->getResource('frontController');
$front->setControllerDirectory(array(
'default' => __DIR__ . '/modules/default/controllers',
'admin' => __DIR__ . '/modules/admin/controllers',
'file' => __DIR__ . '/modules/file/controllers',
));

View File

@ -106,5 +106,8 @@
</li>
</ul>
</div>
<?php echo $this->render('menu.phtml')?>
</div>
</nav>

View File

@ -9,18 +9,9 @@
<body>
<div id="wrap">
<?php echo $this->render('header.phtml')?>
<?php if ($this->LayoutFluid) {?>
<div class="container-fluid">
<div id="page-wrap">
<?php echo $this->layout()->content?>
</div>
<?php } else {?>
<div class="container">
<?php echo $this->render('menu.phtml')?>
<div id="page-wrap">
<?php echo $this->layout()->content?>
</div>
</div>
<?php }?>
</div>
<div id="footer">
<?php echo $this->render('footer.phtml'); ?>

View File

@ -0,0 +1 @@
<?php

View File

@ -1,4 +1,4 @@
<?php if ($this->navigation()->menu()->hasPages()) { ?>
<?php if ($this->navigation()->menu()->hasPages()) {?>
<div id="menu">
<?=$this->navigation()->menu();?>
</div>

View File

@ -12,29 +12,39 @@ class Application_Controller_Plugin_Menu extends Zend_Controller_Plugin_Abstract
$layout = Zend_Layout::getMVCInstance();
$user = new Scores_Utilisateur();
if ( $user->isLog() && $layout->isEnabled() && $request->getControllerName()!='print' )
{
$controller = $request->getControllerName();
$action = $request->getActionName();
$module = $request->getModuleName();
$controller = $request->getControllerName();
$action = $request->getActionName();
// --- Scroll menu
if ( $user->isLog() && $layout->isEnabled() && $controller != 'print' ) {
/**
* Définition du menu à afficher par module
* admin => Administration : Liste des utilisateurs, etc
* file => Distribution des fichier, pas de navbar
* help => Aide, Faq, Nouveautés
* legal => Identite, Dirigeants, Finance, Juridique, Evaluation, Pieces Officielles, BDF !!!!!
* order => Commandes
* user => Paramètres, Portefeuille, Surveillances
* saisie => Element de saisie pas de navbar
* search => Formulaire de recherche
*/
// Override SIRET to complete with zero by left
// --- Override SIRET to complete with zero by left
$siret = $request->getParam('siret');
if ( intval($siret)>100 ) {
$request->setParam('siret', str_pad($siret, 9, '0', STR_PAD_LEFT));
}
// Génération du menu
// --- Génération du menu
$computeMenu = new Scores_Menu($request->getParams());
$menu = $computeMenu->getMenu();
$view = $layout->getView();
$view->navigation($menu);
// Génération identifiant Menu
// --- Identifiant Menu
$view->menuId = $computeMenu->getIdMenu($controller, $action);
// Test if the user has the right to access the page
// --- Page Access
$hasPerm = true;
$permPage = $computeMenu->getPagePermission($controller, $action);
if ( !empty($permPage) ) {
@ -71,12 +81,6 @@ class Application_Controller_Plugin_Menu extends Zend_Controller_Plugin_Abstract
}
//Icone d'aide
if ($layout->isEnabled() && $request->getControllerName()!='recherche')
{
//$view->aide = true;
}
Zend_Registry::get('firebug')->info('PLUGIN MENU - END');
}
}

View File

@ -43,11 +43,6 @@ class Application_Controller_Plugin_Theme extends Zend_Controller_Plugin_Abstrac
$layout->setLayout('layout');
$layout->setLayoutPath($layoutPath);
$view->LayoutFluid = false;
if ($module == 'default' && in_array($controller, array('user'))) {
$view->LayoutFluid = true;
}
//Load default style and javascript files for the selected theme
switch ( $theme ) {
case 'default':

View File

@ -1,4 +1,14 @@
$(document).ready(function(){
$(function() {
$(window).bind("load resize", function() {
topOffset = 50;
bottomOffset = 50;
height = ((this.window.innerHeight > 0) ? this.window.innerHeight : this.screen.height) - 1;
height = height - topOffset - bottomOffset;
if (height < 1) height = 1;
if (height > topOffset) {
$("#page-wrap").css("min-height", (height) + "px");
}
});
$('img.flag').on('click', function() {
var url = window.location.href;
@ -8,11 +18,11 @@ $(document).ready(function(){
});
//Auto Scroll
$(window).scroll(function(e) {
/*$(window).scroll(function(e) {
e.stopPropagation();
var offset = $(window).scrollTop();
$("#menu").css('top', offset + 70);
});
});*/
$('input.button, button, span.ui-button').button();

View File

@ -21,7 +21,7 @@ body {
/* Set the fixed height of the footer here */
#footer {
height: 50px;
background-color: #f5f5f5;
background-color: #f8f8f8;
}
@ -29,17 +29,17 @@ body {
-------------------------------------------------- */
/* Not required for template or sticky footer method. */
.container .credit {
font-size: 12px;
margin: 16px 0;
font-size: 12px;
margin: 16px 0;
}
#footer > .container {
padding-left: 15px;
padding-right: 15px;
padding-left: 15px;
padding-right: 15px;
}
code {
font-size: 80%;
font-size: 80%;
}
p.bg-classes {
@ -53,14 +53,15 @@ p.bg-classes {
/* Main
----------------------------------*/
body {
background-color:#eee;
padding-top: 60px;
background-color: #f8f8f8;
padding-top: 50px;
}
#page-wrap {
padding: 0 15px;
min-height: 568px;
background-color: #fff;
border-bottom: 1px solid #e7e7e7;
}
@media(min-width:768px) {
@ -75,8 +76,6 @@ body {
#global {width:970px; margin:0 auto 15px; text-align:left;}
#content {float:right;width:700px;}
#center {background-color:#fff;padding:5px 0;}
/*#footer {background-color:#eee;clear:both;text-align:center;margin:15px 0 0 0;}
#footer p {font:0.9em Arial, Helvetica, sans-serif; }*/
#center h1 {clear:both;margin:5px;padding:5px;background:#8f8f8f;color:#ffffff;font-weight:bold;font-size:1.4em;}
#center h2 {clear:both; margin:5px; padding:5px;background:#1A5C7D;color:#ffffff;font-weight:bold;font-size:1.2em;}
div.paragraph {padding:5px;}
@ -131,6 +130,9 @@ img {vertical-align:middle;}
/* Navbar
----------------------------------*/
.navbar {
margin-bottom: 0px;
}
.navbar-default .navbar-nav > li > a {
color: #337ab7;
}
@ -152,9 +154,9 @@ img {vertical-align:middle;}
/* Menu
----------------------------------*/
div#menu {position: absolute;width:220px;}
div#menu {position: absolute; width: 230px;}
div#menu .ui-widget {font-family:Arial, Sans-serif;font-size:12px;}
div#menu ul.navigation {padding:0;}
div#menu ul.navigation {margin-top:1px;}
div#menu ul.navigation li {list-style-type:none;}
div#menu ul.navigation li a {display:block;padding:0 20px;text-decoration:none;font-weight:bold;color:#fff;height:25px;line-height:25px;background:#1A5C7D;}
div#menu ul.navigation li ul {padding:0;overflow:hidden;}