From 3f848efe67cc2be2d782e89470ee6285928750b9 Mon Sep 17 00:00:00 2001 From: "stephen@cubedesigners.com" Date: Tue, 29 Jan 2019 16:33:46 +0000 Subject: [PATCH] WIP #2340 @7.5 --- framework/application/Bootstrap.php | 6 +++- .../forms/CMS/Element/ResearchCategories.php | 9 +++++ .../CMS/Element/ResearchSpecialities.php | 9 +++++ framework/application/forms/CMS/Research.php | 11 +++++++ .../forms/CMS/ResearchCategories.php | 33 +++++++++++++++++++ .../forms/CMS/ResearchSpecialities.php | 28 ++++++++++++++++ .../forms/CMS/Sub/Research/Studies.php | 14 ++++++++ .../forms/CMS/Sub/Research/Study.php | 33 +++++++++++++++++++ .../application/models/ResearchCategory.php | 17 ++++++++++ .../application/models/ResearchSpeciality.php | 15 +++++++++ .../application/models/ResearchStudy.php | 23 +++++++++++++ .../application/views/helpers/Rightbar.php | 11 +++++-- .../views/scripts/templates/research.phtml | 12 +++++++ 13 files changed, 217 insertions(+), 4 deletions(-) create mode 100644 framework/application/forms/CMS/Element/ResearchCategories.php create mode 100644 framework/application/forms/CMS/Element/ResearchSpecialities.php create mode 100644 framework/application/forms/CMS/Research.php create mode 100644 framework/application/forms/CMS/ResearchCategories.php create mode 100644 framework/application/forms/CMS/ResearchSpecialities.php create mode 100644 framework/application/forms/CMS/Sub/Research/Studies.php create mode 100644 framework/application/forms/CMS/Sub/Research/Study.php create mode 100644 framework/application/models/ResearchCategory.php create mode 100644 framework/application/models/ResearchSpeciality.php create mode 100644 framework/application/models/ResearchStudy.php create mode 100644 framework/application/views/scripts/templates/research.phtml diff --git a/framework/application/Bootstrap.php b/framework/application/Bootstrap.php index ef86a1d..591388b 100644 --- a/framework/application/Bootstrap.php +++ b/framework/application/Bootstrap.php @@ -65,7 +65,11 @@ class Bootstrap extends CubeIT_Bootstrap { $templates['Génériques'] = array('text' => 'Page de texte', 'liens' => 'Liens', 'faq' => 'Questions / Réponses', 'temoignages' => 'Témoignages'); $templates['Accueil'] = array('home' => 'Page d\'accueil'); $templates['Le centre'] = array('equipes' => 'L\'équipe', 'reunion' => 'Réunion de concertation'); - $templates['Recherche clinique'] = array('listing' => 'Listing'); + $templates['Recherche clinique'] = array( + //'listing' => 'Listing', + 'research' => 'Recherche clinique', + 'researchStudies' => 'Études cliniques', + ); $templates['Parcours patient'] = array('parcours' => 'Parcours', 'soins' => 'Soins support'); $templates['Traitements'] = array('traitement' => 'Traitement (Texte avec accordéon)'); $templates['Actualités'] = array('news' => 'Actualités'); diff --git a/framework/application/forms/CMS/Element/ResearchCategories.php b/framework/application/forms/CMS/Element/ResearchCategories.php new file mode 100644 index 0000000..d0a0b65 --- /dev/null +++ b/framework/application/forms/CMS/Element/ResearchCategories.php @@ -0,0 +1,9 @@ +setBaseForm('CCGM_Form_CMS_ResearchCategories'); + } + +} diff --git a/framework/application/forms/CMS/Element/ResearchSpecialities.php b/framework/application/forms/CMS/Element/ResearchSpecialities.php new file mode 100644 index 0000000..9f5b23d --- /dev/null +++ b/framework/application/forms/CMS/Element/ResearchSpecialities.php @@ -0,0 +1,9 @@ +setBaseForm('CCGM_Form_CMS_ResearchSpecialities'); + } + +} diff --git a/framework/application/forms/CMS/Research.php b/framework/application/forms/CMS/Research.php new file mode 100644 index 0000000..1e9e315 --- /dev/null +++ b/framework/application/forms/CMS/Research.php @@ -0,0 +1,11 @@ +setLegend('Études Cliniques'); + $this->addSubForm($studies, 'studies'); + } +} diff --git a/framework/application/forms/CMS/ResearchCategories.php b/framework/application/forms/CMS/ResearchCategories.php new file mode 100644 index 0000000..13e8357 --- /dev/null +++ b/framework/application/forms/CMS/ResearchCategories.php @@ -0,0 +1,33 @@ +setLabel('#'); + $this->addElement($id); + + $name = new Zend_Form_Element_Text('name'); + $name->setLabel(__('Nom')); + $this->addElement($name); + + $icon = new CubeIT_Form_Element_File_Image('icon'); + $icon->setLabel(__('Icône (SVG)')); + $icon->setMaxItems(1); + $this->addElement($icon); + + $order = new Zend_Form_Element_Text('sort_order'); + $order->setLabel('Sort Order'); + $this->addElement($order); + + $this->setListTitle(__('Catégories de recherche')) + ->setNewTitle(__('Créer une catégorie de recherche')) + ->setEditTitle(sprintf(__("Edition de la catégorie « %s »"), '$name')) + ->setTitleColumn('name') + ->setAdditionnalColumns(array('sort_order')) + ->setModel('CCGM_Model_ResearchCategory'); + } + +} diff --git a/framework/application/forms/CMS/ResearchSpecialities.php b/framework/application/forms/CMS/ResearchSpecialities.php new file mode 100644 index 0000000..988ac5c --- /dev/null +++ b/framework/application/forms/CMS/ResearchSpecialities.php @@ -0,0 +1,28 @@ +setLabel('#'); + $this->addElement($id); + + $name = new Zend_Form_Element_Text('name'); + $name->setLabel(__('Nom')); + $this->addElement($name); + + $icon = new CubeIT_Form_Element_File_Image('icon'); + $icon->setLabel(__('Icône (SVG)')); + $icon->setMaxItems(1); + $this->addElement($icon); + + $this->setListTitle(__('Spécialités')) + ->setNewTitle(__('Créer une spécialité')) + ->setEditTitle(sprintf(__("Edition de la spécialité « %s »"), '$name')) + ->setTitleColumn('name') + ->setModel('CCGM_Model_ResearchSpeciality'); + } + +} diff --git a/framework/application/forms/CMS/Sub/Research/Studies.php b/framework/application/forms/CMS/Sub/Research/Studies.php new file mode 100644 index 0000000..8b17600 --- /dev/null +++ b/framework/application/forms/CMS/Sub/Research/Studies.php @@ -0,0 +1,14 @@ +setBaseSubForm($study); + $this->setBaseLegend('Edition de l\'étude « $title »'); + $this->setNewLegend('Nouvelle étude'); + } + +} diff --git a/framework/application/forms/CMS/Sub/Research/Study.php b/framework/application/forms/CMS/Sub/Research/Study.php new file mode 100644 index 0000000..91c9a45 --- /dev/null +++ b/framework/application/forms/CMS/Sub/Research/Study.php @@ -0,0 +1,33 @@ +setLabel('Titre'); + $this->addElement($title); + + $code = new CubeIT_Form_Element_Markitup('description'); + $code->setLabel('Description'); + $this->addElement($code); + + $localisation = new CCGM_Form_CMS_Element_ResearchCategories('category'); + $localisation->setLabel('Localisation'); + $this->addElement($localisation); + + $pathology = new Zend_Form_Element_Textarea('pathology'); + $pathology->setLabel('Pathologie'); + $this->addElement($pathology); + + $investigator = new Zend_Form_Element_Text('investigator'); + $investigator->setLabel('Investigateur'); + $this->addElement($investigator); + + $specialities = new CCGM_Form_CMS_Element_ResearchSpecialities('specialities'); + $specialities->setLabel('Spécialités'); + $this->addElement($specialities); + } + +} diff --git a/framework/application/models/ResearchCategory.php b/framework/application/models/ResearchCategory.php new file mode 100644 index 0000000..2581cb6 --- /dev/null +++ b/framework/application/models/ResearchCategory.php @@ -0,0 +1,17 @@ +addColumn('name', 'string', array('length' => 128)); + $table->addColumn('icon', 'string', array('length' => 128)); + $table->addColumn('sort_order', 'smallint', array('unsigned' => true)); + } + +} diff --git a/framework/application/models/ResearchSpeciality.php b/framework/application/models/ResearchSpeciality.php new file mode 100644 index 0000000..fa34c2f --- /dev/null +++ b/framework/application/models/ResearchSpeciality.php @@ -0,0 +1,15 @@ +addColumn('name', 'string', array('length' => 128)); + $table->addColumn('icon', 'string', array('length' => 128)); + } + +} diff --git a/framework/application/models/ResearchStudy.php b/framework/application/models/ResearchStudy.php new file mode 100644 index 0000000..4f01b0a --- /dev/null +++ b/framework/application/models/ResearchStudy.php @@ -0,0 +1,23 @@ +addColumn('title', 'text'); + $table->addColumn('description', 'text'); + $table->addColumn('category', 'integer'); + $table->addColumn('pathology', 'text'); + $table->addColumn('investigator', 'text'); + $table->addColumn('specialities', 'text'); + } + +} diff --git a/framework/application/views/helpers/Rightbar.php b/framework/application/views/helpers/Rightbar.php index ccf7a94..f5ee51c 100644 --- a/framework/application/views/helpers/Rightbar.php +++ b/framework/application/views/helpers/Rightbar.php @@ -16,12 +16,17 @@ class CCGM_View_Helper_Rightbar extends Zend_View_Helper_Abstract { $res = ''; return $res; } diff --git a/framework/application/views/scripts/templates/research.phtml b/framework/application/views/scripts/templates/research.phtml new file mode 100644 index 0000000..c161a14 --- /dev/null +++ b/framework/application/views/scripts/templates/research.phtml @@ -0,0 +1,12 @@ +contentWidth = 662; +?> + +
+
+ markupDotclear($this->text); + ?> +
+ rightbar() ?> +
\ No newline at end of file -- 2.39.5