From 48377dbc2b410be6824684481af5a39fc4fb5a81 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Fri, 11 Oct 2013 13:12:35 +0000 Subject: [PATCH] --- framework/application/Bootstrap.php | 2 +- framework/application/configs/application.ini | 3 +- framework/application/forms/CMS/Equipes.php | 13 ++++ .../forms/CMS/Sub/Equipes/Equipe.php | 21 ++++++ .../forms/CMS/Sub/Equipes/Equipes.php | 15 ++++ .../forms/CMS/Sub/Equipes/Personne.php | 22 ++++++ .../forms/CMS/Sub/Equipes/Personnes.php | 11 +++ .../application/views/helpers/Equipes.php | 68 +++++++++++++++++ .../views/scripts/templates/equipe.phtml | 2 - .../views/scripts/templates/equipes.phtml | 12 +++ js/equipes.js | 9 +++ less/common.less | 7 +- less/equipes.less | 69 ++++++++++++++++++ pathologies.png | Bin 3084 -> 0 bytes 14 files changed, 248 insertions(+), 6 deletions(-) create mode 100644 framework/application/forms/CMS/Equipes.php create mode 100644 framework/application/forms/CMS/Sub/Equipes/Equipe.php create mode 100644 framework/application/forms/CMS/Sub/Equipes/Equipes.php create mode 100644 framework/application/forms/CMS/Sub/Equipes/Personne.php create mode 100644 framework/application/forms/CMS/Sub/Equipes/Personnes.php create mode 100644 framework/application/views/helpers/Equipes.php delete mode 100644 framework/application/views/scripts/templates/equipe.phtml create mode 100644 framework/application/views/scripts/templates/equipes.phtml create mode 100644 js/equipes.js create mode 100644 less/equipes.less delete mode 100644 pathologies.png diff --git a/framework/application/Bootstrap.php b/framework/application/Bootstrap.php index 077dbb6..4c8923f 100644 --- a/framework/application/Bootstrap.php +++ b/framework/application/Bootstrap.php @@ -51,7 +51,7 @@ class Bootstrap extends CubeIT_Bootstrap { $templates = array(); $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('equipe' => 'L\'équipe'); + $templates['Le centre'] = array('equipes' => 'L\'équipe'); $templates['Parcours patient'] = array('parcours' => 'Parcours', 'soins' => 'Soins support'); $templates['Traitements'] = array('traitement' => 'Traitement (Texte avec accordéon)'); $templates['Infos pratiques'] = array('plan' => 'Plan du centre', diff --git a/framework/application/configs/application.ini b/framework/application/configs/application.ini index c183d5a..2be9e23 100644 --- a/framework/application/configs/application.ini +++ b/framework/application/configs/application.ini @@ -1,5 +1,5 @@ [production] -dev = true +dev = false minify.js = true minify.css = true @@ -46,7 +46,6 @@ acl.roles[] = admin mail.test = APPLICATION_PATH "/../data/email/test" [testing : production] - dev = true httpauth.username = ccgm diff --git a/framework/application/forms/CMS/Equipes.php b/framework/application/forms/CMS/Equipes.php new file mode 100644 index 0000000..7009ca3 --- /dev/null +++ b/framework/application/forms/CMS/Equipes.php @@ -0,0 +1,13 @@ +setLegend('Equipes'); + $this->addSubForm($equipes, 'equipes'); + } + +} \ No newline at end of file diff --git a/framework/application/forms/CMS/Sub/Equipes/Equipe.php b/framework/application/forms/CMS/Sub/Equipes/Equipe.php new file mode 100644 index 0000000..3c916b4 --- /dev/null +++ b/framework/application/forms/CMS/Sub/Equipes/Equipe.php @@ -0,0 +1,21 @@ +setLabel('Nom'); + $this->addElement($nom); + + $photo = new CubeIT_Form_Element_File_Image('photo'); + $photo->setLabel('Photo de groupe'); + $photo->setMaxItems(1); + $this->addElement($photo); + + $membres = new CCGM_Form_CMS_Sub_Equipes_Personnes(); + $membres->setLegend('Membres'); + $this->addSubForm($membres, 'membres'); + } + +} \ No newline at end of file diff --git a/framework/application/forms/CMS/Sub/Equipes/Equipes.php b/framework/application/forms/CMS/Sub/Equipes/Equipes.php new file mode 100644 index 0000000..5b80ec5 --- /dev/null +++ b/framework/application/forms/CMS/Sub/Equipes/Equipes.php @@ -0,0 +1,15 @@ +setBaseSubForm($base); + $this->setNewLegend('Nouvelle équipe'); + $this->setBaseLegend('Editer l\'équipe « $nom »'); + + } + +} \ No newline at end of file diff --git a/framework/application/forms/CMS/Sub/Equipes/Personne.php b/framework/application/forms/CMS/Sub/Equipes/Personne.php new file mode 100644 index 0000000..5db261f --- /dev/null +++ b/framework/application/forms/CMS/Sub/Equipes/Personne.php @@ -0,0 +1,22 @@ +setLabel('Nom'); + $this->addElement($nom); + + $role = new Zend_Form_Element_Text('role'); + $role->setLabel('Rôle'); + $this->addElement($role); + + $photo = new CubeIT_Form_Element_File_Image('photo'); + $photo->setLabel('Photo'); + $photo->setMaxItems(1); + $this->addElement($photo); + } + +} \ No newline at end of file diff --git a/framework/application/forms/CMS/Sub/Equipes/Personnes.php b/framework/application/forms/CMS/Sub/Equipes/Personnes.php new file mode 100644 index 0000000..3de3d84 --- /dev/null +++ b/framework/application/forms/CMS/Sub/Equipes/Personnes.php @@ -0,0 +1,11 @@ +setBaseSubForm(new CCGM_Form_CMS_Sub_Equipes_Personne()); + $this->setNewLegend('Nouveau membre'); + $this->setBaseLegend('Editer la fiche de « $nom »'); + } +} diff --git a/framework/application/views/helpers/Equipes.php b/framework/application/views/helpers/Equipes.php new file mode 100644 index 0000000..daa1e66 --- /dev/null +++ b/framework/application/views/helpers/Equipes.php @@ -0,0 +1,68 @@ +'; + $percol = ceil(count($equipes) / 2); + $res.='
'; + foreach ($equipes as $i => $e) { + $res.=$this->_equipe($e); + if ($i + 1 == $percol) { + $res.='
'; + } + } + $res.='
'; + $res.=''; + return $res; + } + + protected function _equipe($equipe) { + $res = '
'; + $res.='

' . $equipe['nom'] . '

'; + if ($equipe['photo']) { + $img = $this->view->imageProcess($equipe['photo'], $equipe['nom'], 306, 204); + } else { + $img = false; + } + if ($img) { + $res.=$img; + } + $res.='
'; + foreach ($equipe['membres'] as $m) { + $res.=$this->_membre($m, !$img); + } + $res .= '
'; + $res.='
'; + return $res; + } + + protected function _membre($membre, $photo = true) { + $res = '
'; + $img = false; + $big = false; + if ($photo) { + $img = $this->view->imageProcess($membre['photo'], $membre['nom'], 44, 44,array('class'=>'thumb')); + if ($img) { + $big = $this->view->imageProcess($membre['photo'], $membre['nom'], 104, 134); + } + } + if ($img) { + $res.=$img; + if ($big) { + $res.='
'.$big.'
'; + } + } + $res.='
'; + $res.='
' . $membre['nom'] . '
'; + if ($membre['role']) { + $res.='
' . $membre['role'] . '
'; + } + $res.='
'; + $res.='
'; + return $res; + } + +} + +?> diff --git a/framework/application/views/scripts/templates/equipe.phtml b/framework/application/views/scripts/templates/equipe.phtml deleted file mode 100644 index a4abe2d..0000000 --- a/framework/application/views/scripts/templates/equipe.phtml +++ /dev/null @@ -1,2 +0,0 @@ -headScript()->addScriptAndStyle('equipes'); +?> + +
+
+ markupDotclear($this->text); + echo $this->equipes($this->equipes); + ?> +
+
\ No newline at end of file diff --git a/js/equipes.js b/js/equipes.js new file mode 100644 index 0000000..a3ff045 --- /dev/null +++ b/js/equipes.js @@ -0,0 +1,9 @@ +TO_LOAD_ONCE[TO_LOAD_ONCE.length] = 'load_equipes();'; + +function load_equipes() { + $(".thumb").mouseenter(function() { + $(this).siblings(".big").show(); + }).mouseleave(function() { + $(this).siblings(".big").hide(); + }); +} \ No newline at end of file diff --git a/less/common.less b/less/common.less index f75a498..e679eae 100644 --- a/less/common.less +++ b/less/common.less @@ -20,6 +20,10 @@ q{quotes: none;} q:before, q:after{content:"";} +.dotclear a{ + color:#0EA6DB; +} + .body{ max-width: 100%; overflow-x: hidden; @@ -152,6 +156,7 @@ q:after{content:"";} overflow:hidden; background-color:#f1eeee; color:#5e5e5e; + clear: both; } #footer .footer-content{background-color:#e3dcdc;} #footer .holder{ @@ -236,7 +241,7 @@ q:after{content:"";} } .twocolumns{ margin: 0 0 0 -3px; - overflow:hidden; + overflow:visible; } .twocolumns #content, .twocolumns .contents{ diff --git a/less/equipes.less b/less/equipes.less new file mode 100644 index 0000000..5a6ef97 --- /dev/null +++ b/less/equipes.less @@ -0,0 +1,69 @@ +#equipes{ + .col{ + width: 334px; + display:inline-block; + &:first-child{ + margin:0 100px 0 0; + } + } + .equipe{ + h3{ + text-transform: none; + font-size: 16px; + font-weight: 500; + margin:20px 0; + } + img{ + border:1px solid #c7c5c5; + border-radius: 5px; + display: block; + } + >img{ + margin: 30px 0; + } + + .membre{ + margin: 15px 0; + position:relative; + .thumb{ + display:inline-block; + width: 44px; + margin:0 16px 0 0; + background-color: #e7e7e7; + } + .big{ + display:none; + position: absolute; + top:-54px; + left:52px; + z-index: 2; + background-color:#fff; + padding:6px; + box-shadow: 0 0 5px 2px rgba(0,0,0,0.3); + border-radius:7px; + img{ + border:0; + } + &:after{ + content:""; + width: 0; + height: 0; + position:absolute; + left:-10px; + top:62px; + border-top: 10px solid transparent; + border-bottom: 10px solid transparent; + border-right:10px solid #fff; + } + } + .infos{ + display:inline-block; + .role{ + font-weight: 300; + font-style: italic; + font-size: 13px; + } + } + } + } +} \ No newline at end of file diff --git a/pathologies.png b/pathologies.png deleted file mode 100644 index 728739afe6c097820d0c28bd5a2458294f32308d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3084 zcmV+n4D<7eP){k2}T%okI5xlUvzipTsf6!PhcR)B;`o*_opq;!&jjo&!7?(G8yW~ zUd*+#LjYZcAWO@h34SCyaHPE*PV_}&UAsn;$O42{R1kk!h`(LFOy^M#M4vfBY(yT6 zO>VC9?(&N0mS2ArT5ldAl;DOaxA6(1Jv?+O<{*N?!bk?0g{1IsS^_7eOqgIY19+hh zD=uHAAv7D&sj19<`UFx_Qk+N?Swku-O>GyGIi#k-ec84#lO`dAtR&|*ZNg@fM)DUe z!lTGR6~mZX@j*F_nQ-Sgatt|m;fpV5Ggpq*En8d;RgpF1=bw!&-e?ZFn(j_NP&ztl zQ;3cYjE~1Z$y_oyEDSEFKr9jL&Kx#1kmKK!k{{p!eM$=RAbDH&UR<2x+;Ydb=dNBg zv^awsruGZ@w+XL>g<%iYV$6;mbT_U+Vr^{_w0XwK$TDXtVL?kO$x{j}?j9HVB zVX*n{c7noSALZ-R+}yfGb;i2p!w+!?8OT_k?(o(m+lkGZi_%Qt+Sxa`#oGG+{1mhg+vHZjdvk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