From: vincent@cubedesigners.com Date: Fri, 11 Oct 2013 13:12:35 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=48377dbc2b410be6824684481af5a39fc4fb5a81;p=ccgm.git --- 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 728739a..0000000 Binary files a/pathologies.png and /dev/null differ