From 3a8d92f20b2d91b5516ad3b8000af162ce8db5c5 Mon Sep 17 00:00:00 2001 From: llaffont <laurent.laffont@gmail.com> Date: Fri, 14 Mar 2014 15:55:00 +0100 Subject: [PATCH] Delete etagere controller, not used --- .../opac/controllers/EtagereController.php | 128 ------------------ .../views/scripts/etagere/appelmenu.phtml | 53 -------- library/Class/Systeme/ModulesMenu.php | 1 - library/Class/Systeme/ModulesMenu/Etagere.php | 45 ------ 4 files changed, 227 deletions(-) delete mode 100644 application/modules/opac/controllers/EtagereController.php delete mode 100644 application/modules/opac/views/scripts/etagere/appelmenu.phtml delete mode 100644 library/Class/Systeme/ModulesMenu/Etagere.php diff --git a/application/modules/opac/controllers/EtagereController.php b/application/modules/opac/controllers/EtagereController.php deleted file mode 100644 index b3d86f628e7..00000000000 --- a/application/modules/opac/controllers/EtagereController.php +++ /dev/null @@ -1,128 +0,0 @@ -<?php -/** - * Copyright (c) 2012, Agence Française Informatique (AFI). All rights reserved. - * - * AFI-OPAC 2.0 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. - * - * There are special exceptions to the terms and conditions of the AGPL as it - * is applied to this software (see README file). - * - * AFI-OPAC 2.0 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 AFI-OPAC 2.0; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ -////////////////////////////////////////////////////////////////////////////////////////// -// OPAC3 - Controleur étagères -////////////////////////////////////////////////////////////////////////////////////////// -class EtagereController extends Zend_Controller_Action -{ - private $etagere; // Instance de la classe etagere - private $liste; // Instance de la classe de liste de notices - private $preferences; // Préférences pour la liste du résultat - -//------------------------------------------------------------------------------------------------------ -// Initialisation du controler -//------------------------------------------------------------------------------------------------------ - function init() - { - // Instanciations - $this->etagere = new Class_Etagere(); - - // Reset session - if($_REQUEST["reset"] == "true") - { - unset($_REQUEST["reset"]); - unset($_SESSION["recherche"]); - } - - // Facettes - if($_REQUEST["facette"]) - { - $facette=$_REQUEST["facette"].";"; - $facettes=$_REQUEST["facettes"]; - if(strpos($facettes,$facette) === false) $facettes.=" ".$facette; - $_REQUEST["facettes"]=$facettes; - unset($_REQUEST["page"]); - unset($_REQUEST["facette"]); - unset($_SESSION["recherche"]["resultat"]); - } - - // Url de retour - $this->view->url_retour=BASE_URL."/etagere/".$this->_getParam("action")."?"; - foreach($_REQUEST as $clef => $valeur) $this->view->url_retour.="&".$clef."=".$valeur; - - // Préférences - $current_module=$this->_getParam("current_module"); - $this->preferences=$current_module["preferences"]; - - } - - -//------------------------------------------------------------------------------------------------------ -// Appel par une ligne de menu -//------------------------------------------------------------------------------------------------------ - function appelmenuAction() - { - // Sous rubriques d'une etagere - $id_etagere=$_REQUEST["id_etagere"]; - $id_kiosque=$_REQUEST["id_kiosque"]; - if(!$id_etagere) $id_etagere="1"; - $this->etagere->ecrireSettings($id_etagere); - - // Url retour pour les notices - $_SESSION["recherche"]["retour_liste"]=BASE_URL."/etagere/appelmenu?id_etagere=".$id_etagere."&id_kiosque=".$id_kiosque; - - // Kiosque - if($id_kiosque) - { - $enreg=$this->etagere->getEtagere($id_kiosque,""); - $ret=$this->etagere->getNotices($enreg["requete"]); - $this->etagere->getKiosque($ret,$id_kiosque); - $this->view->id_kiosque=$id_kiosque; - $this->view->titre_kiosque=$enreg["libelle"]; - $this->view->description_kiosque=$enreg["description"]; - } - - // Variables de vue - $this->view->id_etagere=$id_etagere; - } - -//------------------------------------------------------------------------------------------------------ -// Appel par une ligne de menu -//------------------------------------------------------------------------------------------------------ - function kiosqueAction() - { - $id_etagere=$_REQUEST["id_etagere"]; - $enreg=$this->etagere->getEtagere($id_etagere,""); - $ret=$this->etagere->getNotices($enreg["requete"]); - } - -//------------------------------------------------------------------------------------------------------ -// Texte de sélection pour les facettes -//------------------------------------------------------------------------------------------------------ - private function getTexteSelection() - { - // facettes - if($_REQUEST["facettes"]) - { - $items=explode(";",$_REQUEST["facettes"]); - foreach($items as $item) - { - $item=trim($item); - if(!$item) continue; - if($facette) $facette.=", "; - $facette.=Class_Codification::getInstance()->getNomChamp($item)."="; - $facette.= Class_Codification::getInstance()->getLibelleFacette($item); - } - } - else $facette=$this->view->_("aucune"); - return $this->view->_("Facettes : %s", $facette); - } -} \ No newline at end of file diff --git a/application/modules/opac/views/scripts/etagere/appelmenu.phtml b/application/modules/opac/views/scripts/etagere/appelmenu.phtml deleted file mode 100644 index e6e06b4de2a..00000000000 --- a/application/modules/opac/views/scripts/etagere/appelmenu.phtml +++ /dev/null @@ -1,53 +0,0 @@ -<?php $this->openBoite("Catalogues jeunesse"); ?> -<script src="<?php echo URL_JS?>recherche.js" type="text/javascript"> </script> -<link rel="stylesheet" type="text/css" media="screen" href="<?php echo URL_CSS?>recherche.css" /> -<link rel="stylesheet" type="text/css" media="screen" href="<?php echo URL_CSS?>nuage_tags.css" /> - -<script type="text/javascript" src="<?php echo URL_JS ?>swfobject.js"></script> - <script type="text/javascript"> - var flashvars = {}; - flashvars.settingsXML = "../../../../userfiles/etageres/<?php echo $this->id_etagere ?>/settings.xml"; - flashvars.folderPath = "<?php echo BASE_URL ?>/public/opac/flash/image_submenu/"; - var params = {}; - params.scale = "noscale"; - params.salign = "tl"; - params.wmode = "transparent"; - var attributes = {}; - swfobject.embedSWF("<?php echo URL_FLASH ?>image_submenu/ImageSubMenuFX.swf", "etagere_div", "95%", "310", "9.0.0", false, flashvars, params, attributes); -</script> -<br> -<div width="100%" align="center" > -<div id="etagere_div"></div> -</div> - -<?php -if($this->id_kiosque) -{ - ?> - <script type="text/javascript"> - var flashvars = {}; - flashvars.settingsXML = "kiosque_settings_<?php echo $this->id_kiosque ?>.xml"; - flashvars.folderPath = "<?php echo $this->url(['controller' => 'userfiles', -'action' => 'etageres']); ?>"; - var params = {}; - params.scale = "noscale"; - params.salign = "tl"; - params.wmode = "transparent"; - var attributes = {}; - swfobject.embedSWF("<?php echo URL_FLASH ?>dockmenu_horizontal/dockmenu.swf", "dockmenuDiv", "100%", "200", "9.0.0", false, flashvars, params, attributes); -</script> -<div class="titre" style="text-align: left"> - <div class="titreInner"> - <h1><?php echo $this->titre_kiosque ?></h1> - </div> - <?php if($this->description_kiosque) echo '<p style="padding:10px">'.$this->description_kiosque.'</p>'?> -</div> - <div id="dockmenuDiv"></div> - -<script type="text/javascript"> - window.scrollTo(0,200); -</script> -<?php -} -$this->closeBoite(); -?> diff --git a/library/Class/Systeme/ModulesMenu.php b/library/Class/Systeme/ModulesMenu.php index deea2f60a75..c3f5d0fd044 100644 --- a/library/Class/Systeme/ModulesMenu.php +++ b/library/Class/Systeme/ModulesMenu.php @@ -106,7 +106,6 @@ class Class_Systeme_ModulesMenu extends Class_Systeme_ModulesAbstract { "RECH_GEO" => new Class_Systeme_ModulesMenu_RechercheGeographique(), "RECH_OAI" => new Class_Systeme_ModulesMenu_RechercheOai(), "CATALOGUE" => new Class_Systeme_ModulesMenu_Catalogue(), - "ETAGERE" => new Class_Systeme_ModulesMenu_Etagere(), "TAGS" => new Class_Systeme_ModulesMenu_Tags(), "PANIER" => new Class_Systeme_ModulesMenu_Paniers(), "ABON_AVIS" => new Class_Systeme_ModulesMenu_AbonneAvis(), diff --git a/library/Class/Systeme/ModulesMenu/Etagere.php b/library/Class/Systeme/ModulesMenu/Etagere.php deleted file mode 100644 index cb350078ba6..00000000000 --- a/library/Class/Systeme/ModulesMenu/Etagere.php +++ /dev/null @@ -1,45 +0,0 @@ -<?php -/** - * Copyright (c) 2012, Agence Française Informatique (AFI). All rights reserved. - * - * AFI-OPAC 2.0 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. - * - * There are special exceptions to the terms and conditions of the AGPL as it - * is applied to this software (see README file). - * - * AFI-OPAC 2.0 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 AFI-OPAC 2.0; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ -class Class_Systeme_ModulesMenu_Etagere extends Class_Systeme_ModulesMenu_Null{ - /** @var string */ - protected $_group = Class_Systeme_ModulesMenu::GROUP_MENU_CATALOGUES; - - /** @var string */ - protected $_type_module = 'ETAGERE'; - - /** @var int */ - protected $_popupWidth = 550; - - protected $_libelle = "Etagères"; - /** @var int */ - protected $_popupHeight = 200; - - protected $_isPhone = false; - - protected $_action = 'etagere'; - - protected $_defaultValues = array('titre' => 'Etagère'); // Titre de la boite - - public function getUrl($preferences = []) { - return BASE_URL . "/etagere/appelmenu?" . http_build_query($preferences) . "&reset=true"; - } -} -?> \ No newline at end of file -- GitLab