viewVars); /** Logiciel LabInvent - Inventaire des matériels d'un laboratoire Copyright (C) 2012-2021 IRAP Toulouse France - Etienne Pallier epallier@irap.omp.eu This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . LICENCE : GNU AFFERO GENERAL PUBLIC LICENSE v3, 19 November 2007 Copyright (C) 2007 Free Software Foundation, Inc. https://spdx.org/licenses/AGPL-3.0.html#licenseText */ /* * (EP202010) * * Pour éviter le message : * "Le document a expiré... réessayer" * après avoir fait un POST, puis retour arrière * * https://fr.wikipedia.org/wiki/Cache-Control * * voir aussi : * https://blog.kodono.info/wordpress/2012/03/15/permettre-le-retour-en-arriere-sur-une-page-php-avec-une-session-programmation * * On pourrait aussi utiliser : * session_cache_limiter('private_no_expire, must-revalidate'); * * Voir aussi avec CakePhp : * https://book.cakephp.org/3/fr/controllers/request-response.html * * Cette commande doit être exécutée * AVANT le démarrage de session * par session_start() * */ header('Cache-Control: private_no_expire, must-revalidate'); /** * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * Copyright (c) Cake Software Foundation, Inc. * (http://cakefoundation.org) * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @since 0.10.0 * @license http://www.opensource.org/licenses/mit-license.php MIT License */ // --- Elements set by Controller --- //$USER_IS_UTILISATEUR = $USER_IS_UTILISATEUR; $configuration = $configuration; /* * (EP 202102) LOGOS (dans webroot/img/) * * - En haut à gauche : logo du logiciel LABINVENT, par défaut logo_software_LABO.jpg => pas nécessaire de le changer, c'est le nom générique * * - En bas à gauche : logo de l'institution (labo), par défaut logo_entity_LABO.jpg (=IRAP) => à changer pour mettre le logo de votre labo * * Si vous souhaitez changer ces logos (surtout celui de l'entité), il suffit de remplacer "LABO" par le "nom court" de votre labo (comme défini dans la page web de configuration) * Ex: * - pour "IRAP", on lira le fichier logo_entity_IRAP.jpg * - pour "IAS", on lira le fichier logo_entity_IAS.jpg * - ... */ //$logo_software_name = "logo_software"; //$logo_entity_name = "logo_entity"; $logo_names = ["software"=>'', "entity"=>'']; $labNameShortDefault = 'LABO'; $labNameShort = $configuration->labNameShort; foreach (array_keys($logo_names) as $logo_type) { $logo_name_default = "logo_".$logo_type."_".$labNameShortDefault.".jpg"; $logo_name_new = "logo_".$logo_type."_".$labNameShort.".jpg"; $logo_names[$logo_type] = file_exists(WWW_ROOT.DS.'img'.DS.$logo_name_new) ? $logo_name_new : $logo_name_default; } //debug($logo_names); /* TODO: (EP 2020 02) J'ai commencé à m'inspirer du template par defaut de bootstrap-ui dans vendor/friendsofcake/bootstrap-ui/src/Template/Layout/default.ctp Il faudrait continuer à s'en inspirer complètement (ajouter les sections html, meta, title...) */ // $cakeDescription = 'CakePHP: the rapid development php framework'; $cakeDescription = 'Labinvent 2'; /** * Prepend `css` block with Bootstrap stylesheets and append * the `$html5Shim`. */ $html5Shim = << HTML; // https://book.cakephp.org/4/en/views/helpers/html.html#linking-to-css-files //$this->prepend('css', $this->Html->css(['bootstrap/bootstrap'])); $this->prepend('css', $this->Html->css(['bootstrap/bootstrap.min', 'jquery-ui/jquery-ui.min'])); $this->append('css', $html5Shim); // //echo $this->Html->css('smoothness'); $this->append('css', $this->Html->css(['smoothness', 'inventirap', 'font-awesome', 'responsive'])); //<= $this->Html->css('inventirap') > //<= $this->Html->css('font-awesome') > /* */ //Prepend `script` block with jQuery and Bootstrap scripts //echo $this->Html->script('jquery/jquery'); //echo $this->Html->script('bootstrap/bootstrap'); //$this->prepend('script', $this->Html->script(['jquery/jquery', 'bootstrap/bootstrap'])); $this->prepend('script', $this->Html->script(['jquery/jquery.min', 'bootstrap/bootstrap.min', 'jquery-ui/jquery-ui.min'])); //echo $this->Html->script('script'); //echo $this->Html->script('DatepickerConfig'); //echo $this->Html->script('onTabHover'); $this->append('script', $this->Html->script(['script', 'DatepickerConfig', 'onTabHover'])); // ?> Html->charset(); // Default is UTF-8 // Autres possibilités //echo $this->Html->charset('ISO-8859-1'); // viewport echo $this->Html->meta( 'viewport', 'width=device-width,initial-scale=1,minimum-scale=1' ); // equivaut à : // ?> <?= $cakeDescription ?>: <?= $this->fetch('title') ?> Html->meta('icon') ?> fetch('meta') ?> fetch('css') ?> fetch('script') ?>
request->params['controller']); //debug($this->request->params['action']); $controller = $this->request->getParam('controller'); $action = $this->request->getParam('action'); $has_search_field = ! ($controller == 'Materiels' && $action == 'index'); //$has_search_field = true; //$this->element('menu_responsive'); echo $this->element('menu_responsive', [ 'has_search_field' => $has_search_field, ]); ?>
Flash->render() ?> fetch('content') ?>