diff --git a/application/modules/admin/controllers/BatchController.php b/application/modules/admin/controllers/BatchController.php index 29ac625c1e023675f7e56b140076ce13235a59b2..d51f363ebfc604184d3383fe2aef0593283ae16f 100644 --- a/application/modules/admin/controllers/BatchController.php +++ b/application/modules/admin/controllers/BatchController.php @@ -22,28 +22,8 @@ class Admin_BatchController extends ZendAfi_Controller_Action { public function getPlugins() { - return ['ZendAfi_Controller_Plugin_Manager_Manager']; - } - - public function getRessourceDefinitions() { - return [ - 'model' => ['class' => 'Class_Batch', - 'name' => 'batch', - 'order' => 'type', - 'findAll' => 'findAllWithDefaults'], - - 'messages' => ['successful_add' => $this->_('Tâche ajoutée'), - 'successful_delete' => $this->_('Tâche supprimée')], - - 'actions' => ['add' => ['title' => $this->_('Nouvelle Tâche')], - 'index' => ['title' => $this->_('Tâches')]], - - 'display_groups' => ['ajout_tache' => ['legend' => 'Ajouter une tâche', - 'elements' => ['type' => ['element' => 'select', - 'options' => ['multiOptions' => Class_Batch::getAvailableType(), - 'required' => true]] ]]], - 'after_add' => function() {$this->_redirect('/admin/batch');} - ]; + return ['ZendAfi_Controller_Plugin_ResourceDefinition_Batch', + 'ZendAfi_Controller_Plugin_Manager_Manager']; } diff --git a/application/modules/admin/controllers/BibController.php b/application/modules/admin/controllers/BibController.php index a76810f8fb9e1008f330574ef7fc6241dc5f7bb1..e7db534ec6935b80f17488b6461355ca2ae14738 100644 --- a/application/modules/admin/controllers/BibController.php +++ b/application/modules/admin/controllers/BibController.php @@ -23,22 +23,8 @@ class Admin_BibController extends ZendAfi_Controller_Action { private $id_zone; public function getPlugins() { - return ['ZendAfi_Controller_Plugin_Manager_Library']; - } - - - public function getRessourceDefinitions() { - return ['model' => ['class' => 'Class_Bib', - 'name' => 'bib', - 'order' => 'id'], - - 'messages' => ['successful_save' => $this->_('Bibliothèque "%s" sauvegardée'), - 'successful_add' => $this->_('La bibliothèque "%s" a été ajoutée'), - 'successful_delete' => $this->_('La bibliothèque "%s" a été suppriméee')], - - 'actions' => ['edit' => ['title' => $this->_("Modifier une bibliothèque"), - 'add' => ['title' => $this->_("Ajouter une bibliothèque")]]], - 'form_class_name' => 'ZendAfi_Form_Admin_Library']; + return ['ZendAfi_Controller_Plugin_ResourceDefinition_Library', + 'ZendAfi_Controller_Plugin_Manager_Library']; } diff --git a/application/modules/admin/controllers/CustomFieldsMetaController.php b/application/modules/admin/controllers/CustomFieldsMetaController.php index 65c9aece7e28f5cbe99e6cb60dbc58b99f2b1255..e6bcbc0d1581fb3fa172de57f75073c8930321df 100644 --- a/application/modules/admin/controllers/CustomFieldsMetaController.php +++ b/application/modules/admin/controllers/CustomFieldsMetaController.php @@ -23,24 +23,8 @@ class Admin_CustomFieldsMetaController extends ZendAfi_Controller_Action { public function getPlugins() { - return ['ZendAfi_Controller_Plugin_Manager_Manager']; - } - - - public function getRessourceDefinitions() { - return ['model' => ['class' => 'Class_CustomField_Meta', - 'name' => 'custom_fields_meta', - 'order' => 'label'], - - 'messages' => ['successful_save' => $this->_('Champ personnalisé %s sauvegardé'), - 'successful_add' => $this->_('Champ personnalisé %s ajouté'), - 'successful_delete' => $this->_('Champ personnalisé %s supprimé')], - - 'actions' => ['add' => ['title' => $this->_('Nouveau champ personnalisé')], - 'edit' => ['title' => $this->_('Modifier un champ personnalisé')], - 'index' => ['title' => $this->_('Champs personnalisés')]], - - 'form_class_name' => 'ZendAfi_Form_Admin_CustomFields']; + return ['ZendAfi_Controller_Plugin_ResourceDefinition_CustomFieldMeta', + 'ZendAfi_Controller_Plugin_Manager_Manager']; } } ?> \ No newline at end of file diff --git a/application/modules/admin/controllers/CustomFieldsReportController.php b/application/modules/admin/controllers/CustomFieldsReportController.php index facbb1a74636a8f9a370e9a8ef26b875bec98623..b138e60c8c58b3466e768174748a69b9d27546ab 100644 --- a/application/modules/admin/controllers/CustomFieldsReportController.php +++ b/application/modules/admin/controllers/CustomFieldsReportController.php @@ -23,22 +23,8 @@ class Admin_CustomFieldsReportController extends ZendAfi_Controller_Action { public function getPlugins() { - return ['ZendAfi_Controller_Plugin_Manager_CustomFieldsReport']; - } - - - public function getRessourceDefinitions() { - return [ - 'model' => ['class' => 'Class_Report', 'name' => 'report', 'order' => 'label'], - 'messages' => ['successful_save' => $this->_('Rapport %s modifié')], - - 'actions' => [ - 'add' => ['title' => $this->_('Nouveau rapport')], - 'edit' => ['title' => $this->_('Modification du rapport: %s')], - 'index' => ['title' => $this->_('Rapports')]], - - 'form_class_name' => 'ZendAfi_Form_Report' - ]; + return ['ZendAfi_Controller_Plugin_ResourceDefinition_Report', + 'ZendAfi_Controller_Plugin_Manager_CustomFieldsReport']; } diff --git a/application/modules/admin/controllers/ExternalAgendasController.php b/application/modules/admin/controllers/ExternalAgendasController.php index ba2364ba62a2d2141aa6065bad33433a635e275f..aafcc27049c012cf1521cac53f5a6800ab034db9 100644 --- a/application/modules/admin/controllers/ExternalAgendasController.php +++ b/application/modules/admin/controllers/ExternalAgendasController.php @@ -22,31 +22,11 @@ class Admin_ExternalAgendasController extends ZendAfi_Controller_Action { public function getPlugins() { - return ['ZendAfi_Controller_Plugin_Manager_Manager']; + return ['ZendAfi_Controller_Plugin_ResourceDefinition_ExternalAgenda', + 'ZendAfi_Controller_Plugin_Manager_Manager']; } - public function getRessourceDefinitions() { - return - [ - 'model' => ['class' => 'Class_ExternalAgenda', - 'name' => 'agenda', - 'order' => 'label'], - - 'actions' => ['index' => ['title' => $this->_('Gestion des agendas externes')], - 'add' => ['title' => $this->_('Ajouter un nouvel agenda')], - 'edit' => ['title' => $this->_('Modifier un agenda')]], - - 'messages' => ['successful_add' => $this->_('Agenda %s ajouté'), - 'successful_save' => $this->_('Agenda %s modifié'), - 'successful_delete' => $this->_('Agenda %s supprimé')], - - 'form_class_name' => 'ZendAfi_Form_Admin_ExternalAgenda', - ]; - } - - - public function importAction() { if (!$agenda = Class_ExternalAgenda::find($this->_getParam('id'))) return $this->_redirectToIndex(); diff --git a/application/modules/admin/controllers/FrbrLinkController.php b/application/modules/admin/controllers/FrbrLinkController.php index 28c990d0a999e9f3b5e4062834692a8edad1aedb..a45fd69800030435c403722e4c000318bc760400 100644 --- a/application/modules/admin/controllers/FrbrLinkController.php +++ b/application/modules/admin/controllers/FrbrLinkController.php @@ -22,25 +22,7 @@ class Admin_FrbrLinkController extends ZendAfi_Controller_Action { public function getPlugins() { - return ['ZendAfi_Controller_Plugin_Manager_Manager']; - } - - - public function getRessourceDefinitions() { - return [ - 'model' => ['class' => 'Class_FRBR_Link', - 'name' => 'relation', - 'order' => 'source'], - - 'messages' => ['successful_save' => $this->_('Relation sauvegardée'), - 'successful_add' => $this->_('Relation ajoutée'),], - - 'actions' => ['add' => ['title' => $this->_('Nouvelle relation')], - 'edit' => ['title' => $this->_('Modifier une relation')], - 'index' => ['title' => $this->_('Notices liées')]], - - 'form' => (new ZendAfi_Form_FRBR_Link())]; + return ['ZendAfi_Controller_Plugin_ResourceDefinition_FRBRLink', + 'ZendAfi_Controller_Plugin_Manager_Manager']; } } - -?> \ No newline at end of file diff --git a/application/modules/admin/controllers/FrbrLinktypeController.php b/application/modules/admin/controllers/FrbrLinktypeController.php index 9fb86d5684f7e803fc8e1476512b2819fd04d457..5f4c05d0241fa1c35605ae8e7cf052b1333b3158 100644 --- a/application/modules/admin/controllers/FrbrLinktypeController.php +++ b/application/modules/admin/controllers/FrbrLinktypeController.php @@ -22,21 +22,7 @@ class Admin_FrbrLinktypeController extends ZendAfi_Controller_Action { public function getPlugins() { - return ['ZendAfi_Controller_Plugin_Manager_Manager']; - } - - - public function getRessourceDefinitions() { - return ['model' => ['class' => 'Class_FRBR_LinkType', - 'name' => 'relation', - 'order' => 'libelle'], - - 'messages' => ['successful_save' => $this->_('Type de relation "%s" sauvegardé'),], - - 'actions' => ['add' => ['title' => $this->_('Nouveau type de relation')], - 'edit' => ['title' => $this->_('Modifier un type de relation')], - 'index' => ['title' => $this->_('Types de relation')]], - - 'form' => (new ZendAfi_Form_FRBR_LinkType())]; + return ['ZendAfi_Controller_Plugin_ResourceDefinition_FRBRLinkType', + 'ZendAfi_Controller_Plugin_Manager_Manager']; } } \ No newline at end of file diff --git a/application/modules/admin/controllers/LieuController.php b/application/modules/admin/controllers/LieuController.php index 99d1b1a81e5885c122b43e275bda75f94a2c41fe..5948970087cddff65053e6ecd12b68787df70d6f 100644 --- a/application/modules/admin/controllers/LieuController.php +++ b/application/modules/admin/controllers/LieuController.php @@ -21,28 +21,10 @@ class Admin_LieuController extends ZendAfi_Controller_Action { public function getPlugins() { - return ['ZendAfi_Controller_Plugin_Manager_Lieu']; + return ['ZendAfi_Controller_Plugin_ResourceDefinition_Lieu', + 'ZendAfi_Controller_Plugin_Manager_Lieu']; } - - public function getRessourceDefinitions() { - return ['model' => ['class' => 'Class_Lieu', - 'name' => 'lieu', - 'order' => 'libelle'], - - 'messages' => ['successful_save' => $this->_('Lieu "%s" sauvegardé'), - 'successful_add' => $this->_('le lieu "%s" a été créé'), - 'successful_delete' => $this->_('Lieu "%s" supprimé')], - - 'actions' => ['index' => ['title' => $this->_('Lieux')], - 'add' => ['title' => $this->_('Déclarer un nouveau lieu')], - 'edit' => ['title' => $this->_('Modifier le lieu "%s"')], - 'delete' => ['title' => $this->_('Supprimer le lieu "%s"')]], - - 'form_class_name' => 'ZendAfi_Form_Admin_Location']; - } - - public function exportCsvAction() { $this->_helper->csv('lieu_csv', Class_Lieu::findAllForCsv()); diff --git a/application/modules/admin/controllers/MultimediaController.php b/application/modules/admin/controllers/MultimediaController.php index 99fc614260a1b8fd3012e0ce461d52a3f94d9f5c..89d342cc56cb850ca5bb0cf5fafaacdcdbcacd57 100644 --- a/application/modules/admin/controllers/MultimediaController.php +++ b/application/modules/admin/controllers/MultimediaController.php @@ -21,26 +21,10 @@ class Admin_MultimediaController extends ZendAfi_Controller_Action { public function getPlugins() { - return ['ZendAfi_Controller_Plugin_Manager_Multimedia']; + return ['ZendAfi_Controller_Plugin_ResourceDefinition_Multimedia', + 'ZendAfi_Controller_Plugin_Manager_Multimedia']; } - public function getRessourceDefinitions() { - return ['model' => ['class' => 'Class_Multimedia_Location', 'name' => 'site'], - 'messages' => ['successful_save' => 'Site %s sauvegardé'], - 'actions' => ['edit' => ['title' => 'Modifier un site multimédia'], - 'index' => ['title' => 'Sites multimédia']], - 'display_groups' => ['localisation' => ['legend' => 'Localisation', - 'elements' => $this->getLocalisationFields()], - - 'config' => ['legend' => 'Réservation', - 'elements' => $this->getConfigFields()], - - 'config_auto' => ['legend' => 'Réservation automatique', - 'elements' => $this->getConfigAutoFields()]] - ]; - } - - public function getLocalisationFields() { $libelles = []; foreach (Class_Bib::findAllBy(['order' => 'libelle']) as $bib) diff --git a/application/modules/admin/controllers/OaiController.php b/application/modules/admin/controllers/OaiController.php index 0639ca37de4211efb079ddf8025d5dbef7c61332..86825002f858185554ed1ab2be05836c6cc6aba7 100644 --- a/application/modules/admin/controllers/OaiController.php +++ b/application/modules/admin/controllers/OaiController.php @@ -20,37 +20,10 @@ */ class Admin_OaiController extends ZendAfi_Controller_Action { public function getPlugins() { - return ['ZendAfi_Controller_Plugin_Manager_Manager']; + return ['ZendAfi_Controller_Plugin_ResourceDefinition_OAI', + 'ZendAfi_Controller_Plugin_Manager_Manager']; } - - public function getRessourceDefinitions() { - return ['model' => ['class' => 'Class_EntrepotOAI', - 'name' => 'entrepot'], - 'messages' => ['successful_add' => 'Entrepôt %s ajouté', - 'successful_save' => 'Entrepôt %s sauvegardé', - 'successful_delete' => 'Entrepôt %s supprimé'], - - 'actions' => ['edit' => ['title' => 'Modifier un entrepôt OAI'], - 'add' => ['title' => 'Ajouter un entrepôt OAI'], - 'index' => ['title' => 'Entrepôts OAI']], - - 'display_groups' => ['categorie' => ['legend' => 'Entrepôt', - 'elements' => - ['libelle' => ['element' => 'text', - 'options' => ['label' => 'Libellé *', - 'size' => 30, - 'required' => true, - 'allowEmpty' => false]], - 'handler' => ['element' => 'text', - 'options' => ['label' => 'Url *', - 'size' => '90', - 'required' => true, - 'allowEmpty' => false, - 'validators' => ['url']]]]]]]; - } - - public function indexAction() { parent::indexAction(); if ($expression_recherche = $this->_getParam('expression')) { diff --git a/application/modules/admin/controllers/OpdsController.php b/application/modules/admin/controllers/OpdsController.php index a97270e450e752e2b2f7c60a48cb347b86d2be5b..1e985c10da2a773ad104bf8e95a47b5f2d146bb3 100644 --- a/application/modules/admin/controllers/OpdsController.php +++ b/application/modules/admin/controllers/OpdsController.php @@ -20,35 +20,10 @@ */ class Admin_OpdsController extends ZendAfi_Controller_Action { - public function getPlugins() { - return ['ZendAfi_Controller_Plugin_Manager_Manager']; - } - - public function getRessourceDefinitions() { - return ['model' => ['class' => 'Class_OpdsCatalog', - 'name' => 'catalog'], - 'messages' => ['successful_add' => 'Catalogue %s ajouté', - 'successful_save' => 'Catalogue %s sauvegardé', - 'successful_delete' => 'Catalogue %s supprimé'], - - 'actions' => ['edit' => ['title' => 'Modifier un catalogue OPDS'], - 'add' => ['title' => 'Ajouter un catalogue OPDS'], - 'index' => ['title' => 'Catalogues OPDS']], - - 'display_groups' => ['categorie' => ['legend' => 'Catalogue', - 'elements' => - ['libelle' => ['element' => 'text', - 'options' => ['label' => 'Libellé *', - 'size' => 30, - 'required' => true, - 'allowEmpty' => false]], - 'url' => ['element' => 'text', - 'options' => ['label' => 'Url *', - 'size' => 75, - 'required' => true, - 'allowEmpty' => false, - 'validators' => ['url']]]]]]]; + public function getPlugins() { + return ['ZendAfi_Controller_Plugin_ResourceDefinition_OPDS', + 'ZendAfi_Controller_Plugin_Manager_Manager']; } diff --git a/application/modules/admin/controllers/SitoController.php b/application/modules/admin/controllers/SitoController.php index 00e316f3870e65e6f76ca7cec798ec10b6838ced..947544dbc75ee57f99354d89fad13f89c7e8ff9c 100644 --- a/application/modules/admin/controllers/SitoController.php +++ b/application/modules/admin/controllers/SitoController.php @@ -22,34 +22,11 @@ class Admin_SitoController extends ZendAfi_Controller_Action { public function getPlugins() { - return ['ZendAfi_Controller_Plugin_Manager_Sitotheque']; + return ['ZendAfi_Controller_Plugin_ResourceDefinition_Sitotheque', + 'ZendAfi_Controller_Plugin_Manager_Sitotheque']; } - public function getRessourceDefinitions() { - return [ - 'model' => [ - 'class' => 'Class_Sitotheque', - 'name' => 'sitotheque', - 'order' => 'id', - 'scope' => 'id_cat'], - - 'messages' => [ - 'successful_save' => $this->_('Site "%s" sauvegardé'), - 'successful_add' => $this->_('Le site "%s" a été sauvegardé'), - 'successful_delete' => $this->_('Site "%s" supprimé')], - - 'actions' => [ - 'add' => ['title' => $this->_("Ajouter un site")], - 'edit' => ['title' => $this->_("Modifier le site: %s")], - 'delete' => ['title' => $this->_("Supprimer le site: %s")] - ], - - 'form_class_name' => 'ZendAfi_Form_Admin_Sitotheque']; - } - - - public function init() { parent::init(); if ($site = Class_Sitotheque::find((int)$this->_getParam('id'))) { diff --git a/library/ZendAfi/Controller/Plugin/ResourceDefinition/Batch.php b/library/ZendAfi/Controller/Plugin/ResourceDefinition/Batch.php new file mode 100644 index 0000000000000000000000000000000000000000..84bd2cb696db8de291d1db110a5e7e6e1781836a --- /dev/null +++ b/library/ZendAfi/Controller/Plugin/ResourceDefinition/Batch.php @@ -0,0 +1,45 @@ +<?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_Controller_Plugin_ResourceDefinition_Batch extends ZendAfi_Controller_Plugin_ResourceDefinition_Abstract { + public function getDefinitions() { + return [ + 'model' => ['class' => 'Class_Batch', + 'name' => 'batch', + 'order' => 'type', + 'findAll' => 'findAllWithDefaults'], + + 'messages' => ['successful_add' => $this->_('Tâche ajoutée'), + 'successful_delete' => $this->_('Tâche supprimée')], + + 'actions' => ['add' => ['title' => $this->_('Nouvelle Tâche')], + 'index' => ['title' => $this->_('Tâches')]], + + 'display_groups' => ['ajout_tache' => ['legend' => 'Ajouter une tâche', + 'elements' => ['type' => ['element' => 'select', + 'options' => ['multiOptions' => Class_Batch::getAvailableType(), + 'required' => true]] ]]], + 'after_add' => function() {$this->_redirect('/admin/batch');} + ]; + } +} +?> \ No newline at end of file diff --git a/library/ZendAfi/Controller/Plugin/ResourceDefinition/CustomFieldMeta.php b/library/ZendAfi/Controller/Plugin/ResourceDefinition/CustomFieldMeta.php new file mode 100644 index 0000000000000000000000000000000000000000..563145a488907e75068e9a82b46ff44d96ee6224 --- /dev/null +++ b/library/ZendAfi/Controller/Plugin/ResourceDefinition/CustomFieldMeta.php @@ -0,0 +1,40 @@ +<?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_Controller_Plugin_ResourceDefinition_CustomFieldMeta extends ZendAfi_Controller_Plugin_ResourceDefinition_Abstract { + public function getDefinitions() { + return ['model' => ['class' => 'Class_CustomField_Meta', + 'name' => 'custom_fields_meta', + 'order' => 'label'], + + 'messages' => ['successful_save' => $this->_('Champ personnalisé %s sauvegardé'), + 'successful_add' => $this->_('Champ personnalisé %s ajouté'), + 'successful_delete' => $this->_('Champ personnalisé %s supprimé')], + + 'actions' => ['add' => ['title' => $this->_('Nouveau champ personnalisé')], + 'edit' => ['title' => $this->_('Modifier un champ personnalisé')], + 'index' => ['title' => $this->_('Champs personnalisés')]], + + 'form_class_name' => 'ZendAfi_Form_Admin_CustomFields']; + } +} +?> \ No newline at end of file diff --git a/library/ZendAfi/Controller/Plugin/ResourceDefinition/ExternalAgenda.php b/library/ZendAfi/Controller/Plugin/ResourceDefinition/ExternalAgenda.php new file mode 100644 index 0000000000000000000000000000000000000000..ede104ef7d76040f944fc6942648a742d023e6cd --- /dev/null +++ b/library/ZendAfi/Controller/Plugin/ResourceDefinition/ExternalAgenda.php @@ -0,0 +1,42 @@ +<?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_Controller_Plugin_ResourceDefinition_ExternalAgenda extends ZendAfi_Controller_Plugin_ResourceDefinition_Abstract { + + public function getDefinitions() { + return ['model' => ['class' => 'Class_ExternalAgenda', + 'name' => 'agenda', + 'order' => 'label'], + + 'actions' => ['index' => ['title' => $this->_('Gestion des agendas externes')], + 'add' => ['title' => $this->_('Ajouter un nouvel agenda')], + 'edit' => ['title' => $this->_('Modifier un agenda')]], + + 'messages' => ['successful_add' => $this->_('Agenda %s ajouté'), + 'successful_save' => $this->_('Agenda %s modifié'), + 'successful_delete' => $this->_('Agenda %s supprimé')], + + 'form_class_name' => 'ZendAfi_Form_Admin_ExternalAgenda', + ]; + } +} +?> \ No newline at end of file diff --git a/library/ZendAfi/Controller/Plugin/ResourceDefinition/FRBRLink.php b/library/ZendAfi/Controller/Plugin/ResourceDefinition/FRBRLink.php new file mode 100644 index 0000000000000000000000000000000000000000..885f5bd8eb390ee12abeff2fdcccd3669e6010bc --- /dev/null +++ b/library/ZendAfi/Controller/Plugin/ResourceDefinition/FRBRLink.php @@ -0,0 +1,41 @@ +<?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_Controller_Plugin_ResourceDefinition_FRBRLink extends ZendAfi_Controller_Plugin_ResourceDefinition_Abstract { + + public function getRessourceDefinitions() { + return [ + 'model' => ['class' => 'Class_FRBR_Link', + 'name' => 'relation', + 'order' => 'source'], + + 'messages' => ['successful_save' => $this->_('Relation sauvegardée'), + 'successful_add' => $this->_('Relation ajoutée'),], + + 'actions' => ['add' => ['title' => $this->_('Nouvelle relation')], + 'edit' => ['title' => $this->_('Modifier une relation')], + 'index' => ['title' => $this->_('Notices liées')]], + + 'form' => (new ZendAfi_Form_FRBR_Link())]; + } +} +?> \ No newline at end of file diff --git a/library/ZendAfi/Controller/Plugin/ResourceDefinition/FRBRLinkType.php b/library/ZendAfi/Controller/Plugin/ResourceDefinition/FRBRLinkType.php new file mode 100644 index 0000000000000000000000000000000000000000..721f8a70acdd8661288ddd72cea3ec55c1f0faa8 --- /dev/null +++ b/library/ZendAfi/Controller/Plugin/ResourceDefinition/FRBRLinkType.php @@ -0,0 +1,39 @@ +<?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_Controller_Plugin_ResourceDefinition_FRBRLinkType extends ZendAfi_Controller_Plugin_ResourceDefinition_Abstract { + + public function getRessourceDefinitions() { + return ['model' => ['class' => 'Class_FRBR_LinkType', + 'name' => 'relation', + 'order' => 'libelle'], + + 'messages' => ['successful_save' => $this->_('Type de relation "%s" sauvegardé'),], + + 'actions' => ['add' => ['title' => $this->_('Nouveau type de relation')], + 'edit' => ['title' => $this->_('Modifier un type de relation')], + 'index' => ['title' => $this->_('Types de relation')]], + + 'form' => (new ZendAfi_Form_FRBR_LinkType())]; + } +} +?> \ No newline at end of file diff --git a/library/ZendAfi/Controller/Plugin/ResourceDefinition/Library.php b/library/ZendAfi/Controller/Plugin/ResourceDefinition/Library.php new file mode 100644 index 0000000000000000000000000000000000000000..c2068037e4b96ecc3c10b8156ddee9bec9783354 --- /dev/null +++ b/library/ZendAfi/Controller/Plugin/ResourceDefinition/Library.php @@ -0,0 +1,39 @@ +<?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_Controller_Plugin_ResourceDefinition_Library extends ZendAfi_Controller_Plugin_ResourceDefinition_Abstract { + + public function getDefinitions() { + return ['model' => ['class' => 'Class_Bib', + 'name' => 'bib', + 'order' => 'id'], + + 'messages' => ['successful_save' => $this->_('Bibliothèque "%s" sauvegardée'), + 'successful_add' => $this->_('La bibliothèque "%s" a été ajoutée'), + 'successful_delete' => $this->_('La bibliothèque "%s" a été suppriméee')], + + 'actions' => ['edit' => ['title' => $this->_("Modifier une bibliothèque")], + 'add' => ['title' => $this->_("Ajouter une bibliothèque")]], + 'form_class_name' => 'ZendAfi_Form_Admin_Library']; + } +} +?> \ No newline at end of file diff --git a/library/ZendAfi/Controller/Plugin/ResourceDefinition/Lieu.php b/library/ZendAfi/Controller/Plugin/ResourceDefinition/Lieu.php new file mode 100644 index 0000000000000000000000000000000000000000..7f34c007d71f332a77bd1adc5653f3847a61bf43 --- /dev/null +++ b/library/ZendAfi/Controller/Plugin/ResourceDefinition/Lieu.php @@ -0,0 +1,42 @@ +<?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_Controller_Plugin_ResourceDefinition_Lieu extends ZendAfi_Controller_Plugin_ResourceDefinition_Abstract { + + public function getRessourceDefinitions() { + return ['model' => ['class' => 'Class_Lieu', + 'name' => 'lieu', + 'order' => 'libelle'], + + 'messages' => ['successful_save' => $this->_('Lieu "%s" sauvegardé'), + 'successful_add' => $this->_('le lieu "%s" a été créé'), + 'successful_delete' => $this->_('Lieu "%s" supprimé')], + + 'actions' => ['index' => ['title' => $this->_('Lieux')], + 'add' => ['title' => $this->_('Déclarer un nouveau lieu')], + 'edit' => ['title' => $this->_('Modifier le lieu "%s"')], + 'delete' => ['title' => $this->_('Supprimer le lieu "%s"')]], + + 'form_class_name' => 'ZendAfi_Form_Admin_Location']; + } +} +?> \ No newline at end of file diff --git a/library/ZendAfi/Controller/Plugin/ResourceDefinition/Multimedia.php b/library/ZendAfi/Controller/Plugin/ResourceDefinition/Multimedia.php new file mode 100644 index 0000000000000000000000000000000000000000..2ec7bbf7e1acf1ecabe1997b22d650caba5d5e4b --- /dev/null +++ b/library/ZendAfi/Controller/Plugin/ResourceDefinition/Multimedia.php @@ -0,0 +1,40 @@ +<?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_Controller_Plugin_ResourceDefinition_Multimedia extends ZendAfi_Controller_Plugin_ResourceDefinition_Abstract { + public function getDefinitions() { + return ['model' => ['class' => 'Class_Multimedia_Location', 'name' => 'site'], + 'messages' => ['successful_save' => 'Site %s sauvegardé'], + 'actions' => ['edit' => ['title' => 'Modifier un site multimédia'], + 'index' => ['title' => 'Sites multimédia']], + 'display_groups' => ['localisation' => ['legend' => 'Localisation', + 'elements' => $this->getLocalisationFields()], + + 'config' => ['legend' => 'Réservation', + 'elements' => $this->getConfigFields()], + + 'config_auto' => ['legend' => 'Réservation automatique', + 'elements' => $this->getConfigAutoFields()]] + ]; + } +} +?> \ No newline at end of file diff --git a/library/ZendAfi/Controller/Plugin/ResourceDefinition/OAI.php b/library/ZendAfi/Controller/Plugin/ResourceDefinition/OAI.php new file mode 100644 index 0000000000000000000000000000000000000000..357ee13498f3515de78143c368a6793a9ff1cbdc --- /dev/null +++ b/library/ZendAfi/Controller/Plugin/ResourceDefinition/OAI.php @@ -0,0 +1,50 @@ +<?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_Controller_Plugin_ResourceDefinition_OAI extends ZendAfi_Controller_Plugin_ResourceDefinition_Abstract { + public function getDefinitions() { + return ['model' => ['class' => 'Class_EntrepotOAI', + 'name' => 'entrepot'], + 'messages' => ['successful_add' => 'Entrepôt %s ajouté', + 'successful_save' => 'Entrepôt %s sauvegardé', + 'successful_delete' => 'Entrepôt %s supprimé'], + + 'actions' => ['edit' => ['title' => 'Modifier un entrepôt OAI'], + 'add' => ['title' => 'Ajouter un entrepôt OAI'], + 'index' => ['title' => 'Entrepôts OAI']], + + 'display_groups' => ['categorie' => ['legend' => 'Entrepôt', + 'elements' => + ['libelle' => ['element' => 'text', + 'options' => ['label' => 'Libellé *', + 'size' => 30, + 'required' => true, + 'allowEmpty' => false]], + 'handler' => ['element' => 'text', + 'options' => ['label' => 'Url *', + 'size' => '90', + 'required' => true, + 'allowEmpty' => false, + 'validators' => ['url']]]]]]]; + } +} +?> \ No newline at end of file diff --git a/library/ZendAfi/Controller/Plugin/ResourceDefinition/OPDS.php b/library/ZendAfi/Controller/Plugin/ResourceDefinition/OPDS.php new file mode 100644 index 0000000000000000000000000000000000000000..ad9ca0c146a015c4d200d162ffbe1dae1af9ef18 --- /dev/null +++ b/library/ZendAfi/Controller/Plugin/ResourceDefinition/OPDS.php @@ -0,0 +1,51 @@ +<?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_Controller_Plugin_ResourceDefinition_OPDS extends ZendAfi_Controller_Plugin_ResourceDefinition_Abstract { + + public function getDefinitions() { + return ['model' => ['class' => 'Class_OpdsCatalog', + 'name' => 'catalog'], + 'messages' => ['successful_add' => 'Catalogue %s ajouté', + 'successful_save' => 'Catalogue %s sauvegardé', + 'successful_delete' => 'Catalogue %s supprimé'], + + 'actions' => ['edit' => ['title' => 'Modifier un catalogue OPDS'], + 'add' => ['title' => 'Ajouter un catalogue OPDS'], + 'index' => ['title' => 'Catalogues OPDS']], + + 'display_groups' => ['categorie' => ['legend' => 'Catalogue', + 'elements' => + ['libelle' => ['element' => 'text', + 'options' => ['label' => 'Libellé *', + 'size' => 30, + 'required' => true, + 'allowEmpty' => false]], + 'url' => ['element' => 'text', + 'options' => ['label' => 'Url *', + 'size' => 75, + 'required' => true, + 'allowEmpty' => false, + 'validators' => ['url']]]]]]]; + } +} +?> \ No newline at end of file diff --git a/library/ZendAfi/Controller/Plugin/ResourceDefinition/Report.php b/library/ZendAfi/Controller/Plugin/ResourceDefinition/Report.php new file mode 100644 index 0000000000000000000000000000000000000000..2d6f2bedeb753a1c318415c81a4d2c33f43f05a0 --- /dev/null +++ b/library/ZendAfi/Controller/Plugin/ResourceDefinition/Report.php @@ -0,0 +1,37 @@ +<?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_Controller_Plugin_ResourceDefinition_Report extends ZendAfi_Controller_Plugin_ResourceDefinition_Abstract { + public function getDefinitions() { + return ['model' => ['class' => 'Class_Report', 'name' => 'report', 'order' => 'label'], + 'messages' => ['successful_save' => $this->_('Rapport %s modifié')], + + 'actions' => [ + 'add' => ['title' => $this->_('Nouveau rapport')], + 'edit' => ['title' => $this->_('Modification du rapport: %s')], + 'index' => ['title' => $this->_('Rapports')]], + + 'form_class_name' => 'ZendAfi_Form_Report' + ]; + } +} +?> \ No newline at end of file diff --git a/library/ZendAfi/Controller/Plugin/ResourceDefinition/Sitotheque.php b/library/ZendAfi/Controller/Plugin/ResourceDefinition/Sitotheque.php new file mode 100644 index 0000000000000000000000000000000000000000..ba26d819e6b8a39ffe7714d39a447044a11eff8d --- /dev/null +++ b/library/ZendAfi/Controller/Plugin/ResourceDefinition/Sitotheque.php @@ -0,0 +1,47 @@ +<?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_Controller_Plugin_ResourceDefinition_Sitotheque extends ZendAfi_Controller_Plugin_ResourceDefinition_Abstract { + + public function getDefinitions() { + return [ + 'model' => [ + 'class' => 'Class_Sitotheque', + 'name' => 'sitotheque', + 'order' => 'id', + 'scope' => 'id_cat'], + + 'messages' => [ + 'successful_save' => $this->_('Site "%s" sauvegardé'), + 'successful_add' => $this->_('Le site "%s" a été sauvegardé'), + 'successful_delete' => $this->_('Site "%s" supprimé')], + + 'actions' => [ + 'add' => ['title' => $this->_("Ajouter un site")], + 'edit' => ['title' => $this->_("Modifier le site: %s")], + 'delete' => ['title' => $this->_("Supprimer le site: %s")] + ], + + 'form_class_name' => 'ZendAfi_Form_Admin_Sitotheque']; + } +} +?> \ No newline at end of file