From 2efc76a6d8cdc6e4520a061b677071539889bad0 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Fri, 6 Dec 2013 09:33:25 +0000 Subject: [PATCH] --- framework/application/Bootstrap.php | 2 + framework/application/configs/application.ini | 2 + .../controllers/AjaxController.php | 1 - framework/application/forms/CMS/Intranet.php | 18 +++++++++ framework/application/forms/CMS/Listing.php | 5 +-- framework/application/forms/CMS/Reunion.php | 13 +++++-- .../forms/CMS/Sub/Intranet/Item.php | 28 ++++++++++++++ .../forms/CMS/Sub/Intranet/Items.php | 16 ++++++++ .../forms/CMS/Sub/Listing/Essai.php | 2 +- .../forms/CMS/Sub/Reunions/Reunion.php | 28 ++++++++++++++ .../forms/CMS/Sub/Reunions/Reunions.php | 16 ++++++++ .../application/views/helpers/Reunions.php | 17 +++++++++ .../views/scripts/templates/intranet.phtml | 2 + .../scripts/templates/intranetident.phtml | 8 ++++ .../views/scripts/templates/reunion.phtml | 19 ++++++---- less/reunions.less | 38 +++++++++++++++++++ 16 files changed, 198 insertions(+), 17 deletions(-) create mode 100644 framework/application/forms/CMS/Intranet.php create mode 100644 framework/application/forms/CMS/Sub/Intranet/Item.php create mode 100644 framework/application/forms/CMS/Sub/Intranet/Items.php create mode 100644 framework/application/forms/CMS/Sub/Reunions/Reunion.php create mode 100644 framework/application/forms/CMS/Sub/Reunions/Reunions.php create mode 100644 framework/application/views/helpers/Reunions.php create mode 100644 framework/application/views/scripts/templates/intranet.phtml create mode 100644 framework/application/views/scripts/templates/intranetident.phtml create mode 100644 less/reunions.less diff --git a/framework/application/Bootstrap.php b/framework/application/Bootstrap.php index 104a21c..c8d254e 100644 --- a/framework/application/Bootstrap.php +++ b/framework/application/Bootstrap.php @@ -66,6 +66,8 @@ class Bootstrap extends CubeIT_Bootstrap { $templates['Infos pratiques'] = array('plan' => 'Plan du centre', 'acces' => 'Plan d\'accès', 'rendezvous' => 'Demande de rendez-vous'); + $templates['Intranet'] = array('intranetident' => 'Identification', + 'intranet' => 'Comptes rendus, actualités'); $templates['Redirections'] = array( 'externalredirection' => 'Redirection externe', 'nextredirection' => 'Redirection vers la première sous-rubrique', diff --git a/framework/application/configs/application.ini b/framework/application/configs/application.ini index 1ab3392..4078165 100644 --- a/framework/application/configs/application.ini +++ b/framework/application/configs/application.ini @@ -17,6 +17,7 @@ appnamespace = "CCGM" timezone = 'Europe/Paris' session.lifetime = 31536000 ;1 year +session.domain=.ccgm.fr session.adapter = cache webhost = www.ccgm.fr @@ -49,6 +50,7 @@ mailjet.password = b4d51c4c1d0193f9b0963c2c374dd882 locales.fr = [production : base] +dev = true variant = 0 [medecins : base] diff --git a/framework/application/controllers/AjaxController.php b/framework/application/controllers/AjaxController.php index 5104783..583f693 100644 --- a/framework/application/controllers/AjaxController.php +++ b/framework/application/controllers/AjaxController.php @@ -12,7 +12,6 @@ class AjaxController extends CubeIT_Controller_AjaxController { $this->_datas->addShow("#messageerreur"); $this->_datas->addScrollTo("#c", 0.35); } else { - $mail = new CubeIT_Mail(); $mail->setFrom('rdv@ccgm.fr'); $mail->addTo($data['destinataire']); diff --git a/framework/application/forms/CMS/Intranet.php b/framework/application/forms/CMS/Intranet.php new file mode 100644 index 0000000..4254c47 --- /dev/null +++ b/framework/application/forms/CMS/Intranet.php @@ -0,0 +1,18 @@ +removeSubForm('sidebar'); + $this->getElement('text')->setAttrib('rows', 6); + + $items = new CCGM_Form_CMS_Sub_Intranet_Items(); + $items->setLegend('Actualités / Compte-rendus'); + $this->addSubForm($items, 'items'); + } + +} + +?> diff --git a/framework/application/forms/CMS/Listing.php b/framework/application/forms/CMS/Listing.php index a057e65..80d2627 100644 --- a/framework/application/forms/CMS/Listing.php +++ b/framework/application/forms/CMS/Listing.php @@ -1,17 +1,14 @@ removeSubForm('sidebar'); - $this->getElement('text')->setAttrib('rows', 6); $essais = new CCGM_Form_CMS_Sub_Listing_Listes(); $essais->setLegend('Essais'); $this->addSubForm($essais, 'listes'); } - -} +} \ No newline at end of file diff --git a/framework/application/forms/CMS/Reunion.php b/framework/application/forms/CMS/Reunion.php index ea37aea..968dcab 100644 --- a/framework/application/forms/CMS/Reunion.php +++ b/framework/application/forms/CMS/Reunion.php @@ -1,7 +1,14 @@ removeSubForm('sidebar'); + + $reunions = new CCGM_Form_CMS_Sub_Reunions_Reunions(); + $reunions->setLegend('Réunions'); + $this->addSubForm($reunions, 'reunions'); } -} \ No newline at end of file + +} diff --git a/framework/application/forms/CMS/Sub/Intranet/Item.php b/framework/application/forms/CMS/Sub/Intranet/Item.php new file mode 100644 index 0000000..b03f1de --- /dev/null +++ b/framework/application/forms/CMS/Sub/Intranet/Item.php @@ -0,0 +1,28 @@ +setLabel('Titre'); + $this->addElement($titre); + + $date = new CubeIT_Form_Element_Date('date'); + $date->setLabel('Date'); + $date->setPrecision(Zend_Date::DAY); + $this->addElement($date); + + $text = new Zend_Form_Element_Textarea('text'); + $text->setLabel('Texte'); + $this->addElement($text); + + $lien = new CubeIT_Form_Element_Link(); + $lien->setLabel('Lien'); + $lien->pageEnabled(false); + $lien->fileEnabled(); + $this->addSubForm($lien, 'lien'); + } + +} diff --git a/framework/application/forms/CMS/Sub/Intranet/Items.php b/framework/application/forms/CMS/Sub/Intranet/Items.php new file mode 100644 index 0000000..27ce992 --- /dev/null +++ b/framework/application/forms/CMS/Sub/Intranet/Items.php @@ -0,0 +1,16 @@ +setBaseSubForm($base) + ->setBaseLegend('Edition de l\'élément « $titre »') + ->setNewLegend('Nouvel élément'); + } + +} + +?> diff --git a/framework/application/forms/CMS/Sub/Listing/Essai.php b/framework/application/forms/CMS/Sub/Listing/Essai.php index 8cdfe25..61c1a79 100644 --- a/framework/application/forms/CMS/Sub/Listing/Essai.php +++ b/framework/application/forms/CMS/Sub/Listing/Essai.php @@ -20,7 +20,7 @@ class CCGM_Form_CMS_Sub_Listing_Essai extends CubeIT_Form_SubForm { $this->addElement($localisation); $phase = new Zend_Form_Element_Select('phase'); - $phase->setMultiOptions(array('I'=>'I','II'=>'II','III'=>'III','IV'=>'IV')); + $phase->setMultiOptions(array('' => '', 'I' => 'I', 'II' => 'II', 'III' => 'III', 'IV' => 'IV')); $phase->setLabel('Phase'); $this->addElement($phase); diff --git a/framework/application/forms/CMS/Sub/Reunions/Reunion.php b/framework/application/forms/CMS/Sub/Reunions/Reunion.php new file mode 100644 index 0000000..7a168bf --- /dev/null +++ b/framework/application/forms/CMS/Sub/Reunions/Reunion.php @@ -0,0 +1,28 @@ +setLabel('Staffs concernés'); + $this->addElement($staff); + + $frequence = new Zend_Form_Element_Text('frequence'); + $frequence->setLabel('Fréquence'); + $this->addElement($frequence); + + $lieu = new Zend_Form_Element_Text('lieu'); + $lieu->setLabel('Lieu'); + $this->addElement($lieu); + + $medecins = new Zend_Form_Element_Textarea('medecins'); + $medecins->setLabel('Médecins participants'); + $medecins->setAttrib('rows', 4); + $this->addElement($medecins); + } + +} + +?> diff --git a/framework/application/forms/CMS/Sub/Reunions/Reunions.php b/framework/application/forms/CMS/Sub/Reunions/Reunions.php new file mode 100644 index 0000000..481c677 --- /dev/null +++ b/framework/application/forms/CMS/Sub/Reunions/Reunions.php @@ -0,0 +1,16 @@ +setBaseSubForm($base) + ->setBaseLegend('Editer la réunion $staff / $frequence') + ->setNewLegend('Nouvelle réunion'); + } + +} + +?> diff --git a/framework/application/views/helpers/Reunions.php b/framework/application/views/helpers/Reunions.php new file mode 100644 index 0000000..2b850f5 --- /dev/null +++ b/framework/application/views/helpers/Reunions.php @@ -0,0 +1,17 @@ + 'staff'), array('class' => 'frequence'), array('class' => 'lieu'), array('class' => 'medecins')); + $head = array(array('Staffs', 'Fréquence', 'Lieu', 'Médecins participants')); + $datas = array(); + foreach ($reunions as $r) { + $datas[] = array($r['staff'], $r['frequence'], $r['lieu'], nl2br(trim($r['medecins']))); + } + return $this->view->table($head, $datas, array(), array(), $classes); + } + +} + +?> diff --git a/framework/application/views/scripts/templates/intranet.phtml b/framework/application/views/scripts/templates/intranet.phtml new file mode 100644 index 0000000..ab4fa67 --- /dev/null +++ b/framework/application/views/scripts/templates/intranet.phtml @@ -0,0 +1,2 @@ +headScript()->addScriptAndStyle('reunions') ?> +
+
+ markupDotclear($this->text); + $t = str_replace('%reunions%', $this->reunions($this->reunions), $t); + echo $t; + ?> +
+ rightbar() ?> +
\ No newline at end of file diff --git a/less/reunions.less b/less/reunions.less new file mode 100644 index 0000000..addff43 --- /dev/null +++ b/less/reunions.less @@ -0,0 +1,38 @@ +#content h2{ + font-size: 20px !important; +} + +table{ + margin:30px 0 20px; + border-collapse:collapse; + table-layout: fixed; + + td,th{ + text-align: center; + border:1px solid #c7c7c7; + vertical-align: middle; + width:193px; + } + + td{ + padding:10px; + background-color:#f0eff0; + &.staff{ + font-weight: 500; + text-transform: uppercase; + } + } + + tr.odd td{ + background-color:#fff; + } + + th{ + padding:20px; + color:#e71a92; + font-size:24px; + line-height: 29px; + text-transform: uppercase; + font-weight: 300; + } +} \ No newline at end of file -- 2.39.5