diff --git a/library/Class/Systeme/ModulesMenu/Numilog.php b/library/Class/Systeme/ModulesMenu/Numilog.php index 722d935fa0aba783ddcc422b2affbe9912d1012c..6569397f9f37b17e6ebeab78e5b1a738bad2b368 100644 --- a/library/Class/Systeme/ModulesMenu/Numilog.php +++ b/library/Class/Systeme/ModulesMenu/Numilog.php @@ -18,19 +18,19 @@ * along with BOKEH; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ + class Class_Systeme_ModulesMenu_Numilog extends Class_Systeme_ModulesMenu_SSOAbstract { - /** @var string */ - protected $_group = Class_Systeme_ModulesMenu::GROUP_MENU_ABONNES; - /** @var string */ - protected $_type_module = 'NUMILOG'; + protected + $_group = Class_Systeme_ModulesMenu::GROUP_MENU_ABONNES, + $_type_module = 'NUMILOG', + $_url = ['controller' => 'modules', + 'action' => 'numilog']; - /** @var string */ - protected $_libelle = 'Lien vers Numilog'; - /** @var string */ - protected $_url = ['controller' => 'modules', - 'action' => 'numilog']; + public function __construct() { + $this->_libelle = $this->_('Lien vers Numilog'); + } public function getNumilogUrlForUser($user) { diff --git a/library/Class/Systeme/ModulesMenu/Orthodidacte.php b/library/Class/Systeme/ModulesMenu/Orthodidacte.php index d385efcb3b8bab6a24e5fd41f74c4435efb43f00..cdbcf5da68fafe54a4f764bb7210e29ba0299e7d 100644 --- a/library/Class/Systeme/ModulesMenu/Orthodidacte.php +++ b/library/Class/Systeme/ModulesMenu/Orthodidacte.php @@ -19,21 +19,18 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ - class Class_Systeme_ModulesMenu_Orthodidacte extends Class_Systeme_ModulesMenu_SSOAbstract { - /** @var string */ - protected $_group = Class_Systeme_ModulesMenu::GROUP_MENU_ABONNES; - /** @var string */ - protected $_type_module = 'ORTHODIDACTE'; + protected + $_group = Class_Systeme_ModulesMenu::GROUP_MENU_ABONNES, + $_type_module = 'ORTHODIDACTE', + $_url = ['controller' => 'modules', + 'action' => 'orthodidacte']; - /** @var string */ - protected $_libelle = 'Lien vers Orthodidacte'; - protected $_url = [ - 'controller' => 'modules', - 'action' => 'orthodidacte' - ]; + public function __construct() { + $this->_libelle = $this->_('Lien vers Orthodidacte'); + } public function urlForUser($user) { diff --git a/library/Class/Systeme/ModulesMenu/Paniers.php b/library/Class/Systeme/ModulesMenu/Paniers.php index bec3d27a48f46efeec36cf49272dc05686d90ce0..a5720504d7b0a2ac7a29ee17ba9a7c63515ad6fc 100644 --- a/library/Class/Systeme/ModulesMenu/Paniers.php +++ b/library/Class/Systeme/ModulesMenu/Paniers.php @@ -18,7 +18,8 @@ * along with BOKEH; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -class Class_Systeme_ModulesMenu_Paniers extends Class_Systeme_ModulesMenu_Null{ + +class Class_Systeme_ModulesMenu_Paniers extends Class_Systeme_ModulesMenu_Null { protected $_group = Class_Systeme_ModulesMenu::GROUP_MENU_ABONNES, @@ -29,7 +30,6 @@ class Class_Systeme_ModulesMenu_Paniers extends Class_Systeme_ModulesMenu_Null{ public function __construct() { - $this->_libelle = $this->_('Paniers de documents'); - $this->_form = 'ZendAfi_Form_Configuration_SelectionWidget'; + $this->_libelle = $this->_('Mes paniers de documents'); } } \ No newline at end of file diff --git a/library/Class/Systeme/ModulesMenu/PlanetNemo.php b/library/Class/Systeme/ModulesMenu/PlanetNemo.php index 65f9b3245554170e363ac01b5b181db4a7a71949..97a85349f704bc4efcbbbe6887c700706f573e58 100644 --- a/library/Class/Systeme/ModulesMenu/PlanetNemo.php +++ b/library/Class/Systeme/ModulesMenu/PlanetNemo.php @@ -18,16 +18,17 @@ * along with BOKEH; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ + class Class_Systeme_ModulesMenu_PlanetNemo extends Class_Systeme_ModulesMenu_SSOAbstract { - /** @var string */ - protected $_group = Class_Systeme_ModulesMenu::GROUP_MENU_ABONNES; + protected + $_group = Class_Systeme_ModulesMenu::GROUP_MENU_ABONNES, + $_type_module = 'PLANETNEMO'; - /** @var string */ - protected $_type_module = 'PLANETNEMO'; - /** @var string */ - protected $_libelle = 'Lien vers planetnemo.fr'; + public function construct() { + $this->_libelle = $this->_('Lien vers planetnemo.fr'); + } public function urlForUser($user) { diff --git a/library/Class/Systeme/ModulesMenu/PreRegistration.php b/library/Class/Systeme/ModulesMenu/PreRegistration.php index ab833e5296f229bef59586d59d4666cce9dbda5f..f789bcadc1dcf64cbbca5603e5b5f19ff1d88ce4 100644 --- a/library/Class/Systeme/ModulesMenu/PreRegistration.php +++ b/library/Class/Systeme/ModulesMenu/PreRegistration.php @@ -31,6 +31,5 @@ class Class_Systeme_ModulesMenu_PreRegistration extends Class_Systeme_ModulesMen public function __construct() { $this->_libelle = $this->_('Se préinscrire'); - $this->_form = 'ZendAfi_Form_Configuration_Menu_PreRegistration'; } } \ No newline at end of file diff --git a/library/Class/Systeme/ModulesMenu/Profil.php b/library/Class/Systeme/ModulesMenu/Profil.php index 4befdfa58da54f46ede501092705ca5637a06de0..2b2ed9bf02900890491dfecd8a8ea8b4eb333610 100644 --- a/library/Class/Systeme/ModulesMenu/Profil.php +++ b/library/Class/Systeme/ModulesMenu/Profil.php @@ -18,27 +18,25 @@ * along with BOKEH; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -class Class_Systeme_ModulesMenu_Profil extends Class_Systeme_ModulesMenu_Null{ - /** @var string */ - protected $_group = Class_Systeme_ModulesMenu::GROUP_MENU_INFORMATIONS; - /** @var string */ - protected $_type_module = 'PROFIL'; +class Class_Systeme_ModulesMenu_Profil extends Class_Systeme_ModulesMenu_Null { - /** @var int */ - protected $_popupWidth = 550; + protected + $_group = Class_Systeme_ModulesMenu::GROUP_MENU_INFORMATIONS, + $_type_module = 'PROFIL', + $_popupWidth = 550, + $_libelle = 'Lien vers un profil du portail', + $_popupHeight = 290, + $_isPhone = false, + $_action = 'lienprofil', + $_defaultValues = ['clef_profil' => '1']; - protected $_libelle = 'Lien vers un profil du portail'; - /** @var int */ - protected $_popupHeight = 290; - protected $_isPhone = false; - - protected $_action = 'lienprofil'; - - protected $_defaultValues = ['clef_profil' => '1'];// Par defaut profil portail + public function __construct() { + $this->_libelle = $this->_('Lien vers un profil ou une page du portail'); + $this->_form = 'ZendAfi_Form_Configuration_Menu_LinkToProfile'; + } - protected $_form = 'ZendAfi_Form_Configuration_LinkToProfileWidget'; public function getUrl($preferences=[]) { return $this->_url = Class_Url::assemble($this->_getUrlParams($preferences), diff --git a/library/Class/Systeme/ModulesMenu/RechercheAvancee.php b/library/Class/Systeme/ModulesMenu/RechercheAvancee.php index 6d464c2c680913c8781cd278aeb1d97475d35557..7dc084fa3e46ab12cd55df9b5155ca5abc882847 100644 --- a/library/Class/Systeme/ModulesMenu/RechercheAvancee.php +++ b/library/Class/Systeme/ModulesMenu/RechercheAvancee.php @@ -33,6 +33,5 @@ class Class_Systeme_ModulesMenu_RechercheAvancee extends Class_Systeme_ModulesMe public function __construct() { $this->_libelle = $this->_('Recherche avancée'); - $this->_form = 'ZendAfi_Form_Configuration_Menu_AdvancedSearch'; } } \ No newline at end of file diff --git a/library/Class/Systeme/ModulesMenu/RechercheGeographique.php b/library/Class/Systeme/ModulesMenu/RechercheGeographique.php index a329e344856d7397d48cfcb036bd8b5eee165935..9aabd9dd67e757cbb0d141fc8194fb50941074dd 100644 --- a/library/Class/Systeme/ModulesMenu/RechercheGeographique.php +++ b/library/Class/Systeme/ModulesMenu/RechercheGeographique.php @@ -31,6 +31,5 @@ class Class_Systeme_ModulesMenu_RechercheGeographique extends Class_Systeme_Modu public function __construct() { $this->_libelle = $this->_('Recherche géographique'); - $this->_form = 'ZendAfi_Form_Configuration_Menu_MapSearch'; } } \ No newline at end of file diff --git a/library/Class/Systeme/ModulesMenu/RechercheGuidee.php b/library/Class/Systeme/ModulesMenu/RechercheGuidee.php index 749e68b6afe9fea8e4bf6f63d266f7def0d0aae2..5dc6e096a432fc7b030bf9c0a091cc0f236107b1 100644 --- a/library/Class/Systeme/ModulesMenu/RechercheGuidee.php +++ b/library/Class/Systeme/ModulesMenu/RechercheGuidee.php @@ -32,6 +32,5 @@ class Class_Systeme_ModulesMenu_RechercheGuidee extends Class_Systeme_ModulesMen public function __construct() { $this->_libelle = $this->_('Recherche guidée'); - $this->_form = 'ZendAfi_Form_Configuration_Menu_GuidedSearch'; } } \ No newline at end of file diff --git a/library/Class/Systeme/ModulesMenu/RechercheOai.php b/library/Class/Systeme/ModulesMenu/RechercheOai.php index 06bf28f878f2ddb5d198a86719aa3705cedb225b..087f81f56f644f90bc51b99ea1955891a60a2202 100644 --- a/library/Class/Systeme/ModulesMenu/RechercheOai.php +++ b/library/Class/Systeme/ModulesMenu/RechercheOai.php @@ -32,6 +32,5 @@ class Class_Systeme_ModulesMenu_RechercheOai extends Class_Systeme_ModulesMenu_N public function __construct() { $this->_libelle = $this->_('Recherche OAI'); - $this->_form = 'ZendAfi_Form_Configuration_Menu_OaiSearch'; } } \ No newline at end of file diff --git a/library/Class/Systeme/ModulesMenu/RechercheSimple.php b/library/Class/Systeme/ModulesMenu/RechercheSimple.php index 5a3fd98160d02d76894bef75d80a1b43f11ce6bf..3168a196f167cd43a1087d5e8315980d5ece43e3 100644 --- a/library/Class/Systeme/ModulesMenu/RechercheSimple.php +++ b/library/Class/Systeme/ModulesMenu/RechercheSimple.php @@ -32,6 +32,5 @@ class Class_Systeme_ModulesMenu_RechercheSimple extends Class_Systeme_ModulesMen public function __construct() { $this->_libelle = $this->_('Recherche simple'); - $this->_form = 'ZendAfi_Form_Configuration_Menu_Search'; } } \ No newline at end of file diff --git a/library/Class/Systeme/ModulesMenu/Register.php b/library/Class/Systeme/ModulesMenu/Register.php index 41a5831d89eab508032a1fa4a426ac2cb5dfcaae..d0ec7f720823464adf76f94ba05e5511aa8515c0 100644 --- a/library/Class/Systeme/ModulesMenu/Register.php +++ b/library/Class/Systeme/ModulesMenu/Register.php @@ -31,6 +31,5 @@ class Class_Systeme_ModulesMenu_Register extends Class_Systeme_ModulesMenu_Null public function __construct() { $this->_libelle = $this->_('S\'enregister'); - $this->_form = 'ZendAfi_Form_Configuration_Menu_Register'; } } \ No newline at end of file diff --git a/library/Class/Systeme/ModulesMenu/ReserverPoste.php b/library/Class/Systeme/ModulesMenu/ReserverPoste.php index 083984bcae09bea0c7fffae8803ff479abcf1c4c..5b682c373357ddce511185cf14c367b5dc067fe1 100644 --- a/library/Class/Systeme/ModulesMenu/ReserverPoste.php +++ b/library/Class/Systeme/ModulesMenu/ReserverPoste.php @@ -16,26 +16,24 @@ * * 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 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -class Class_Systeme_ModulesMenu_ReserverPoste extends Class_Systeme_ModulesMenu_Null { - /** @var string */ - protected $_group = Class_Systeme_ModulesMenu::GROUP_MENU_ABONNES; - /** @var string */ - protected $_type_module = 'RESERVER_POSTE'; +class Class_Systeme_ModulesMenu_ReserverPoste extends Class_Systeme_ModulesMenu_Null { + protected + $_group = Class_Systeme_ModulesMenu::GROUP_MENU_ABONNES, + $_type_module = 'RESERVER_POSTE', + $_url = ['controller' => 'abonne', + 'action' => 'multimedia-hold-location']; - /** @var string */ - protected $_libelle = 'Réserver un poste multimédia'; - /** @var string */ - protected $_url = ['controller' => 'abonne', - 'action' => 'multimedia-hold-location']; + public function __construct() { + $this->_libelle = $this->_('Réserver un poste multimédia'); + } public function isVisibleForProfil($profil) { return Class_AdminVar::isMultimediaEnabled(); } -} -?> \ No newline at end of file +} \ No newline at end of file diff --git a/library/Class/Systeme/ModulesMenu/Rss.php b/library/Class/Systeme/ModulesMenu/Rss.php index eaded23b5a63ab3cc89cf51d3a34b24b09e62cf8..6a489a2473e7f3e20e1f887ceec684af10970420 100644 --- a/library/Class/Systeme/ModulesMenu/Rss.php +++ b/library/Class/Systeme/ModulesMenu/Rss.php @@ -18,7 +18,8 @@ * along with BOKEH; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -class Class_Systeme_ModulesMenu_Rss extends Class_Systeme_ModulesMenu_Null{ + +class Class_Systeme_ModulesMenu_Rss extends Class_Systeme_ModulesMenu_Null { protected $_group = Class_Systeme_ModulesMenu::GROUP_MENU_INFORMATIONS, @@ -33,7 +34,7 @@ class Class_Systeme_ModulesMenu_Rss extends Class_Systeme_ModulesMenu_Null{ public function __construct() { $this->_libelle = $this->_('Fils RSS'); - $this->_form = 'ZendAfi_Form_Configuration_RssWidget'; + $this->_form = 'ZendAfi_Form_Configuration_Menu_Rss'; } diff --git a/library/ZendAfi/Form/Configuration/LinkToProfileWidget.php b/library/ZendAfi/Form/Configuration/Menu/LinkToProfile.php similarity index 69% rename from library/ZendAfi/Form/Configuration/LinkToProfileWidget.php rename to library/ZendAfi/Form/Configuration/Menu/LinkToProfile.php index 25879b37df8989149533ad1831ccf38bf3071751..406d5f5afc20393e6c2f97cf7c63959fb0c93740 100644 --- a/library/ZendAfi/Form/Configuration/LinkToProfileWidget.php +++ b/library/ZendAfi/Form/Configuration/Menu/LinkToProfile.php @@ -19,23 +19,20 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +class ZendAfi_Form_Configuration_Menu_LinkToProfile extends ZendAfi_Form_Configuration_Menu_Entry { -class ZendAfi_Form_Configuration_LinkToProfileWidget extends ZendAfi_Form { - public function init() { - parent::init(); - + public function populate($datas) { $this - ->addElement('text', - 'libelle', - ['label' => $this->_('libelle')]) - ->addElement('IcoPicker', - 'picto', - ['label' => $this->_('Icône')]) ->addElement('comboProfils', 'clef_profil', ['label' => $this->_('Lien vers le profil'), - 'empty_option' => true]) - ->addUniqDisplayGroup('link_to_profil'); + 'empty_option' => true, + 'value' => 1]) + ->removeElement('use_profil'); + + $this->removeDisplayGroup('menu_entry'); + $this->addUniqDisplayGroup('link_to_profil'); + + return parent::populate($datas); } -} -?> \ No newline at end of file +} \ No newline at end of file diff --git a/library/ZendAfi/Form/Configuration/Menu/Rss.php b/library/ZendAfi/Form/Configuration/Menu/Rss.php new file mode 100644 index 0000000000000000000000000000000000000000..ff295a46a1799e0e545d41e71c65ec6837658cf7 --- /dev/null +++ b/library/ZendAfi/Form/Configuration/Menu/Rss.php @@ -0,0 +1,48 @@ +<?php +/** + * Copyright (c) 2012-2017, 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 ZendAfi_Form_Configuration_Menu_Rss extends ZendAfi_Form_Configuration_Menu_Entry { + + public function populate($datas) { + $this + ->addElement('treeSelect', + 'feed_source', + ['IdItems' => $datas['id_items'], + 'IdCategories' => $datas['id_categorie'], + 'UrlDataSource' => Class_Url::assemble(['module' => 'admin', + 'controller' => 'bib', + 'action' => 'allitems', + 'type' => 'rss', + 'id_bib' => $datas['id_bib']])]) + + ->addElement('text', + 'nb', + ['value' => 10, + 'label' => $this->_('Nombre d\'articles à afficher')]) + + ->removeElement('use_profil'); + + $this->removeDisplayGroup('menu_entry'); + $this->addUniqDisplayGroup('menu_entry'); + + return parent::populate($datas); + } +} \ No newline at end of file