diff --git a/application/modules/admin/controllers/AccueilController.php b/application/modules/admin/controllers/AccueilController.php deleted file mode 100644 index e9b04f972c0ec697209eac2e93ebff38d932d818..0000000000000000000000000000000000000000 --- a/application/modules/admin/controllers/AccueilController.php +++ /dev/null @@ -1,485 +0,0 @@ -<?php -/** - * Copyright (c) 2012, Agence Française Informatique (AFI). All rights reserved. - * - * BOKEH 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). - * - * BOKEH 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 BOKEH; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -class Admin_AccueilController extends ZendAfi_Controller_Action { - protected - $id_profil, - $config, - $id_module, - $type_module, - $_systemeModulesAccueil; - - - public function preDispatch() { - parent::preDispatch(); - - if ($this->isPopupRequest()) { - $this->getHelper('ViewRenderer')->setLayoutScript('subModal.phtml'); - } - - $this->profil = $this->view->profil = ( $profil = Class_Profil::find($this->_getParam('id_profil'))) - ? $profil - : Class_Profil::getCurrentProfil(); - - $this->id_profil = $this->view->id_profil = $this->view->id_profil_maj = $this->profil->getId(); - - $user = Class_Users::getIdentity(); - - if ((!$user->isAdminBib() && !$user->hasRightConfigFront()) - || ($user->isAdminBib() && ($user->getIdSite() !== $this->profil->getIdSite()))) - return $this->_redirectToIndex(); - - $this->type_module = $this->_getParam('type_module'); - $this->_systemeModulesAccueil = new Class_Systeme_ModulesAccueil(); - $this->id_module = $this->view->id_module = $this->_request->getParam("id_module"); - $this->config = $this->_request->getParam("config"); - - $this->preferences = $this->view->preferences = $this->_extractProperties(); - - $this->view->url = $this->view->url(); - $this->view->titre = $this->_('Propriétés du module'); - $this->view->id_bib = $this->profil->getIdSite(); - $this->view->libelle = $this->_getParam("libelle"); - $this->view->picto = $this->_getParam("picto"); - $this->view->combo_templates = ZendAfi_View_Helper_Accueil_Base::getComboTemplates(isset($this->preferences["boite"]) - ? $this->preferences["boite"] - : '', - $this->profil); - } - - - public function indexAction() { - return $this->_forward('index', 'index'); - } - - - public function calendrierAction() { - return $this->_renderWidget($this->_('Propriérés de la boite calendrier'), - 'ZendAfi_Form_Configuration_CalendarWidget'); - } - - - public function rechsimpleAction() { - return $this->_renderWidget($this->_('Propriétés de la boite recherche simple'), - 'ZendAfi_Form_Configuration_SearchWidget'); - } - - - public function loginAction() { - return $this->_renderWidget($this->_('Propriétés de la boite de connexion'), - 'ZendAfi_Form_Configuration_LoginWidget'); - } - - - public function kiosqueAction() { - return $this->_renderWidget($this->_('Propriétés de la boite kiosque de notices'), - 'ZendAfi_Form_Configuration_KiosqueWidget'); - } - - - public function newsAction() { - return $this->_renderWidget($this->view->_('Propriétés de la boite article'), - 'ZendAfi_Form_Configuration_ArticleWidget', - ['id_bib' => $this->view->id_bib]); - } - - - protected function _renderWidget($title, $form, $more_settings = []) { - if(!$this->type_module) - return $this->_redirectToIndex(); - - $this->view->titre = $title; - - $settings = ('1' === $this->_getParam('styles_reload')) - ? $this->_request->getPost() - : $this->preferences; - - $settings = array_merge($settings, $more_settings); - - $form = call_user_func_array([$form, 'newWith'], [$settings]); - $form->setAction($this->view->url); - - $this->view->form = $form; - - if ($this->_request->isPost() && $form->isValid($settings)) - return $this->_updateEtRetour($settings, $this->type_module); - } - - - protected function _updateEtRetour($data, $type) { - $enreg = []; - - foreach ($data as $clef => $valeur) - $enreg[$clef] = addslashes($valeur); - - if ($this->config == "admin") { - $this->view->id_module = $this->id_module; - $this->view->properties = $this->_compactProperties($enreg); - return $this->getHelper('ViewRenderer')->renderScript('accueil/_retour.phtml'); - } - - $module_config = $this->profil->getModuleAccueilConfig($this->id_module, $type); - $module_config['preferences'] = array_merge($module_config['preferences'], $enreg); - - if($this->profil->updateModuleConfigAccueil($this->id_module, $module_config)->save()) - $this->_helper->notify($this->_('La configuration a été sauvegardée')); - - if('1' === $this->_getParam('styles_reload')) - return $this->_redirect(Class_Url::absolute()); - - return $this->_redirectClose(Class_Url::absolute()); - } - - - public function addBlockAction() { - if ($this->_request->isPost()) { - $post = $this->_request->getPost(); - $new_id = $this->profil->createNewModuleAccueilId(); - $division = $this->_getParam('division'); - $parent_id = $this->_getParam('id_module'); - $config = ['type_module' => $post['module_type'], - 'preferences' => Class_Systeme_ModulesAccueil::getValeursParDefaut($post['module_type']), - 'division' => $division]; - - $config['preferences']['titre'] = $post['titre']; - $config['preferences']['boite'] = $post['boite']; - - $parent_position = $this->profil->getModulePositionInDiv($parent_id, $division); - - $this->profil->updateModuleConfigAccueil($new_id, $config); - $my_position = $this->profil->getModulePositionInDiv($new_id, $division); - $this->profil - ->moveModuleOldDivPosNewDivPos($division, $my_position, - $division, $parent_position + 1) - ->save(); - - $this->view->reload = 'SITE'; - $viewRenderer = $this->getHelper('ViewRenderer'); - $viewRenderer->renderScript('accueil/_retour.phtml'); - } - } - - - public function deleteBlockAction() { - $this->profil - ->removeBoiteFromDiv($this->_getParam('id_module'), - $this->_getParam('division')) - ->save(); - - $this->_redirect($this->view->url(['id_profil' => $this->profil->getId()], - null, true), - ['prependBase' => false]); - } - - - public function menuverticalAction() { - $this->_simpleAction('MENU_VERTICAL'); - } - - - public function rechguideeAction() { - $this->_simpleAction('RECH_GUIDEE'); - } - - - public function cartezonesAction() { - $this->_simpleAction('CARTE_ZONES'); - } - - - public function preprocessSitoCategories() { - if ((int)$this->_getParam('type_aff',0)!=3) - return; - - if ($categories=explode('-',$this->_getParam('id_categorie'))) - $this->_request->setPost('id_categorie',$categories[0]); - } - - - public function sitothequeAction() { - $this->preprocessSitoCategories(); - $this->_simpleAction('SITO'); - } - - - public function domainBrowserAction() { - $this->view->module_settings = $this->profil - ->getModuleAccueilConfig($this->id_module, 'DOMAIN_BROWSER')['preferences']; - $this->_simpleAction('DOMAIN_BROWSER'); - } - - - public function formationsWidgetAction() { - $this->view->module_settings = $this->profil - ->getModuleAccueilConfig($this->id_module, 'FORMATIONS_WIDGET')['preferences']; - $this->_simpleAction('FORMATIONS_WIDGET'); - } - - - public function rssAction() { - $this->_simpleAction('RSS'); - } - - - public function langueAction() { - $this->_simpleAction('LANGUE'); - } - - - public function libraryAction() { - $this->view->module_settings = $this->profil - ->getModuleAccueilConfig($this->id_module, 'LIBRARY')['preferences']; - - $this->_simpleAction('LIBRARY'); - } - - - public function compteursAction() { - $this->_simpleAction('COMPTEURS'); - } - - public function pretsAction() { - $this->_simpleAction('PRETS'); - } - - public function historiqueRecherchesAction() { - $this->_simpleAction('HISTORIQUE_RECHERCHES'); - } - - public function reservationsAction() { - $this->_simpleAction('RESERVATIONS'); - } - - public function multimediaAction() { - $this->_simpleAction('MULTIMEDIA'); - } - - public function newslettersAction() { - $this->_simpleAction('NEWSLETTERS'); - } - - public function panierAction() { - $this->_simpleAction('PANIER'); - } - - - public function bibliothequeNumeriqueAction() { - if (1 == $this->_getParam('styles_reload')) { - $this->view->preferences = $this->_request->getPost(); - return ; - } - - $this->_simpleAction('BIB_NUMERIQUE'); - } - - - public function tagsAction() { - // Retour du formulaire - if ($this->_request->isPost()) { - $enreg = $this->_request->getPost(); - $enreg['nombre'] = (int)$this->_getParam('nombre', 10); - $enreg['limite'] = (int)$this->_getParam('limite', 1000); - $enreg['type_tags'] = $enreg['type_tags_codes']; - $this->_updateEtRetour($enreg, 'TAGS'); - } else { - $this->view->catalogues = Class_Catalogue::getCataloguesForCombo(); - } - } - - - public function critiquesAction() { - if ($this->_request->isPost()) { - $enreg = $this->_request->getPost(); - if ($enreg["id_panier"]) { - $user = ZendAfi_Auth::getInstance()->getIdentity(); - $enreg["id_catalogue"] = 0; - $enreg["id_user"] = $user->ID_USER; - - } else { - $enreg["id_user"] = 0; - } - - $this->_updateEtRetour($enreg, 'CRITIQUES'); - } - - $this->view->catalogues = Class_Catalogue::getCataloguesForCombo(); - $this->view->paniers = Class_PanierNotice::getPaniersForCombo(); - } - - - public function catalogueAction() { - if ($this->_request->isPost()) { - extract($_POST); - $nb_requete = intval($nb_requete); - if (!$nb_requete) - $nb_requete = 200; - - $nb_aff = intval($nb_aff); - if (!$nb_aff) - $nb_aff = 10; - - if ($ordre == "1") - $nb_requete = $nb_aff; // si ordre strict on ne lit pas plus de notices qu'on en affiche - - $enreg["message"] = $message; - $enreg["notices"] = $notices; - $enreg["format"] = $format; - $enreg["ordre"] = $ordre; - $enreg["type_doc"] = $type_doc; - $enreg["section"] = $section; - $enreg["genre"] = $genre; - $enreg["dewey"] = $dewey; - $enreg["pcdm4"] = $pcdm4; - $enreg["matiere"] = $matiere; - $enreg["nb_requete"] = $nb_requete; - $enreg["nb_aff"] = $nb_aff; - - $this->_updateEtRetour($enreg, 'CATALOGUE'); - } - } - - - public function premierChapitreAction() { - $this->view->paniers = Class_PanierNotice::getPaniersForCombo(); - $this->_simpleAction('PREMIER-CHAPITRE'); - } - - - protected function isAFlashStyleSelected() { - return Class_Systeme_ModulesAccueil::moduleByCode('KIOSQUE') - ->isAFlashStyle($this->_getParam('style_liste', - $this->view->preferences['style_liste'])); - } - - - protected function _unsetStyleReload(&$enreg) { - if (array_key_exists('styles_reload', $enreg)) { - unset($enreg["styles_reload"]); - } - } - - - protected function _setTypeDAnalyse(&$enreg) { - $enreg = isset($enreg['nb_notices']) ? $enreg : array_merge($enreg,['nb_notices' => 1]) ; - - $enreg['nb_notices'] = (1 < (int)$enreg['nb_notices']) ? - (int)$enreg["nb_notices"] - : 1; - - $enreg = isset($enreg['nb_analyse']) ? $enreg : array_merge($enreg,['nb_analyse' => 10]) ; - - $enreg['nb_analyse'] = (int)$enreg['nb_analyse']; - if ($enreg['nb_analyse'] < $enreg['nb_notices']) - $enreg['nb_analyse'] = $enreg['nb_notices'] + 10; - } - - - protected function _setPanierOrDomaine(&$enreg) { - if ($enreg['id_panier'] > 0) - $enreg['id_catalogue'] = 0; - if ($enreg['id_catalogue'] > 0) - $enreg['id_panier'] = 0; - } - - - protected function _updateConfig($type) { - $enreg = $this->_request->getPost(); - $this->_unsetStyleReload($enreg); - $this->_setTypeDAnalyse($enreg); - $this->_setPanierOrDomaine($enreg); - $this->_updateEtRetour($enreg, $type); - } - - - public function conteneur2colonnesAction() { - if ($this->_request->isPost()) { - $enreg = $this->_request->getPost(); - - $this->preferences = array_merge($this->preferences, $enreg); - foreach(['gauche', 'droite'] as $colonne) - $enreg['col_' . $colonne .'_module_id'] = $this->createModuleFor($colonne); - - return $this->_updateEtRetour($enreg, 'CONTENEUR_DEUX_COLONNES'); - } - - $modules_accueil = Class_Systeme_ModulesAccueil::getModules(); - $modules = []; - foreach ($modules_accueil as $key => $module) - $modules[$key] = $module->getLibelle(); - - $this->view->modules = $modules; - } - - - protected function createModuleFor($colonne) { - return Class_Systeme_ModulesAccueil_ConteneurDeuxColonnes::createModuleForCol($colonne, - $this->preferences, - $this->id_module); - - } - - - private function _simpleAction($type) { - if ($this->_request->isPost()) - $this->_updateEtRetour($this->_request->getPost(), $type); - } - - - /** - * @param array $datas - * @return string - */ - private function _compactProperties($datas) { - $properties = array(); - foreach ($datas as $k => $v) { - $properties[] = $k . '=' . $v; - } - - return implode(Class_Profil::PROPERTIES_DELIMITER, $properties); - } - - - protected function _extractProperties() { - if($this->config != 'admin') - return $this->profil->getOrCreateConfigAccueil($this->id_module, $this->type_module); - - if (null != ($props = $this->_getParam("proprietes"))) { - $props = explode(Class_Profil::PROPERTIES_DELIMITER, $props); - foreach ($props as $prop) { - $pos = strpos($prop, '='); - $clef = substr($prop, 0, $pos); - $valeur = substr($prop, ($pos + 1)); - $properties[$clef] = $valeur; - } - } else { - $cls = new Class_Systeme_ModulesAccueil(); - $properties = $cls->getValeursParDefaut($this->type_module); - } - - return $properties; - } - - - protected function _getStylesListes() { - return Class_Systeme_ModulesAccueil::moduleByCode('KIOSQUE') - ->getStylesListes(); - } -} diff --git a/application/modules/admin/controllers/MenusController.php b/application/modules/admin/controllers/MenusController.php deleted file mode 100644 index 1c62a22769e8c52d03e097767cb9b4a28942f366..0000000000000000000000000000000000000000 --- a/application/modules/admin/controllers/MenusController.php +++ /dev/null @@ -1,272 +0,0 @@ -<?php -/** - * Copyright (c) 2012, Agence Française Informatique (AFI). All rights reserved. - * - * BOKEH 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). - * - * BOKEH 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 BOKEH; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -require_once 'AccueilController.php'; - -class Admin_MenusController extends Admin_AccueilController { - protected $type_menu; - - - public function preDispatch() { - $this->type_menu = $this->_getParam('type_menu'); - parent::preDispatch(); - $this->type_module = $this->type_menu; - } - - - public function editAction() { - $widget = (new Class_Systeme_Widget()) - ->setId($this->_getParam('id')) - ->setIdProfil($this->_getParam('id_profil')) - ->setParent($this->_getParam('parent')) - ->setDataHelper(new Class_Systeme_Widget_Menu()) - ->load(); - - if(!$widget) - return $this->_redirectToIndex(); - - return $this->_render($widget); - } - - - protected function _render($widget) { - $this->view->titre = $widget->getTitle(); - $this->view->form = $form = call_user_func_array([$widget->getForm(), 'newWith'], [$widget->forForm()]); - $form->setAction($this->view->url); - if ($this->_request->isPost() && $form->isValid($this->_request->getPost())) - return $this->_update($widget->setNewDatas($this->_request->getPost())); - } - - - protected function _update($widget) { - $widget->updateProfile() - ? $this->_helper->notify($this->_('La configuration de la boite %s a été sauvegardée', - $widget->getLabel())) - : $this->_helper->notify($this->_('Echec de la sauvegarde de la configuration de la boite %s', - $widget->getLabel())); - - return ('1' === $this->_getParam('styles_reload')) - ? $this->_redirect(Class_Url::absolute()) - : $this->_redirectClose(Class_Url::absolute()); - } - - - public function postDispatch() { - $modules_menu = new Class_Systeme_ModulesMenu(); - - if (!$modules_menu->isModuleAccueil($this->type_menu)) - return; - - $action = $modules_menu->getFonction($this->type_menu)->getAction(); - $this->renderScript('accueil/'.$action.'.phtml'); - } - - - public function indexAction() { - if ($this->_request->isPost()) { - $enreg = $_POST; - $this->_updateEtRetour($enreg); - } - } - - - public function avisAction() { - if ($this->_request->isPost()) { - $enreg = $_POST; - $nb = (int)($enreg['nb']); - ($nb < 1 or $nb > 50) ? - $this->retourErreur("Le nombre d'avis doit être compris entre 1 et 50") : - $this->_updateEtRetour($enreg); - } - } - - - public function newsAction() { - if ($this->_request->isPost()) { - $enreg = $_POST; - $enreg["nb_aff"] = (int)$enreg["nb_aff"]; - $enreg["nb_analyse"] = (int)$enreg["nb_analyse"]; - $this->_updateEtRetour($enreg); - } - } - - - public function lastnewsAction() { - if ($this->_request->isPost()) { - $enreg = $_POST; - $nb = (int)($enreg["nb"]); - ($nb < 1 or $nb > 50) ? - $this->retourErreur("Le nombre d'articles doit être compris entre 1 et 50"): - $this->_updateEtRetour($enreg); - } - } - - - public function rssAction() { - if ($this->_request->isPost()) { - $enreg = $_POST; - $nb = (int)($enreg["nb"]); - ($nb < 1 or $nb > 50) ? - $this->retourErreur("Le nombre à afficher doit être compris entre 1 et 50"): - $this->_updateEtRetour($enreg); - } - } - - - public function sitothequeAction() { - if ($this->_request->isPost()) { - $enreg = $_POST; - $nb = (int)($enreg["nb"]); - ($nb < 1 or $nb > 50) ? - $this->retourErreur("Le nombre à afficher doit être compris entre 1 et 50"): - $this->_updateEtRetour($enreg); - } - } - - - public function liensiteAction() { - if ($this->_request->isPost()) { - $enreg = $_POST; - (trim($enreg["url"])> "" and substr(strtolower($enreg["url"]),0,4) != "http") ? - $this->retourErreur("L'url saisie n'est pas correcte"): - $this->_updateEtRetour($enreg); - } - } - - - public function lienprofilAction() { - if ($this->_request->isPost()) { - $enreg = $_POST; - $this->_updateEtRetour($enreg); - } - } - - - public function googlemapAction() { - if ($this->_request->isPost()) { - $enreg = $_POST; - $enreg["id_bib"] = $enreg["bib"]; - unset($enreg["bib"]); - $this->_updateEtRetour($enreg); - } - - $bib = new Class_Bib(); - $this->view->combo_bibs = $bib->getComboBib($this->view->preferences["id_bib"],false,false); - } - - - public function catalogueAction() { - $selected_panier = null; - if (array_key_exists('id_panier', $this->view->preferences) && - array_key_exists('id_user', $this->view->preferences)) - $selected_panier = Class_PanierNotice::getLoader()->findFirstBy(['id' => $this->view->preferences['id_panier'], - 'id_user' => $this->view->preferences['id_user']]); - - if ($selected_panier !== null) - $this->view->preferences['id_panier'] = $selected_panier->getId(); - - if ($this->_request->isPost()) { - $enreg = $_POST; - if(!$enreg["titre"]) - $enreg["titre"]=$enreg["libelle"]; - - if($enreg["id_panier"]) { - $panier = Class_PanierNotice::getLoader()->find($enreg['id_panier']); - $enreg["id_catalogue"]=0; - $enreg['id_panier'] = $panier->getId(); - $enreg["id_user"] = $panier->getIdUser(); - } else { - $enreg["id_user"]=0; - } - $this->_updateEtRetour($enreg); - } - - $this->view->catalogues=Class_Catalogue::getCataloguesForCombo(); - $this->view->paniers=Class_PanierNotice::getPaniersForCombo(); - } - - - public function etagereAction() { - if ($this->_request->isPost()) { - $enreg = $_POST; - if (!$enreg["titre"]) - $enreg["titre"] = $enreg["libelle"]; - $this->_updateEtRetour($enreg); - } - } - - - public function albumAction() { - if ($this->_request->isPost()) { - $enreg=$_POST; - if(!$enreg["titre"]) $enreg["titre"]=$enreg["libelle"]; - $this->_updateEtRetour($enreg); - return; - } - - $this->view->albums = array(); - foreach(Class_Album::getLoader()->findAll() as $album) - $this->view->albums[$album->getId()] = $album->getAbsolutePath(); - asort($this->view->albums); - } - - - private function retourErreur($erreur) { - $this->view->erreur=$erreur; - $this->view->libelle=$_POST["libelle"]; - $this->view->picto=$_POST["picto"]; - $this->view->preferences=$_POST; - } - - - protected function _extractProperties() { - $module = (new Class_Systeme_ModulesMenu())->getFonction($this->type_menu); - return array_merge($module->extractPreferences($this->_getParam("preferences")), - $this->profil->getMenuHorizontal()->getMenuPrefencesByIdModule($this->id_module)); - } - - - protected function _updateEtRetour($data, $type = null) { - $enreg = []; - - foreach($data as $clef => $valeur) - $enreg[$clef] = addslashes($valeur); - - if($this->_updateMenuHorizontalInProfilAndSave($enreg)) - $this->_helper->notify($this->_('La configuration a été sauvegardée')); - - if('1' === $this->_getParam('styles_reload')) - return $this->_redirect(Class_Url::absolute()); - - return $this->_redirectClose(Class_Url::absolute()); - } - - - protected function _updateMenuHorizontalInProfilAndSave($enreg) { - if ('menu' != $this->_getParam('config')) - return ; - - $menu_horizontal = $this->profil->getMenuHorizontal()->updatePreferencesForModule($this->id_module, $enreg); - $this->profil->setCfgMenuHorizontal(['menus' => $menu_horizontal->asCfgProfil()]); - return $this->profil->save(); - } -} -?> \ No newline at end of file diff --git a/application/modules/admin/controllers/WidgetController.php b/application/modules/admin/controllers/WidgetController.php index f5cd084f44eb91b138b43007e87b9212c11bbda5..83b48b45409d24b668aa954448ec047e777a637b 100644 --- a/application/modules/admin/controllers/WidgetController.php +++ b/application/modules/admin/controllers/WidgetController.php @@ -85,6 +85,13 @@ class Admin_WidgetController extends ZendAfi_Controller_Action { } + public function addMenuAction() { + (new Class_Systeme_ModulesAccueil_MenuVertical())->addMenu(); + $this->_helper->notify($this->_('Menu ajouté')); + return $this->_redirectClose($this->_getReferer()); + } + + public function editMenuAction() { return $this->_edit(new Class_Systeme_Widget_Menu()); } diff --git a/application/modules/admin/views/scripts/accueil/_options_catalogue_panier.phtml b/application/modules/admin/views/scripts/accueil/_options_catalogue_panier.phtml deleted file mode 100644 index 48cfb11a38c7a6478719eadbacd8675980d8080c..0000000000000000000000000000000000000000 --- a/application/modules/admin/views/scripts/accueil/_options_catalogue_panier.phtml +++ /dev/null @@ -1,20 +0,0 @@ -<fieldset> - <legend>Sélection</legend> - <table cellspacing="2"> - - <tr> - <td class="droite">Vignettes </td> - <td class="gauche"><?php echo $this->formSelect("only_img",$this->preferences["only_img"],"",array("0" => "afficher le titre dans une image","1"=>"Afficher les notices avec vignettes uniquement")) ?></td> - </tr> - <tr> - <td class="droite">Domaine </td> - <td class="gauche"><?php echo $this->formSelect("id_catalogue",$this->preferences["id_catalogue"],array("onchange"=>"$('#id_panier').val('')"),$this->catalogues) ?></td> - </tr> - - <tr> - <td class="droite">Panier </td> - <td class="gauche"><?php echo $this->formSelect("id_panier", $this->preferences["id_panier"],array("onchange"=>"$('#id_catalogue').val('')"),$this->paniers) ?></td> - </tr> - - </table> -</fieldset> diff --git a/application/modules/admin/views/scripts/accueil/_retour.phtml b/application/modules/admin/views/scripts/accueil/_retour.phtml deleted file mode 100644 index f8747b3ddc4512fe8f9f74eabcc4acf0c4bed3fa..0000000000000000000000000000000000000000 --- a/application/modules/admin/views/scripts/accueil/_retour.phtml +++ /dev/null @@ -1,12 +0,0 @@ -<script> - if (parent.hidePopWin) { - parent.hidePopWin(false); - <?php - echo ($this->reload == "SITE") - ? 'parent.window.location=parent.document.location.href;' - : 'parent.retourMajProprietes('.$this->id_module.',"'.$this->properties.'");opacDialogClose();'; - ?> - } else { - window.close(); - } -</script> diff --git a/application/modules/admin/views/scripts/accueil/add-block.phtml b/application/modules/admin/views/scripts/accueil/add-block.phtml deleted file mode 100644 index bde0df0743f5255ffe5d208b0d50cb59d30ddbfc..0000000000000000000000000000000000000000 --- a/application/modules/admin/views/scripts/accueil/add-block.phtml +++ /dev/null @@ -1,25 +0,0 @@ -<center> - <h1><?php echo $this->_('Ajouter une boîte');?></h1><br> - <div class="formTable"> - <form method="post" action="<?php echo $this->url ?>"> - <fieldset> - <legend><?php echo $this->_('Généralités');?></legend> - <table cellspacing="2"> - <tr> - <td class="droite"><?php echo $this->_('Type de boîte');?> </td> - <td class="gauche"><?php echo $this->comboModuleAccueil($this->profil); ?></td> - </tr> - <tr> - <td class="droite"><?php echo $this->_('Titre');?> </td> - <td class="gauche"><input type="text" name="titre" size="50" maxlength="60" value="** Nouvelle boîte **"></td> - </tr> - <tr> - <td class="droite"><?php echo $this->_('Style de boite');?> </td> - <td class="gauche"><?php echo $this->combo_templates; ?></td> - </tr> - </table> - </fieldset> - <?php echo $this->formSubmit('', $this->_('Valider'), ["class" => "bouton"]); ?> - </form> - </div> -</center> diff --git a/application/modules/admin/views/scripts/accueil/bibliotheque-numerique.phtml b/application/modules/admin/views/scripts/accueil/bibliotheque-numerique.phtml deleted file mode 100644 index 9cdc9d93699d7af894cf4fce94a838cc5ae9e7c2..0000000000000000000000000000000000000000 --- a/application/modules/admin/views/scripts/accueil/bibliotheque-numerique.phtml +++ /dev/null @@ -1,11 +0,0 @@ -<center> - <h1><?php echo $this->_('Propriétés de la bibliothèque numérique'); ?></h1><br> - <div class="formTable"> - <?php - $form = ZendAfi_Form_Configuration_BibNumerique::newWith($this->preferences); - $form->setAction($this->url); - - echo $this->renderForm($form); - ?> - </div> -</center> diff --git a/application/modules/admin/views/scripts/accueil/calendrier.phtml b/application/modules/admin/views/scripts/accueil/calendrier.phtml deleted file mode 100644 index c52ca489f905555642d9f8210fc3130ba4abfdcd..0000000000000000000000000000000000000000 --- a/application/modules/admin/views/scripts/accueil/calendrier.phtml +++ /dev/null @@ -1 +0,0 @@ -<?php echo $this->renderForm($this->form); ?> diff --git a/application/modules/admin/views/scripts/accueil/cartezones.phtml b/application/modules/admin/views/scripts/accueil/cartezones.phtml deleted file mode 100644 index 58e2d9ec43efd2f18955a570aab73d192d91dda2..0000000000000000000000000000000000000000 --- a/application/modules/admin/views/scripts/accueil/cartezones.phtml +++ /dev/null @@ -1,35 +0,0 @@ -<center> -<h1>Propriétés de la carte des zones</h1><br> -<div class="formTable"> - <form method="post" action="<?php echo $this->url ?>"> - - <fieldset> - <legend>Affichage</legend> - <table cellspacing="2"> - - <tr> - <td class="droite">Style de boite </td> - <td class="gauche"><?php echo $this->combo_templates ?></td> - </tr> - - </table> - </fieldset> - <br> - - <fieldset> - <legend>Généralités</legend> - <table cellspacing="2"> - <tr> - <td class="droite">Titre </td> - <td class="gauche"><input type="text" name="titre" size="50" value="<?php print($this->preferences["titre"]); ?>"></td> - </tr> - <tr> - <td class="droite">Message sous la carte </td> - <td class="gauche"><input type="text" name="message_carte" size="50" value="<?php print($this->preferences["message_carte"]); ?>"></td> - </tr> - </table> - </fieldset> - - <?php echo $this->formSubmit("Valider","Valider",array("class" => "bouton")) ?> - </form> - </div> diff --git a/application/modules/admin/views/scripts/accueil/compteurs.phtml b/application/modules/admin/views/scripts/accueil/compteurs.phtml deleted file mode 100644 index 99db4ecee51ebde02e1892a264770e8086154b99..0000000000000000000000000000000000000000 --- a/application/modules/admin/views/scripts/accueil/compteurs.phtml +++ /dev/null @@ -1,38 +0,0 @@ -<center> -<h1>Propriétés d'affichage des compteurs</h1><br> -<div class="formTable"> - <form method="post" action="<?php echo $this->url ?>"> - - <fieldset> - <legend>Affichage</legend> - <table cellspacing="2"> - - <tr> - <td class="droite">Style de boite </td> - <td class="gauche"><?php echo $this->combo_templates ?></td> - </tr> - <tr> - <td class="droite">Titre de la boite </td> - <td class="gauche"><input type="text" name="titre" size="52" value="<?php print($this->preferences["titre"]); ?>"></td> - </tr> - - </table> - </fieldset> - <br> - - <fieldset> - <legend>Compteurs à afficher</legend> - <table cellspacing="2"> - <tr> - <td class="droite">Nombre de notices </td> - <td class="gauche"> - <?php echo $this->formSelect("nb_notices",$this->preferences["nb_notices"],"",array("1" => "oui","0"=>"non")) ?> - </td> - </tr> - - </table> - </fieldset> - - <?php echo $this->formSubmit("Valider","Valider",array("class" => "bouton")) ?> - </form> - </div> diff --git a/application/modules/admin/views/scripts/accueil/conteneur2colonnes.phtml b/application/modules/admin/views/scripts/accueil/conteneur2colonnes.phtml deleted file mode 100644 index f1ec6307bfb25ecb1632eb4f89a5f334d61b30f3..0000000000000000000000000000000000000000 --- a/application/modules/admin/views/scripts/accueil/conteneur2colonnes.phtml +++ /dev/null @@ -1,58 +0,0 @@ -<center> - <h1>Propriétés du module Deux colonnes</h1><br> - <div class="formTable"> - <form class="news" method="post" action="<?php echo $this->url ?>"> - - <fieldset> - <legend>Affichage</legend> - <table cellspacing="2"> - - <tr> - <td class="droite">Style de boite </td> - <td class="gauche"><?php echo $this->combo_templates ?></td> - </tr> - - </table> - </fieldset> - <br> - - <fieldset> - <legend>Généralités</legend> - <table cellspacing="2"> - <tr> - <td class="droite">Titre </td> - <td class="gauche"> - <input type="text" name="titre" size="55" value='<?php print htmlspecialchars($this->preferences["titre"], ENT_QUOTES) ?>' > - </td> - </tr> - </table> - </fieldset> - <br> - - <fieldset> - <legend>Colonnes</legend> - <table cellspacing="2"> - <tr> - <td class="droite">Module à gauche</td> - <td class="gauche"> - <?php echo $this->formSelect("col_gauche_type", - $this->preferences["col_gauche_type"], - "", $this->modules) ?> - </td> - </tr> - <tr> - <td class="droite">Module à droite</td> - <td class="gauche"> - <?php echo $this->formSelect("col_droite_type", - $this->preferences["col_droite_type"], - "", $this->modules) ?> - </td> - </tr> - </table> - </fieldset> - <br> - - <?php echo $this->formSubmit("Valider","Valider",array("class" => "bouton")) ?> - </form> - </div> -</center> diff --git a/application/modules/admin/views/scripts/accueil/critiques.phtml b/application/modules/admin/views/scripts/accueil/critiques.phtml deleted file mode 100644 index 79baf2c42bdc2565db258b18818caa3abaf40bf7..0000000000000000000000000000000000000000 --- a/application/modules/admin/views/scripts/accueil/critiques.phtml +++ /dev/null @@ -1,109 +0,0 @@ -<?php -Class_ScriptLoader::getInstance() -->addJQueryReady(' -function toggleHierarchical() { - if ($("#hierarchical").is(":checked")) { - $(".non-hierarchical").hide(); - $("#only_img").parents("tr").hide(); - $("#id_panier").parents("tr").hide(); - return; - } - - $(".non-hierarchical").show(); - $("#only_img").parents("tr").show(); - $("#id_panier").parents("tr").show(); -} - - -$("#hierarchical").change(toggleHierarchical); -toggleHierarchical(); -'); -?> -<center> - <h1>Propriétés du module : Critiques</h1><br> - <div class="formTable"> - <form method="post" action="<?php echo $this->url; ?>"> - - <fieldset> - <legend>Affichage</legend> - <table cellspacing="2"> - <tr> - <td class="droite">Titre du bloc </td> - <td class="gauche"><input type="text" name="titre" size="50" maxlength="60" value="<?php print($this->preferences['titre']); ?>"></td> - </tr> - - <tr> - <td class="droite">Style de boite </td> - <td class="gauche"><?php echo $this->combo_templates; ?></td> - </tr> - <tr> - <td class="droite">Proposer un fil Rss </td> - <td class="gauche"> - <?php echo $this->formCheckbox('rss_avis', - $this->preferences['rss_avis'], - null, - ['1', '0']); ?> - </td> - </tr> - </table> - </fieldset> - <br> - - <fieldset> - <legend>Critiques</legend> - <table cellspacing="2"> - <tr> - <td class="droite">Origine des critiques </td> - <td class="gauche"> - <?php echo $this->formSelect('abon_ou_bib', - $this->preferences['abon_ou_bib'], - '', - ['1' => 'Bibliothécaire', - '0' => 'Abonné ou utilisateur du site', - 'all' => 'Tout le monde']); ?> - </td> - </tr> - - <tr> - <td class="droite">Navigation hiérarchique </td> - <td class="gauche"> - <?php echo $this->formCheckbox('hierarchical', - $this->preferences['hierarchical'], - null, - ['1', '0']); ?> - </td> - </tr> - - <tr class="non-hierarchical"> - <td class="droite">Nombre à afficher </td> - <td class="gauche"><input type="text" name="nb_aff_avis" size="2" maxlength="2" value="<?php print($this->preferences['nb_aff_avis']); ?>"></td> - </tr> - <tr class="non-hierarchical"> - <td class="droite">Ordre d'affichage </td> - <td class="gauche"> - <?php - echo $this->formRadioButtons('display_order', - $this->preferences['display_order'], - ['CreationDesc' => 'Par date de création (plus récent en premier)', - 'Random' => 'Aléatoire']); - ?> - </td> - </tr> - <tr> - <td class="droite">Couper les critiques à </td> - <td class="gauche"><input type="text" name="nb_words" size="3" maxlength="3" value="<?php print($this->preferences['nb_words']); ?>">mots</td> - </tr> - </table> - </fieldset> - - <?php - echo $this->partial('accueil/_options_catalogue_panier.phtml', - ['preferences' => $this->preferences, - 'catalogues' => $this->catalogues, - 'paniers' => $this->paniers]); - ?> - - <?php echo $this->formSubmit('Valider', 'Valider', ['class' => 'bouton']); ?> - </form> - </div> -</center> diff --git a/application/modules/admin/views/scripts/accueil/domain-browser.phtml b/application/modules/admin/views/scripts/accueil/domain-browser.phtml deleted file mode 100644 index 29653b2893363c86625cdb7f1b3fc4b7ad7e973a..0000000000000000000000000000000000000000 --- a/application/modules/admin/views/scripts/accueil/domain-browser.phtml +++ /dev/null @@ -1,5 +0,0 @@ -<?php -$form = ZendAfi_Form_Configuration_DomainWidget::newWith($this->module_settings); -$form->setAction($this->url); -echo $this->renderForm($form); -?> diff --git a/application/modules/admin/views/scripts/accueil/formations-widget.phtml b/application/modules/admin/views/scripts/accueil/formations-widget.phtml deleted file mode 100644 index 5dc149a9912fba7a72c1d86a58de81663609cf46..0000000000000000000000000000000000000000 --- a/application/modules/admin/views/scripts/accueil/formations-widget.phtml +++ /dev/null @@ -1,5 +0,0 @@ -<?php -$form = ZendAfi_Form_Configuration_FormationsWidget::newWith($this->module_settings); -$form->setAction($this->url); -echo $this->renderForm($form); -?> diff --git a/application/modules/admin/views/scripts/accueil/historique-recherches.phtml b/application/modules/admin/views/scripts/accueil/historique-recherches.phtml deleted file mode 100644 index 3171757c16ce4745fc89426de8fa7de1beb6b2f2..0000000000000000000000000000000000000000 --- a/application/modules/admin/views/scripts/accueil/historique-recherches.phtml +++ /dev/null @@ -1,23 +0,0 @@ -<center> -<h1>Propriétés du module Historique de recherches</h1><br> -<div class="formTable"> - <form method="post" action="<?php echo $this->url ?>"> - - <fieldset> - <legend>Affichage</legend> - <table cellspacing="2"> - <tr> - <td class="droite">Style de boite </td> - <td class="gauche"><?php echo $this->combo_templates ?></td> - </tr> - <tr> - <td class="droite">Titre de la boite </td> - <td class="gauche"><input type="text" name="titre" size="52" value="<?php print($this->preferences["titre"]); ?>"></td> - </tr> - - </table> - </fieldset> - - <?php echo $this->formSubmit("Valider","Valider",array("class" => "bouton")) ?> - </form> - </div> diff --git a/application/modules/admin/views/scripts/accueil/kiosque.phtml b/application/modules/admin/views/scripts/accueil/kiosque.phtml deleted file mode 100644 index 7ee05ef61b44d57926ffe55789e46bdc888784b5..0000000000000000000000000000000000000000 --- a/application/modules/admin/views/scripts/accueil/kiosque.phtml +++ /dev/null @@ -1 +0,0 @@ -<?php echo $this->renderForm($this->form); return;?> diff --git a/application/modules/admin/views/scripts/accueil/langue.phtml b/application/modules/admin/views/scripts/accueil/langue.phtml deleted file mode 100644 index 98c5b06091e13136ea330e31cb112a70c00f2a4e..0000000000000000000000000000000000000000 --- a/application/modules/admin/views/scripts/accueil/langue.phtml +++ /dev/null @@ -1,24 +0,0 @@ -<center> -<h1>Propriétés d'affichage du sélecteur de langue</h1><br> -<div class="formTable"> - <form method="post" action="<?php echo $this->url ?>"> - - <fieldset> - <legend>Affichage</legend> - <table cellspacing="2"> - - <tr> - <td class="droite">Style de boite </td> - <td class="gauche"><?php echo $this->combo_templates ?></td> - </tr> - <tr> - <td class="droite">Titre de la boite </td> - <td class="gauche"><input type="text" name="titre" size="52" value="<?php print($this->preferences["titre"]); ?>"></td> - </tr> - - </table> - </fieldset> - - <?php echo $this->formSubmit("Valider","Valider",array("class" => "bouton")) ?> - </form> - </div> diff --git a/application/modules/admin/views/scripts/accueil/library.phtml b/application/modules/admin/views/scripts/accueil/library.phtml deleted file mode 100644 index 0159b33ce9d83a50357363208a0d2f8a369b1bc8..0000000000000000000000000000000000000000 --- a/application/modules/admin/views/scripts/accueil/library.phtml +++ /dev/null @@ -1,11 +0,0 @@ -<center> - <h1><?php echo $this->_('Propriétés d\'affichage du module bibliothèques');?></h1><br> - <div class="formTable"> - <?php - $form = ZendAfi_Form_Configuration_LibraryWidget::newWith($this->module_settings); - $form->setAction($this->url); - - echo $this->renderForm($form); - ?> - </div> -</center> diff --git a/application/modules/admin/views/scripts/accueil/login.phtml b/application/modules/admin/views/scripts/accueil/login.phtml deleted file mode 100644 index c52ca489f905555642d9f8210fc3130ba4abfdcd..0000000000000000000000000000000000000000 --- a/application/modules/admin/views/scripts/accueil/login.phtml +++ /dev/null @@ -1 +0,0 @@ -<?php echo $this->renderForm($this->form); ?> diff --git a/application/modules/admin/views/scripts/accueil/menuvertical.phtml b/application/modules/admin/views/scripts/accueil/menuvertical.phtml deleted file mode 100644 index a84b4da6f20048cda7de3da30c042ae537be6990..0000000000000000000000000000000000000000 --- a/application/modules/admin/views/scripts/accueil/menuvertical.phtml +++ /dev/null @@ -1,76 +0,0 @@ -<center> -<h1>Propriétés du menu vertical</h1><br> -<div class="formTable"> - <form method="post" action="<?php echo $this->url ?>"> - - <fieldset> - <legend>Affichage</legend> - <table cellspacing="2"> - - <tr> - <td class="droite">Style de boite </td> - <td class="gauche"><?php echo $this->combo_templates ?></td> - </tr> - - </table> - </fieldset> - <br> - - <fieldset> - <legend>Menu</legend> - <table cellspacing="2"> - <tr> - <td class="droite">Afficher le titre du menu </td> - <td> - <?php - echo $this->formCheckbox('afficher_titre', - null, - array('checked' => $this->preferences["afficher_titre"])); - ?> - </tr> - - - <tr> - <td class="droite">Menu deplié par défaut </td> - <td> - <?php - echo $this->formCheckbox('menu_deplie', - null, - array('checked' => $this->preferences["menu_deplie"])); - ?> - </tr> - - - <tr> - <td class="droite"><?php echo $this->_('Menu avec structure HTML simplifiée pour la css');?></td> - <td> - <?php - echo $this->formCheckbox('new_html', - null, - array('checked' => $this->preferences["new_html"])); - ?> - </tr> - - - <tr> - <td class="droite"><?php echo $this->_('Menu avec interrupteur à bascule');?></td> - <td> - <?php - echo $this->formCheckbox('toggle_menu', - null, - ['checked' => $this->preferences["toggle_menu"]]); - ?> - </tr> - - - <tr> - <td class="droite">Menu à afficher </td> - <td><?php echo $this->comboMenus($this->id_profil,$this->preferences["menu"]) ?></td> - </tr> - </table> - </fieldset> - - <?php echo $this->formSubmit("Valider","Valider",array("class" => "bouton")) ?> - </form> - </div> -</center> diff --git a/application/modules/admin/views/scripts/accueil/multimedia.phtml b/application/modules/admin/views/scripts/accueil/multimedia.phtml deleted file mode 100644 index ff2ea6d5c61703c7768dd0a12f1458cd69b6068b..0000000000000000000000000000000000000000 --- a/application/modules/admin/views/scripts/accueil/multimedia.phtml +++ /dev/null @@ -1,24 +0,0 @@ -<center> -<h1>Propriétés du module Postes Multimédia</h1><br> -<div class="formTable"> - <form method="post" action="<?php echo $this->url ?>"> - - <fieldset> - <legend>Affichage</legend> - <table cellspacing="2"> - - <tr> - <td class="droite">Style de boite </td> - <td class="gauche"><?php echo $this->combo_templates ?></td> - </tr> - <tr> - <td class="droite">Titre de la boite </td> - <td class="gauche"><input type="text" name="titre" size="52" value="<?php print($this->preferences["titre"]); ?>"></td> - </tr> - - </table> - </fieldset> - - <?php echo $this->formSubmit("Valider","Valider",array("class" => "bouton")) ?> - </form> - </div> diff --git a/application/modules/admin/views/scripts/accueil/news.phtml b/application/modules/admin/views/scripts/accueil/news.phtml deleted file mode 100644 index fb242e29dad1e1f4f12bec7faf7da998bfac22d7..0000000000000000000000000000000000000000 --- a/application/modules/admin/views/scripts/accueil/news.phtml +++ /dev/null @@ -1,3 +0,0 @@ -<?php -echo $this->renderForm($this->form); -?> diff --git a/application/modules/admin/views/scripts/accueil/newsletters.phtml b/application/modules/admin/views/scripts/accueil/newsletters.phtml deleted file mode 100644 index 427ce1b88a1111fa997e7a789268740c949584d2..0000000000000000000000000000000000000000 --- a/application/modules/admin/views/scripts/accueil/newsletters.phtml +++ /dev/null @@ -1,24 +0,0 @@ -<center> -<h1>Propriétés du module Lettres d'informations</h1><br> -<div class="formTable"> - <form method="post" action="<?php echo $this->url ?>"> - - <fieldset> - <legend>Affichage</legend> - <table cellspacing="2"> - - <tr> - <td class="droite">Style de boite </td> - <td class="gauche"><?php echo $this->combo_templates ?></td> - </tr> - <tr> - <td class="droite">Titre de la boite </td> - <td class="gauche"><input type="text" name="titre" size="52" value="<?php print($this->preferences["titre"]); ?>"></td> - </tr> - - </table> - </fieldset> - - <?php echo $this->formSubmit("Valider","Valider",array("class" => "bouton")) ?> - </form> - </div> diff --git a/application/modules/admin/views/scripts/accueil/panier.phtml b/application/modules/admin/views/scripts/accueil/panier.phtml deleted file mode 100644 index 0f2078924af588aef46dd7ead13d795d09b3cd19..0000000000000000000000000000000000000000 --- a/application/modules/admin/views/scripts/accueil/panier.phtml +++ /dev/null @@ -1,24 +0,0 @@ -<center> -<h1>Propriétés du module Panier</h1><br> -<div class="formTable"> - <form method="post" action="<?php echo $this->url ?>"> - - <fieldset> - <legend>Affichage</legend> - <table cellspacing="2"> - - <tr> - <td class="droite">Style de boite </td> - <td class="gauche"><?php echo $this->combo_templates ?></td> - </tr> - <tr> - <td class="droite">Titre de la boite </td> - <td class="gauche"><input type="text" name="titre" size="52" value="<?php print($this->preferences["titre"]); ?>"></td> - </tr> - - </table> - </fieldset> - - <?php echo $this->formSubmit("Valider","Valider",array("class" => "bouton")) ?> - </form> - </div> diff --git a/application/modules/admin/views/scripts/accueil/premier-chapitre.phtml b/application/modules/admin/views/scripts/accueil/premier-chapitre.phtml deleted file mode 100644 index 5ee9ef4ecb2b5c30b28340339e2ea7d32d6ea58f..0000000000000000000000000000000000000000 --- a/application/modules/admin/views/scripts/accueil/premier-chapitre.phtml +++ /dev/null @@ -1,125 +0,0 @@ -<script> - function pc_conf_view(type) { - if (type == 0) { - $("#pc_conf_panier").hide(); - $("#pc_conf_nb_aleat").show(); - $("#pc_conf_format").show(); - } - if (type == 1) { - $("#pc_conf_nb_aleat").hide(); - $("#pc_conf_panier").show(); - $("#pc_conf_format").show(); - } - if (type == 2) { - $("#pc_conf_nb_aleat").hide(); - $("#pc_conf_panier").hide(); - $("#pc_conf_format").hide(); - } - pc_ref_url(); - } - function pc_ref_url() { - var urlref = baseUrl + "/premier-chapitre" - var type = $("#type")[0].value; - var format = $("#format")[0].value; - if (type == 0) { - urlref += "/aleatoire"; - if ($("#nb_aff")[0].value != 8) urlref += "/nb/"+$("#nb_aff")[0].value; - } - if (type == 1) { - urlref += "/panier/"+$("#id_panier")[0].value; - } - if (type == 2) { - urlref += "/liste-complete"; - format = 0; - } - if (format > 0) urlref += "/format/"+format; - $("#pc_ref_url")[0].value = urlref; - } -</script> -<center> - <h1>Propriétés du module Premier-Chapitre</h1><br> - <div class="formTable"> - <form class="news" method="post" action="<?php echo $this->url ?>"> - - <fieldset> - <legend>Affichage</legend> - <table cellspacing="2"> - - <tr> - <td class="droite">Style de boite </td> - <td class="gauche"><?php echo $this->combo_templates ?></td> - </tr> - - </table> - </fieldset> - <br /> - - <fieldset> - <legend>Généralités</legend> - <table cellspacing="2"> - <tr> - <td class="droite">Titre </td> - <td class="gauche"> - <input type="text" name="titre" size="50" value='<?php print htmlspecialchars($this->preferences["titre"], ENT_QUOTES) ?>' > - </td> - </tr> - <tr> - <td class="droite">Texte d'introduction </td> - <td class="gauche"> - <input type="text" name="intro" size="50" value='<?php print htmlspecialchars($this->preferences["intro"], ENT_QUOTES) ?>' > - </td> - </tr> - </table> - </fieldset> - - <fieldset> - <legend>Mode d'affichage</legend> - <table cellspacing="2"> - <tr id="pc_conf_type"> - <td class="droite">Type de selection </td> - <td class="gauche"> - <select name="type" id="type" onchange="pc_conf_view(this.value);"> - <option value="0" <?php if($this->preferences["type"]==0) print(" selected"); ?>>Aléatoire</option> - <option value="1" <?php if($this->preferences["type"]==1) print(" selected"); ?>>Panier</option> - <option value="2" <?php if($this->preferences["type"]==2) print(" selected"); ?>>Toutes les notice</option> - </select> - </td> - </tr> - <tr id="pc_conf_nb_aleat"> - <td class="droite">Nombre à afficher<br/>(en mode aléatoire) </td> - <td class="gauche"><input type="text" id="nb_aff" name="nb_aff" size="4" value="<?php print($this->preferences["nb_aff"]); ?>" onchange="pc_ref_url();"></td> - </tr> - <tr id="pc_conf_panier"> - <td class="droite">Panier </td> - <td class="gauche"><?php echo $this->formSelect("id_panier", $this->preferences["id_panier"],['onchange'=>'pc_ref_url();'],$this->paniers) ?></td> - </tr> - <tr id="pc_conf_format"> - <td class="droite" valign="top">Format d'affichage</td> - <td class="gauche"> - <select name="format" id="format" onchange="pc_ref_url();"> - <option value="0" <?php if($this->preferences["format"]==0) print(" selected"); ?>>Vignettes seules</option> - <option value="1" <?php if($this->preferences["format"]==1) print(" selected"); ?>>Vignettes + Frame</option> - <option value="2" <?php if($this->preferences["format"]==2) print(" selected"); ?>>Vignettes + Frame + lien Notice</option> - </select> - </td> - </tr> - </table> - </fieldset> - - <?php echo $this->formSubmit("Valider","Valider",array("class" => "bouton")) ?> - </form><br/> - <fieldset> - <legend>Accès Direct</legend> - <div class="formTable"> - <table cellspacing="2"> - <tr> - <td class="droite">Url accès direct</td> - <td class="gauche"><input readonly id="pc_ref_url" name="pc_ref_url" size="50"></td> - </tr> - <tr><td colspan=2 class="gauche" style="font-weight:normal;">Attention : pour le contenu du bloc uniquement - ne contiendra ni titre, ni introduction</td></tr> - </table></div> - </fieldset> - </div> -<script> - pc_conf_view(<?php print $this->preferences["type"]; ?>); -</script> diff --git a/application/modules/admin/views/scripts/accueil/prets.phtml b/application/modules/admin/views/scripts/accueil/prets.phtml deleted file mode 100644 index 8dfeaf0728224a517d9761175123101103e9011b..0000000000000000000000000000000000000000 --- a/application/modules/admin/views/scripts/accueil/prets.phtml +++ /dev/null @@ -1,24 +0,0 @@ -<center> -<h1>Propriétés du module Prêts</h1><br> -<div class="formTable"> - <form method="post" action="<?php echo $this->url ?>"> - - <fieldset> - <legend>Affichage</legend> - <table cellspacing="2"> - - <tr> - <td class="droite">Style de boite </td> - <td class="gauche"><?php echo $this->combo_templates ?></td> - </tr> - <tr> - <td class="droite">Titre de la boite </td> - <td class="gauche"><input type="text" name="titre" size="52" value="<?php print($this->preferences["titre"]); ?>"></td> - </tr> - - </table> - </fieldset> - - <?php echo $this->formSubmit("Valider","Valider",array("class" => "bouton")) ?> - </form> - </div> diff --git a/application/modules/admin/views/scripts/accueil/rechguidee.phtml b/application/modules/admin/views/scripts/accueil/rechguidee.phtml deleted file mode 100644 index 900a12e5084443539cd09d911408609f061ff97e..0000000000000000000000000000000000000000 --- a/application/modules/admin/views/scripts/accueil/rechguidee.phtml +++ /dev/null @@ -1,34 +0,0 @@ -<center> -<h1>Propriétés de la recherche guidée</h1><br> -<div class="formTable"> - <form method="post" action="<?php echo $this->url ?>"> - - <fieldset> - <legend>Affichage</legend> - <table cellspacing="2"> - - <tr> - <td class="droite">Style de boite </td> - <td class="gauche"><?php echo $this->combo_templates ?></td> - </tr> - - </table> - </fieldset> - <br> - - <fieldset> - <legend>Généralités</legend> - <table cellspacing="2"> - - <tr> - <td class="droite">Titre </td> - <td class="gauche"><input type="text" name="titre" size="55" value="<?php print($this->preferences["titre"]); ?>"></td> - </tr> - - </table> - </fieldset> - - <?php echo $this->formSubmit("Valider","Valider",array("class" => "bouton")) ?> - </form> - </div> - diff --git a/application/modules/admin/views/scripts/accueil/rechsimple.phtml b/application/modules/admin/views/scripts/accueil/rechsimple.phtml deleted file mode 100644 index c52ca489f905555642d9f8210fc3130ba4abfdcd..0000000000000000000000000000000000000000 --- a/application/modules/admin/views/scripts/accueil/rechsimple.phtml +++ /dev/null @@ -1 +0,0 @@ -<?php echo $this->renderForm($this->form); ?> diff --git a/application/modules/admin/views/scripts/accueil/reservations.phtml b/application/modules/admin/views/scripts/accueil/reservations.phtml deleted file mode 100644 index e4744d14a2d8e5c957fad525d0e8b55a16c0b145..0000000000000000000000000000000000000000 --- a/application/modules/admin/views/scripts/accueil/reservations.phtml +++ /dev/null @@ -1,24 +0,0 @@ -<center> -<h1>Propriétés du module Réservations</h1><br> -<div class="formTable"> - <form method="post" action="<?php echo $this->url ?>"> - - <fieldset> - <legend>Affichage</legend> - <table cellspacing="2"> - - <tr> - <td class="droite">Style de boite </td> - <td class="gauche"><?php echo $this->combo_templates ?></td> - </tr> - <tr> - <td class="droite">Titre de la boite </td> - <td class="gauche"><input type="text" name="titre" size="52" value="<?php print($this->preferences["titre"]); ?>"></td> - </tr> - - </table> - </fieldset> - - <?php echo $this->formSubmit("Valider","Valider",array("class" => "bouton")) ?> - </form> - </div> diff --git a/application/modules/admin/views/scripts/accueil/rss.phtml b/application/modules/admin/views/scripts/accueil/rss.phtml deleted file mode 100644 index f2e1ddf2432f3d1ae6a1a7711efc2dd3cd22879a..0000000000000000000000000000000000000000 --- a/application/modules/admin/views/scripts/accueil/rss.phtml +++ /dev/null @@ -1,71 +0,0 @@ -<center> -<h1>Propriétés du module fils rss</h1><br> -<div class="formTable"> - <form method="post" action="<?php echo $this->url ?>"> - - <fieldset> - <legend>Affichage</legend> - <table cellspacing="2"> - - <tr> - <td class="droite">Style de boite </td> - <td class="gauche"><?php echo $this->combo_templates ?></td> - </tr> - - </table> - </fieldset> - <br> - - <fieldset> - <legend>Généralités</legend> - <table cellspacing="2"> - <tr> - <td class="droite">Titre </td> - <td class="gauche"><input type="text" name="titre" size="55" value="<?php print($this->preferences["titre"]); ?>"></td> - </tr> - </table> - </fieldset> - <br> - - <fieldset> - <legend>Fils Rss à afficher</legend> - <table cellspacing="2" width="100%"> - <tr> - <td class="droite" width="90px">Type de fils rss </td> - <td class="gauche"> - <?php - $onchange="$('.treeselect').treeselect('toggleVisibility', (this.value == '1'));"; - echo $this->formSelect("type_aff", - $this->preferences["type_aff"], - array("onchange" => $onchange), - array("1" => "Une sélection de catégories ou de fils Rss", - "2" => "Les fils Rss les plus récents")) - ?> - </td> - </tr> - </table> - - <div id="table_selection" width="100%"> - <?php - echo $this->treeSelect( - $this->preferences["id_items"], - $this->preferences["id_categorie"], - ($this->preferences["type_aff"] == "1"), - BASE_URL.'/admin/bib/allitems?id_bib='.$this->id_bib.'&type=rss', - "form"); - ?> - </div> - - <table cellspacing="2" width="100%"> - <tr id='option_nb_aff'> - <td class="droite" width="90px">Nombre à afficher </td> - <td class="gauche"><input type="text" name="nb_aff" size="2" maxlength="1" value="<?php print($this->preferences["nb_aff"]); ?>"></td> - </tr> - </table> - - </fieldset> - <br> - - <?php echo $this->formSubmit("Valider","Valider",array("class" => "bouton")) ?> - </form> - </div> diff --git a/application/modules/admin/views/scripts/accueil/sitotheque.phtml b/application/modules/admin/views/scripts/accueil/sitotheque.phtml deleted file mode 100644 index 42ac656b0aa2cc4c0a886a8317edf6536d231a4d..0000000000000000000000000000000000000000 --- a/application/modules/admin/views/scripts/accueil/sitotheque.phtml +++ /dev/null @@ -1,108 +0,0 @@ -<?php -Class_ScriptLoader::getInstance() -->addJQueryReady(' -function toggleDisplayTypeDependents() { - ("3" == $("#type_aff").val() || "2" == $("#type_aff").val()) ? $("#option_nb_aff").addClass("hidden") : $("#option_nb_aff").removeClass("hidden"); - - ("3" == $("#type_aff").val()) ? $("#option_display_order").addClass("hidden") : $("#option_display_order").removeClass("hidden"); -} - -$("#type_aff").change(function () { - toggleDisplayTypeDependents(); -}); - -toggleDisplayTypeDependents(); -'); -?> -<center> - <h1><?php echo $this->_('Propriétés du module sitothèque'); ?></h1><br> - <div class="formTable"> - <form method="post" action="<?php echo $this->url; ?>"> - - <fieldset> - <legend><?php echo $this->_('Affichage'); ?></legend> - <table cellspacing="2"> - <tr> - <td class="droite"><?php echo $this->_('Style de boite'); ?> </td> - <td class="gauche"><?php echo $this->combo_templates; ?></td> - </tr> - </table> - </fieldset> - <br> - - <fieldset> - <legend><?php echo $this->_('Généralités'); ?></legend> - <table cellspacing="2"> - <tr> - <td class="droite"><?php echo $this->_('Titre'); ?> </td> - <td class="gauche"><input type="text" name="titre" size="50" value="<?php print($this->preferences['titre']); ?>"></td> - </tr> - <tr> - <td class="droite"><?php echo $this->_('Proposer un fil Rss'); ?> </td> - <td class="gauche"> - <?php echo $this->formCheckbox('rss', - $this->preferences['rss'], - null, - ['1', '0']) ?> - </td> - </tr> - </table> - </fieldset> - <br> - - <fieldset> - <legend><?php echo $this->_('Sites à afficher'); ?></legend> - <table cellspacing="2" width="100%"> - <tr> - <td class="droite" width="90px"><?php echo $this->_('Type'); ?> </td> - <td class="gauche"> - <?php - echo $this->formSelect('type_aff', - $this->preferences['type_aff'], - [], - ['1' => $this->_('Affichage paginé'), - '2' => $this->_('Affichage groupé par catégorie'), - '3' => $this->_('Affichage hiérarchique par catégorie')]); - ?> - </td> - </tr> - </table> - - <div id="table_selection"> - <?php - echo $this->treeSelect($this->preferences['id_items'], - $this->preferences['id_categorie'], - true, - BASE_URL . '/admin/bib/allitems?id_bib=' . $this->id_bib . '&type=sito', - "form"); - ?> - </div> - - <table cellspacing="2" width="100%"> - <tr id='option_display_order'> - <td class="droite" width="90px"><?php echo $this->_('Ordre d\'affichage'); ?> </td> - <td class="gauche"> - <?php - echo $this->formRadio('display_order', - $this->preferences['display_order'], - [], - ['Random' => $this->_('Par ordre aléatoire'), - 'Selection' => $this->_('Par ordre de sélection'), - 'Recent' => $this->_('Les sites les plus récents')]); - ?> - </td> - </tr> - - <tr id='option_nb_aff'> - <td class="droite" width="90px"><?php echo $this->_('Nbre de sites par page'); ?> </td> - <td class="gauche"><input type="text" name="nb_aff" size="3" maxlength="3" value="<?php print($this->preferences['nb_aff']); ?>"></td> - </tr> - - </table> - </fieldset> - <br /> - - <?php echo $this->formSubmit('Valider', $this->_('Valider'), ['class' => 'bouton']); ?> - </form> - </div> -</center> diff --git a/application/modules/admin/views/scripts/accueil/tags.phtml b/application/modules/admin/views/scripts/accueil/tags.phtml deleted file mode 100644 index 1fa20256f6c34e1c38544ebb58bbb2ee4e7c2b7d..0000000000000000000000000000000000000000 --- a/application/modules/admin/views/scripts/accueil/tags.phtml +++ /dev/null @@ -1,77 +0,0 @@ -<?php -echo '<script src="'.URL_ADMIN_JS.'drag_and_drop.js'.'" type="text/javascript"> </script>'; -echo '<script src="'.URL_ADMIN_JS.'selection_champs.js'.'" type="text/javascript"> </script>'; -echo '<link rel="stylesheet" type="text/css" media="screen" href="'.URL_ADMIN_CSS.'drag_and_drop.css" />'; -echo $this->tagSelectionChamps("libelles"); - -?> -<center> - <h1>Propriétés d'affichage du nuage de tags</h1><br> - <div class="formTable"> - <form method="post" action="<?php echo $this->url ?>"> - - <fieldset> - <legend>Affichage</legend> - <table cellspacing="2"> - - <tr> - <td class="droite">Style de boite </td> - <td class="gauche"><?php echo $this->combo_templates ?></td> - </tr> - - </table> - </fieldset> - <br> - - <fieldset> - <legend>Généralités</legend> - <table cellspacing="2"> - <tr> - <td class="droite">Titre </td> - <td class="gauche"><input type="text" name="message" size="52" value="<?php print($this->preferences["message"]); ?>"></td> - </tr> - <tr> - <td class="droite" valign="top">Types de notices </td> - <td class="gauche"> - <?php - echo $this->formSelect("notices", - $this->preferences["notices"], - "", - array("0" => "Toutes", - "1" => "Les nouveautés", - "2" => "Les plus consultées")); - ?> - </td> - </tr> - <td class="droite" valign="top">Types de tags </td> - <td class="gauche"><?php echo $this->tagSelectionChamps("type_tags", $this->preferences["type_tags"]);?></td> - </tr> - <tr> - <td class="droite">Domaine </td> - <td class="gauche"> - <?php echo $this->formSelect("id_catalogue", - $this->preferences["id_catalogue"], - null, - $this->catalogues) ?> - </td> - </tr> - </table> - </fieldset> - - <br> - <fieldset> - <legend>Limites</legend> - <table cellspacing="2"> - <tr> - <td class="droite">Nombre de notices à analyser </td> - <td class="gauche"><input type="text" name="limite" size="4" value="<?php print($this->preferences["limite"]); ?>"></td> - </tr> - <tr> - <td class="droite">Nombre de tags à afficher dans le nuage </td> - <td class="gauche"><input type="text" name="nombre" size="4" value="<?php print($this->preferences["nombre"]); ?>"></td> - </tr> - </table> - </fieldset> - <?php echo $this->formSubmit("Valider","Valider",array("class" => "bouton")) ?> - </form> - </div> diff --git a/application/modules/admin/views/scripts/menus/_debut.phtml b/application/modules/admin/views/scripts/menus/_debut.phtml deleted file mode 100644 index 501c609454b5cd522d9e8a4598bcbec9f0868fd3..0000000000000000000000000000000000000000 --- a/application/modules/admin/views/scripts/menus/_debut.phtml +++ /dev/null @@ -1,22 +0,0 @@ -<center> -<h1>Propriétés de l'entrée de menu</h1><br> -<div class="formTable"> - <?php if($this->erreur) echo '<p class="erreur">'.$this->erreur.'</p>'; ?> - <form method="post" action="<?php echo htmlspecialchars($this->url) ?>"> - - <fieldset> - <legend>Ligne de menu</legend> - <table cellspacing="2"> - - <tr> - <td class="droite">Libellé </td> - <td class="gauche"><input type="text" name="libelle" size="40" value="<?php print($this->libelle); ?>"></td> - </tr> - - <tr> - <td valign="top" class="droite">Pictogramme </td> - <td><?php echo $this->ChoixPictogramme("menus","picto",$this->id_profil_maj,$this->picto); ?></td> - </tr> - - </table> - </fieldset> diff --git a/application/modules/admin/views/scripts/menus/_fin.phtml b/application/modules/admin/views/scripts/menus/_fin.phtml deleted file mode 100644 index 00fb383010db768f6496e527c025348d64d8bf2a..0000000000000000000000000000000000000000 --- a/application/modules/admin/views/scripts/menus/_fin.phtml +++ /dev/null @@ -1,4 +0,0 @@ -<?php echo $this->formSubmit("","Valider",array("class" => "bouton")) ?> - -</form> -</div> diff --git a/application/modules/admin/views/scripts/menus/_retour.phtml b/application/modules/admin/views/scripts/menus/_retour.phtml deleted file mode 100644 index 400ce8d6405aa17bddfe127cf2164af6a2016ad4..0000000000000000000000000000000000000000 --- a/application/modules/admin/views/scripts/menus/_retour.phtml +++ /dev/null @@ -1,11 +0,0 @@ -<script> - parent.hidePopWin(false); - <?php - if($this->reload=="SITE") print('parent.window.location=parent.document.location.href;'); - else - { - $args= '"'.$this->id_module.'","'.$this->libelle.'","'.$this->picto.'","'.$this->properties.'"'; - echo 'parent.retourMajProprietes('.$args.');opacDialogClose();'; - } - ?> -</script> diff --git a/application/modules/admin/views/scripts/menus/album.phtml b/application/modules/admin/views/scripts/menus/album.phtml deleted file mode 100644 index 2d4398895818e196918b08e0e1d8e734046286de..0000000000000000000000000000000000000000 --- a/application/modules/admin/views/scripts/menus/album.phtml +++ /dev/null @@ -1,15 +0,0 @@ -<?php echo $this->render('menus/_debut.phtml'); ?> -<br/> -<fieldset> - <legend>Affichage</legend> - <table cellspacing="2"> - <tr> - <td class="droite">Album </td> - <td class="gauche"> - <?php echo $this->formSelect('album_id', $this->preferences['album_id'], null, $this->albums); ?> - </td> - </tr> - </table> -</fieldset> -<?php echo $this->render('menus/_fin.phtml'); ?> - diff --git a/application/modules/admin/views/scripts/menus/avis.phtml b/application/modules/admin/views/scripts/menus/avis.phtml deleted file mode 100644 index 2cba7c37418fbeb0072712732b8e485939fe9fbc..0000000000000000000000000000000000000000 --- a/application/modules/admin/views/scripts/menus/avis.phtml +++ /dev/null @@ -1,17 +0,0 @@ -<?php echo $this->render('menus/_debut.phtml'); ?> - -<br> -<fieldset> - <legend>Avis</legend> - <table cellspacing="2"> - - <tr> - <td class="droite">Nombre d'avis à afficher </td> - <td class="gauche"><input type="text" name="nb" size="2" maxlength="2" value="<?php print($this->preferences["nb"]); ?>"></td> - </tr> - - </table> -</fieldset> - -<?php echo $this->render('menus/_fin.phtml'); ?> - diff --git a/application/modules/admin/views/scripts/menus/bibnum.phtml b/application/modules/admin/views/scripts/menus/bibnum.phtml deleted file mode 100644 index 1d4864c72a4bf25cf39c2bfa264cf1234dba36c7..0000000000000000000000000000000000000000 --- a/application/modules/admin/views/scripts/menus/bibnum.phtml +++ /dev/null @@ -1,3 +0,0 @@ -<?php echo $this->render('menus/_debut.phtml'); ?> -<?php echo $this->render('menus/_fin.phtml'); ?> - diff --git a/application/modules/admin/views/scripts/menus/catalogue.phtml b/application/modules/admin/views/scripts/menus/catalogue.phtml deleted file mode 100644 index f6cb8b08322d1a8a7c8b5dfc75cbc6bffdb77632..0000000000000000000000000000000000000000 --- a/application/modules/admin/views/scripts/menus/catalogue.phtml +++ /dev/null @@ -1,54 +0,0 @@ -<?php echo $this->render('menus/_debut.phtml'); ?> - -<br> -<fieldset> - <legend>Type d'analyse</legend> - <table cellspacing="2"> - - <tr> - <td class="droite" width="35%">Titre </td> - <td class="gauche"><input type="text" name="titre" size="50" maxlength="50" value="<?php print($this->preferences["titre"]); ?>"></td> - </tr> - - <tr> - <td class="droite">Tirage aléatoire </td> - <td class="gauche"><?php echo $this->formSelect("aleatoire",$this->preferences["aleatoire"],"",array("0" => "non","1"=>"oui")) ?></td> - </tr> - - <tr> - <td class="droite">Tri du résultat </td> - <td class="gauche"><?php echo $this->formSelect("tri",$this->preferences["tri"],"",array("0" => "par ordre alphabétique","1"=>"par date de nouveauté","2"=>"par nombre de visualisations")) ?></td> - </tr> - - <tr> - <td class="droite">Nombre à afficher </td> - <td class="gauche"><input type="text" name="nb_notices" size="4" maxlength="4" value="<?php print($this->preferences["nb_notices"]); ?>"> (0=pas de limite)</td> - </tr> - - <tr> - <td class="droite">Nombre à analyser </td> - <td class="gauche"><input type="text" name="nb_analyse" size="4" maxlength="4" value="<?php print($this->preferences["nb_analyse"]); ?>"> (pour le mode aléatoire)</td> - </tr> - - </table> - </fieldset> - - <br> - <fieldset> - <legend>Sélection</legend> - <table cellspacing="2"> - - <tr> - <td class="droite">Catalogue </td> - <td class="gauche"><?php echo $this->formSelect("id_catalogue",$this->preferences["id_catalogue"],array("onchange"=>"$('#id_panier').val('')"),$this->catalogues) ?></td> - </tr> - - <tr> - <td class="droite">Panier </td> - <td class="gauche"><?php echo $this->formSelect("id_panier",$this->preferences["id_panier"],array("onchange"=>"$('#id_catalogue').val('')"),$this->paniers) ?></td> - </tr> - - </table> - </fieldset> - -<?php echo $this->render('menus/_fin.phtml'); ?> diff --git a/application/modules/admin/views/scripts/menus/edit.phtml b/application/modules/admin/views/scripts/menus/edit.phtml deleted file mode 100644 index c52ca489f905555642d9f8210fc3130ba4abfdcd..0000000000000000000000000000000000000000 --- a/application/modules/admin/views/scripts/menus/edit.phtml +++ /dev/null @@ -1 +0,0 @@ -<?php echo $this->renderForm($this->form); ?> diff --git a/application/modules/admin/views/scripts/menus/etagere.phtml b/application/modules/admin/views/scripts/menus/etagere.phtml deleted file mode 100644 index 1d4864c72a4bf25cf39c2bfa264cf1234dba36c7..0000000000000000000000000000000000000000 --- a/application/modules/admin/views/scripts/menus/etagere.phtml +++ /dev/null @@ -1,3 +0,0 @@ -<?php echo $this->render('menus/_debut.phtml'); ?> -<?php echo $this->render('menus/_fin.phtml'); ?> - diff --git a/application/modules/admin/views/scripts/menus/googlemap.phtml b/application/modules/admin/views/scripts/menus/googlemap.phtml deleted file mode 100644 index c99e1ccf8b160a6cdb7aca02ad7978479851912b..0000000000000000000000000000000000000000 --- a/application/modules/admin/views/scripts/menus/googlemap.phtml +++ /dev/null @@ -1,16 +0,0 @@ -<?php echo $this->render('menus/_debut.phtml'); ?> - -<br> -<fieldset> - <legend>Carte à afficher</legend> - <table cellspacing="2"> - - <tr> - <td class="droite">Bibliothèque </td> - <td class="gauche"><?php echo $this->combo_bibs ?></td> - </tr> - - </table> -</fieldset> - -<?php echo $this->render('menus/_fin.phtml'); ?> diff --git a/application/modules/admin/views/scripts/menus/index.phtml b/application/modules/admin/views/scripts/menus/index.phtml deleted file mode 100644 index 8c287fcc2079e38d5fd79d8a11dad58118b3977f..0000000000000000000000000000000000000000 --- a/application/modules/admin/views/scripts/menus/index.phtml +++ /dev/null @@ -1,2 +0,0 @@ -<?php echo $this->render('menus/_debut.phtml'); ?> -<?php echo $this->render('menus/_fin.phtml'); ?> \ No newline at end of file diff --git a/application/modules/admin/views/scripts/menus/lastnews.phtml b/application/modules/admin/views/scripts/menus/lastnews.phtml deleted file mode 100644 index 8bf7ae7e99ad850ef8fd776d9144d3ed3624855d..0000000000000000000000000000000000000000 --- a/application/modules/admin/views/scripts/menus/lastnews.phtml +++ /dev/null @@ -1,16 +0,0 @@ -<?php echo $this->render('menus/_debut.phtml'); ?> - -<br> -<fieldset> - <legend>Articles</legend> - <table cellspacing="2"> - - <tr> - <td class="droite">Nombre d'articles à afficher </td> - <td class="gauche"><input type="text" name="nb" size="2" maxlength="2" value="<?php print($this->preferences["nb"]); ?>"></td> - </tr> - - </table> -</fieldset> - -<?php echo $this->render('menus/_fin.phtml'); ?> diff --git a/application/modules/admin/views/scripts/menus/lienprofil.phtml b/application/modules/admin/views/scripts/menus/lienprofil.phtml deleted file mode 100644 index 8f9b80f025cbe0ab419663c666ac05fa46f59ab0..0000000000000000000000000000000000000000 --- a/application/modules/admin/views/scripts/menus/lienprofil.phtml +++ /dev/null @@ -1,17 +0,0 @@ -<?php echo $this->render('menus/_debut.phtml'); ?> - -<br> -<fieldset> - <legend>Définition du profil</legend> - <table cellspacing="2"> - - <tr> - <td class="droite">Profil </td> - <td class="gauche"><?php echo $this->ComboProfils("ALL","ALL",$this->preferences["clef_profil"],false,true) ?></td> - </tr> - - </table> -</fieldset> - -<?php echo $this->render('menus/_fin.phtml'); ?> - diff --git a/application/modules/admin/views/scripts/menus/liensite.phtml b/application/modules/admin/views/scripts/menus/liensite.phtml deleted file mode 100644 index 819394f220c5ccccca20e3f0ac0d126282d5f3bd..0000000000000000000000000000000000000000 --- a/application/modules/admin/views/scripts/menus/liensite.phtml +++ /dev/null @@ -1,20 +0,0 @@ -<?php echo $this->render('menus/_debut.phtml'); ?> - -<br> -<fieldset> - <legend>Définition du lien</legend> - <table cellspacing="2"> - - <tr> - <td class="droite">Url </td> - <td class="gauche"><input type="text" name="url" size="60" value="<?php print($this->preferences["url"]); ?>"></td> - </tr> - <tr> - <td class="droite">Navigation </td> - <td class="gauche"><?php echo $this->formSelect("target",$this->preferences["target"],"",array("0" => "Ouvrir dans un nouvel onglet","1"=>"Rester sur le même onglet")) ?></td> - </tr> - - </table> -</fieldset> - -<?php echo $this->render('menus/_fin.phtml'); ?> diff --git a/application/modules/admin/views/scripts/menus/news.phtml b/application/modules/admin/views/scripts/menus/news.phtml deleted file mode 100644 index 8388637c3bea39eab05871f31d0814eca4cd97aa..0000000000000000000000000000000000000000 --- a/application/modules/admin/views/scripts/menus/news.phtml +++ /dev/null @@ -1,44 +0,0 @@ -<?php -Class_ScriptLoader::getInstance() -->addJqueryReady('formSelectToggleVisibilityForElement("input.display_mode", "tr#option_summary_content", "Summary")'); - -echo $this->render('menus/_debut.phtml'); ?> - -<?php -echo $this->partial("modules/_options_cms.phtml", - ['preferences' => $this->preferences, - 'id_bib' => $this->id_bib, - 'form_selector' => 'form']); -?> - -<fieldset> - <legend><?php echo $this->_('Mode d\'affichage'); ?></legend> - <table> - <tr> - <td class="droite"><?php echo $this->_('Clic sur le menu ouvre'); ?></td> - <td class="gauche"> - <?php - echo $this->formRadioButtons("display_mode", - $this->preferences["display_mode"], - ['Submenu' => $this->_('sous-menu'), - 'Summary' => $this->_('sommaire')]); - ?> - </td> - </tr> - - <tr id="option_summary_content"> - <td class="droite"><?php echo $this->_('Contenu du sommaire'); ?></td> - <td class="gauche"> - <?php - echo $this->formRadioButtons("summary_content", - $this->preferences["summary_content"], - ['Summary' => $this->_('Résumés'), - 'TitlesOnly' => $this->_('Titres seulement'), - 'FullContent' => $this->_('Articles complets')]); - ?> - </td> - </tr> - </table> -</fieldset> - -<?php echo $this->render('menus/_fin.phtml'); ?> diff --git a/application/modules/admin/views/scripts/menus/rss.phtml b/application/modules/admin/views/scripts/menus/rss.phtml deleted file mode 100644 index b5f336e2d3c113f1b9344b20f542abc76e660d9b..0000000000000000000000000000000000000000 --- a/application/modules/admin/views/scripts/menus/rss.phtml +++ /dev/null @@ -1,25 +0,0 @@ -<?php echo $this->render('menus/_debut.phtml'); ?> - -<br> -<fieldset> - <legend>Fils RSS</legend> - <div id="table_selection"> - <?php - echo $this->treeSelect( - $this->preferences["id_items"], - $this->preferences["id_categorie"], - true, - BASE_URL.'/admin/bib/allitems?id_bib='.$this->id_bib.'&type=rss', - "form"); - ?> - </div> - <table cellspacing="2"> - <tr> - <td class="droite">Nbre à afficher </td> - <td class="gauche"><input type="text" name="nb" size="2" maxlength="2" value="<?php print($this->preferences["nb"]); ?>"></td> - </tr> - - </table> -</fieldset> - -<?php echo $this->render('menus/_fin.phtml'); ?> diff --git a/application/modules/admin/views/scripts/menus/sitotheque.phtml b/application/modules/admin/views/scripts/menus/sitotheque.phtml deleted file mode 100644 index 99a8d28c8b5f473fdda9059cbe6933bbf78c040d..0000000000000000000000000000000000000000 --- a/application/modules/admin/views/scripts/menus/sitotheque.phtml +++ /dev/null @@ -1,25 +0,0 @@ -<?php echo $this->render('menus/_debut.phtml'); ?> - -<br> -<fieldset> - <legend>Sites</legend> - <div id="table_selection"> - <?php - echo $this->treeSelect( - $this->preferences["id_items"], - $this->preferences["id_categorie"], - true, - BASE_URL.'/admin/bib/allitems?id_bib='.$this->id_bib.'&type=sito', - "form"); - ?> - </div> - <table cellspacing="2"> - <tr> - <td class="droite">Nbre à afficher </td> - <td class="gauche"><input type="text" name="nb" size="2" maxlength="2" value="<?php print($this->preferences["nb"]); ?>"></td> - </tr> - - </table> -</fieldset> - -<?php echo $this->render('menus/_fin.phtml'); ?> diff --git a/application/modules/admin/views/scripts/profil/menusindex.phtml b/application/modules/admin/views/scripts/profil/menusindex.phtml index e4958b09acd9ab576c4cf950db69d96ec2a3fabb..1128ebbb5b46862f0cdb02c20bd6494286b7f712 100644 --- a/application/modules/admin/views/scripts/profil/menusindex.phtml +++ b/application/modules/admin/views/scripts/profil/menusindex.phtml @@ -5,14 +5,12 @@ <center> <div align="center"><br\> - <?php - echo $this->bouton('id=creer', - 'picto=add', - 'texte='.$this->traduire('Ajouter un menu').'', - 'url='.$this->url(array('action' => 'menusmaj', - 'id_profil' => $this->profil->getId(), - 'mode' => 'add')), - 'largeur=170px') + <?php + echo $this->Button_New((new Class_Entity()) + ->setUrl($this->url(['module' => 'admin', + 'controller' => 'widget', + 'action' => 'add-menu'], null, true)) + ->setText($this->_('Ajouter un menu'))); ?> </div> </center> @@ -40,10 +38,12 @@ foreach($this->menus as $id_menu => $menu) echo '<img src="'.$this->path_img.$menu["picto"].'">'; echo '</td>'; echo '<td>'.$menu["libelle"].'</td>'; - echo '<td align="center"><a href="'.$this->url(array('action' => 'menusmaj', - 'id_profil' => $this->profil->getId(), - 'id_menu' => $id_menu, - 'mode' => 'edit')).'">'. + echo '<td align="center"><a href="'.$this->url(['module' => 'admin', + 'controller' => 'widget', + 'action' => 'edit-menu', + 'id_profil' => $this->profil->getId(), + 'backUrl' => $this->url(), + 'id' => $id_menu], null, true).'">'. $this->boutonIco("type=edit"). '</a></td>'; diff --git a/library/Class/Systeme/ModulesAccueil/MenuVertical.php b/library/Class/Systeme/ModulesAccueil/MenuVertical.php index 925d5504027c0979a7f6e8b9bfc5bbf45f21a2a0..cc5afbc9de31aaa7f263b5fa6ec3c989800ad2f3 100644 --- a/library/Class/Systeme/ModulesAccueil/MenuVertical.php +++ b/library/Class/Systeme/ModulesAccueil/MenuVertical.php @@ -65,14 +65,22 @@ class Class_Systeme_ModulesAccueil_MenuVertical extends Class_Systeme_ModulesAcc if(static::NEW_MENU != $datas['menu']) return $datas; + $datas['menu'] = $this->_prefixMenu($this->addMenu()); + return $datas; + } + + + public function addMenu() { $profil = Class_Profil::getCurrentProfil(); - $profil = $profil->hasParentProfil() ? $profil->getParentProfil() : $profil; + $profil = $profil->hasParentProfil() + ? $profil->getParentProfil() + : $profil; - $datas['menu'] = $this->_prefixMenu($profil->addMenu(['libelle' => $this->_('Nouveau menu'), - 'picto' => '', - 'menus' => []])); + $id = $profil->addMenu(['libelle' => $this->_('Nouveau menu'), + 'picto' => '', + 'menus' => []]); $profil->save(); - return $datas; + return $id; } diff --git a/tests/application/modules/admin/controllers/MenusControllerTest.php b/tests/application/modules/admin/controllers/MenusControllerTest.php deleted file mode 100644 index 9858bcf35ee3a1fffa95d6335534ce2d8b603633..0000000000000000000000000000000000000000 --- a/tests/application/modules/admin/controllers/MenusControllerTest.php +++ /dev/null @@ -1,428 +0,0 @@ -<?php -/** - * Copyright (c) 2012, Agence Française Informatique (AFI). All rights reserved. - * - * BOKEH 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). - * - * BOKEH 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 BOKEH; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ -require_once 'AdminAbstractControllerTestCase.php'; - - -abstract class Admin_MenusControllerProfilJazzTestCase extends Admin_AbstractControllerTestCase { - protected - $_storm_default_to_volatile = true, - $_profil_jazz; - - public function setUp() { - parent::setUp(); - - $cfg_menus = ['H' => ['libelle' => 'Menu horizontal', - 'picto' => 'vide.gif', - 'menus' => [['type_menu' => 'MENU', - 'libelle' => 'Pratique', - 'picto' => 'bookmark.png', - 'preferences' => [], - 'sous_menus' => [['type_menu' => 'ACCUEIL', - 'libelle' => 'Accueil', - 'picto' => 'vide.gif', - 'preferences' => []], - - ['type_menu' => Class_Systeme_ModulesMenu::MODULE_ACCUEIL_PREFIX.'CRITIQUES', - 'libelle' => 'Critiques', - 'picto' => 'vide.gif', - 'preferences' => []]]], - - ['type_menu' => 'URL', - 'libelle' => 'Google', - 'picto' => 'vide.gif', - 'preferences' => ['url' => 'http://www.google.com', - 'target' => 0]], - - ['type_menu' => 'NEWS', - 'libelle' => 'Articles', - 'picto' => 'vide.gif', - 'preferences' => ['id_items' => '1-3', - 'display_order' => 'Selection']], - - ['type_menu' => 'FORM_CONTACT', - 'libelle' => 'Formulaire contact', - 'picto' => 'vide.gif' ], - - ['type_menu' => Class_Systeme_ModulesMenu::MODULE_ACCUEIL_PREFIX.'CALENDAR', - 'libelle' => 'Calendrier', - 'picto' => 'vide.gif', - 'preferences' => ['nb_events' => 5]], - - ['type_menu' => 'CATALOGUE', - 'libelle' => 'Libelle du catalogue', - 'preferences' => ['titre' => 'Titre du catalogue'], - 'picto' => 'vide.gif' ] - - ], - ], - - 'V' => ['libelle' => 'Menu vertical', - 'picto' => 'vide.gif']]; - - $this->_profil_jazz = Class_Profil::newInstanceWithId(5, - ['browser' => 'opac', - 'libelle' => 'Jazz pour tous', - 'cfg_menus' => $cfg_menus]); - } -} - - - - -class Admin_MenusControllerProfilJazzIndexActionTest extends Admin_MenusControllerProfilJazzTestCase { - public function setUp() { - parent::setUp(); - - $this->dispatch('admin/menus/index?'. - http_build_query(array('id_profil' => '5', - 'id_bib' => 'null', - 'type_menu' => 'MENU', - 'id_module' => 1, - 'libelle' => 'Pratique', - 'picto' => 'bookmark.png', - 'preferences' => ''))); - } - - - /** @test */ - public function libellePratiqueShouldBeDisplayed() { - $this->assertXPath("//input[@name='libelle'][@value='Pratique']"); - } - - - /** @test */ - public function bookmarkIconShouldBeDisplayed() { - $this->assertXPath("//img[@id='select_picto'][contains(@src, 'bookmark.png')]"); - } - - - /** @test */ - function profilTranslaterShouldBeNullTranslator() { - //pour éviter que le contenu des menus / données sérializées soient traduites dans l'interface d'édition - $this->assertInstanceOf('Class_Profil_NullTranslator', Class_Profil::getCurrentProfil()->getTranslator()); - } -} - - - - -class Admin_MenusControllerEditMenuBibNumTest extends Admin_AbstractControllerTestCase { - public function createBibNum() { - $classique_cat = Class_AlbumCategorie::getLoader() - ->newInstanceWithId(10) - ->setLibelle('Classique') - ->setSousCategories(array()) - ->setAlbums(array()); - - $jazz_cat = Class_AlbumCategorie::getLoader() - ->newInstanceWithId(4) - ->setParentCategorie(null) - ->setLibelle('Jazz') - ->setAlbums(array()) - ->setSousCategories(array( - - $mag_jazz_cat = Class_AlbumCategorie::getLoader() - ->newInstanceWithId(41) - ->setParentId(4) - ->setSousCategories(array()) - ->setLibelle('Magazines') - ->setAlbums(array()), - - $bd_jazz_cat = Class_AlbumCategorie::getLoader() - ->newInstanceWithId(42) - ->setParentId(4) - ->setSousCategories(array()) - ->setLibelle('BD') - ->setAlbums(array( - $fitzgerald = Class_Album::getLoader() - ->newInstanceWithId(421) - ->setCatId(42) - ->setTitre('Fitzgerald'), - - $armstrong = Class_Album::getLoader() - ->newInstanceWithId(422) - ->setCatId(42) - ->setTitre('Armstrong') - )) - ) - ); - - - Storm_Test_ObjectWrapper::onLoaderOfModel('Class_AlbumCategorie') - ->whenCalled('findAll') - ->answers(array($jazz_cat, $classique_cat)); - - Storm_Test_ObjectWrapper::onLoaderOfModel('Class_Album') - ->whenCalled('findAll') - ->answers(array($fitzgerald, $armstrong)); - } - - - public function setUp() { - parent::setUp(); - $this->createBibNum(); - $this->dispatch('admin/menus/album?'. - http_build_query(array('id_profil' => '5', - 'id_bib' => 'null', - 'type_menu' => 'BIBNUM', - 'id_module' => 1, - 'libelle' => 'Lien vers un album', - 'picto' => 'book.png', - 'preferences' => 'album_id=422'))); - } - - - /** @test */ - public function libelleLienVersUnAlbumShouldBeDisplayed() { - $this->assertXPath("//input[@name='libelle'][@value='Lien vers un album']"); - } - - - /** @test */ - function albumSelectShouldContainsFitzgerald() { - $this->assertXPathContentContains("//select[@id='album_id']//option[@value='421']", - "Jazz>BD>Fitzgerald", - $this->_response->getBody()); - } - - - /** @test */ - function albumSelectShouldContainsArmstrong() { - $this->assertXPathContentContains("//select//option[@value='422'][@selected='selected']", - "Jazz>BD>Armstrong", - $this->_response->getBody()); - } - - - /** @test */ - function albumArmstrongShouldBeFirst() { - $this->assertXPathContentContains("//select//option[1]", "Armstrong"); - } -} - - - - -class Admin_MenusControllerEditMenuAlbumLinkTest extends Admin_AbstractControllerTestCase { - public function setUp() { - parent::setUp(); - $this->fixture('Class_Album', ['id' => 421, - 'cat_id' => 0, - 'titre' => 'Step accross the border']); - - $this->dispatch('admin/menus/album?'. - http_build_query(array('id_profil' => '5', - 'id_bib' => 'null', - 'type_menu' => 'BIBNUM', - 'id_module' => 1, - 'libelle' => 'Lien vers un album', - 'picto' => 'book.png', - 'preferences' => 'album_id=421'))); - - } - - -/** @test */ - public function linkAlbumWithoutCategoryShouldReturnCategoryNotClassified() { - $this->assertXPathContentContains('//div', 'non classé', $this->_response->getBody()); - } -} - - -class Admin_MenusControllerProfilJazzEditCalendrierActionTest extends Admin_MenusControllerProfilJazzTestCase { - public function setUp() { - parent::setUp(); - Class_Systeme_ModulesMenu::reset(); - Class_AdminVar::newInstanceWithId('MENU_BOITE', ['valeur' => 1]); - $this->dispatch('admin/menus/calendrier?'. - http_build_query(['id_profil' => '5', - 'id_bib' => 'null', - 'type_menu' => 'MODULE_ACCUEIL_CALENDAR', - 'id_module' => '3', - 'libelle' => '', - 'picto' => '', - 'preferences' => 'titre=Calendrier%20des%20animations|rss_avis=0|display_next_event=1|nb_events=5|display_event_info=bib|id_categorie=108-96|id_items=|Valider=Valider']), - true); - } - - - /** @test */ - public function inputNbEventsShouldBeFive() { - $this->assertXPath('//input[@type="text"][@name="nb_events"][@value="5"]', - $this->_response->getBody()); - } - - - /** @test */ - public function displayOrderShouldBeEventDebut() { - $this->assertXPath('//input[@name="display_order"][@checked="checked"][@value="EventDebut"]'); - } - - - /** @test */ - public function displayModeShouldBeTitle() { - $this->assertXPath('//input[@name="display_mode"][@checked="checked"][@value="Title"]'); - } - - - /** @test */ - public function displayEventInfoShouldBeBib() { - $this->assertXPath('//select[@name="display_event_info"]/option[@value="bib"][@selected="selected"]', -$this->_response->getBody()); - } -} - - - - -class Admin_MenusControllerProfilJazzEditMenuActionTest extends Admin_MenusControllerProfilJazzTestCase { - public function setUp() { - parent::setUp(); - Class_Systeme_ModulesMenu::reset(); - Class_AdminVar::newInstanceWithId('MENU_BOITE', ['valeur' => 1]); - $this->dispatch('admin/menus/menuvertical?'. - http_build_query(['id_profil' => '5', - 'type_menu' => 'MODULE_ACCUEIL_MENU_VERTICAL', - 'id_module' => '3', - 'libelle' => '', - 'picto' => '', - 'preferences' => []]),true); - } - - - /** @test */ - public function checkboxAfficheTitreShouldBeChecked() { - $this->assertXPath('//input[@type="checkbox"][@name="afficher_titre"][@checked="checked"]',$this->_response->getBody()); - } -} - - - - -class Admin_MenusControllerProfilJazzPostCalendrierActionTest extends Admin_MenusControllerProfilJazzTestCase { - public function setUp() { - parent::setUp(); - $this->postDispatch('admin/menus/calendrier?'.http_build_query(['id_module' => 3, - 'id_profil' => 5, - 'type_menu' => 'MODULE_ACCUEIL_CALENDAR']), - ['titre' => 'Agenda', - 'nb_events' => 10]); - } - - /** @test */ - public function responseShouldBeContainsMajProprietesTitleAgenda() { - $this->assertContains('parent.retourMajProprietes("3","Agenda","vide.gif","titre=Agenda|nb_events=10")', - $this->_response->getBody()); - } -} - - - - - -class Admin_MenusControllerProfilJazzPostCatalogueActionTest extends Admin_MenusControllerProfilJazzTestCase { - public function setUp() { - parent::setUp(); - - Storm_Test_ObjectWrapper::onLoaderOfModel('Class_PanierNotice') - ->whenCalled('findAllBelongsToAdmin')->answers([]); - - $this->postDispatch('admin/menus/catalogue?'.http_build_query(['id_module' => 7, - 'id_profil' => 5, - 'type_menu' => 'CATALOGUE']), - ['titre' => 'Titre du catalogue','libelle' => 'Nouveauté', 'id_panier' => 0]); - } - - /** @test */ - public function responseShouldBeContainsNouveaute() { - $this->assertContains('parent.retourMajProprietes("7","Nouveauté","vide.gif","titre=Titre du catalogue', - $this->_response->getBody()); - } -} - - - - -class Admin_MenusControllerProfilJazzEditCatalogueActionTest extends Admin_MenusControllerProfilJazzTestCase { - public function setUp() { - parent::setUp(); - - $panier_bd = $this->fixture('Class_PanierNotice', - ['id' => 1, - 'libelle' => 'bd']); - - $panier_romans = $this->fixture('Class_PanierNotice', - ['id' => 2, - 'libelle' => 'romans']); - - $panier_musique = $this->fixture('Class_PanierNotice', - ['id' => 3, - 'libelle' => 'musique']); - - $panier_autres = $this->fixture('Class_PanierNotice', - ['id' => 4, - 'libelle' => 'autres']); - - - $this->fixture('Class_Catalogue', - ['id' => 9, - 'libelle' => 'Domaine livres', - 'panier_notices' => [$panier_romans, $panier_bd]]); - - Class_Users::getIdentity()->setPaniers([$panier_bd]); - - Storm_Test_ObjectWrapper::onLoaderOfModel('Class_PanierNotice') - ->whenCalled('findAllBelongsToAdmin')->answers([$panier_musique]); - - $this->dispatch('admin/menus/catalogue?'.http_build_query(['id_module' => 7, - 'id_profil' => 5, - 'preferences' => 'id_catalogue=0|id_panier=1', - 'type_menu' => 'CATALOGUE']), - true); - } - - - /** @test */ - public function selectIdPanierShouldContainsPanierBdOnce() { - $this->assertXPathCount('//select[@name="id_panier"]/option[@value="1"][@selected="selected"]',1); - } - - - /** @test */ - public function selectIdPanierShouldContainsPanierRomain() { - $this->assertXPathContentContains('//select[@name="id_panier"]/option[@value="2"]', 'romans'); - } - - - /** @test */ - public function selectIdPanierShouldContainsPanierMusique() { - $this->assertXPathContentContains('//select[@name="id_panier"]/option[@value="3"]', - 'musique'); - } - - - /** @test */ - public function selectIdPanierShouldNotContainsPanierAutres() { - $this->assertNotXPath('//select[@name="id_panier"]/option[@value="4"]'); - } -} - -?> \ No newline at end of file diff --git a/tests/application/modules/admin/controllers/WidgetControllerTest.php b/tests/application/modules/admin/controllers/WidgetControllerTest.php index c826466321340e860fff7b1e0e8024a53a8a9927..4e3c92f8d7398482eecef0f11412170421a1e658 100644 --- a/tests/application/modules/admin/controllers/WidgetControllerTest.php +++ b/tests/application/modules/admin/controllers/WidgetControllerTest.php @@ -1974,4 +1974,31 @@ class WidgetControllerDeleteActionTest extends WidgetControllerWidgetConfigurati public function widgetSixShouldHaveBeenRemoved() { $this->assertEquals([], $this->_profil->getCfgAccueilAsArray()['modules']); } +} + + + + +class WidgetControllerAddMenuActionTest extends WidgetControllerWidgetConfigurationTestCase { + public function setUp() { + parent::setUp(); + $this->_profil->beCurrentProfil(); + $this->dispatch('admin/widget/add-menu', true); + Class_Profil::clearCache(); + } + + + /** @test */ + public function newMenuShouldHaveBeenAdded() { + $this->assertEquals(['libelle' => 'Nouveau menu', + 'picto' => '', + 'menus' => []], + $this->_profil->getCfgMenusAsArray()[0]); + } + + + /** @test */ + public function shouldRedirect() { + $this->assertRedirect(); + } } \ No newline at end of file