From d9b7b0e535aa8b37b415980f7c1721d9c3ae4551 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Wed, 14 Aug 2013 13:41:06 +0000 Subject: [PATCH] --- css/carrousel.css | 81 ++++++++++++ css/common.css | 96 ++++---------- css/home.css | 77 +----------- framework/application/Bootstrap.php | 44 ++++++- framework/application/forms/CMS/Home.php | 8 ++ .../application/forms/CMS/Sub/Home/Bloc.php | 30 +++++ .../application/forms/CMS/Sub/Home/Blocs.php | 17 +++ .../forms/CMS/Sub/Home/Carrousel.php | 18 +++ framework/application/forms/CMS/Text.php | 7 ++ .../application/views/helpers/Carrousel.php | 54 ++++++++ .../application/views/helpers/Leftbar.php | 31 +++++ .../views/scripts/templates/home.phtml | 70 +++-------- .../views/scripts/templates/text.phtml | 118 +++++------------- js/carrousel.js | 95 ++++++++++++++ 14 files changed, 461 insertions(+), 285 deletions(-) create mode 100644 css/carrousel.css create mode 100644 framework/application/forms/CMS/Sub/Home/Bloc.php create mode 100644 framework/application/forms/CMS/Sub/Home/Blocs.php create mode 100644 framework/application/forms/CMS/Sub/Home/Carrousel.php create mode 100644 framework/application/forms/CMS/Text.php create mode 100644 framework/application/views/helpers/Carrousel.php create mode 100644 framework/application/views/helpers/Leftbar.php create mode 100644 js/carrousel.js diff --git a/css/carrousel.css b/css/carrousel.css new file mode 100644 index 0000000..80ba39e --- /dev/null +++ b/css/carrousel.css @@ -0,0 +1,81 @@ +.visual .v1{ margin:0 -409px;} + +.slideshow { + margin:0 0 21px; + height: 425px; + position: relative; + padding:0 0 0 36px; + z-index: 0; +} +.slideshow img{display:block;} +.slideshow .mask { + overflow: hidden; +} +.slideshow .slideset { + width: 9999px; +} +.slideshow .slide { + display:none; + position:absolute; +} +.slideshow .pagination { + position: absolute; + bottom: 82px; + left: 0; + width:100%; + text-align:center; + z-index: 4; +} +.slideshow .pagination ul { + list-style:none; + display:inline-block; + vertical-align:top; + padding: 0 8px 0 0; + margin:5px 0 0; +} +.slideshow .pagination li { + float: left; + margin: 0 0 0 9px; +} +.slideshow .pagination li a { + background:url(../images/elements.png) no-repeat -15px 0; + width: 15px; + height: 16px; + overflow: hidden; + text-indent: -9999px; + display: block; + border-radius:12px; +} +.slideshow .pagination a.active, +.slideshow .pagination a:hover {background-position:0 0;} + + +.slideshow .caption{ + background-color:rgba(255,255,255,0.5); + position:absolute; + right:402px; + top:47px; + width:233px; + height:233px; + font-size:30px; + line-height:35px; + color:#fff; + font-weight:300; + text-align:center; + border-radius:253px; + padding:10px; + z-index: 4; +} + +.slideshow .caption .holder{ + background-image: linear-gradient(to bottom, #51cdf8 0%,#46c6f2 31%,#2db6e6 81%,#28b3e3 100%); + border-radius:233px; + width:233px; + height:194px; + padding: 39px 0 0; + overflow:hidden; +} +.slideshow .caption em{ + font-style:italic; + font-size:21px; +} \ No newline at end of file diff --git a/css/common.css b/css/common.css index 0717561..368e432 100644 --- a/css/common.css +++ b/css/common.css @@ -25,9 +25,16 @@ q:after{content:"";} margin:0 auto; position:relative; } -.visual .v1{ margin:0 -150px;} .visual.add .v1 { margin:0 -209px;} + +#main{ + margin:0 auto; + width:981px; + position: relative; + z-index: 5; +} + #wrapper{overflow:hidden;} #header{ padding:12px 0 21px; @@ -194,33 +201,32 @@ q:after{content:"";} margin:0 0 2px; } .breadcrumbs{ - margin:0 0 6px -3px; + width: 982px; + margin:0 auto; overflow:hidden; -} -.breadcrumbs ul{ - margin:0; - padding:0; - list-style:none; font-size:13px; + padding:0 0 8px 0; } -.breadcrumbs li:first-child{ - padding: 0 3px 0 0; - background:none; +.breadcrumbs a{ + display: inline-block; + color:#0ea6db; } -.breadcrumbs li{ - background:url(../images/separator.png) no-repeat 0 8px; - float:left; - padding: 0 0 0 9px; + +#content, +.contents{ + padding:0 0 30px 0; } -.breadcrumbs a{color:#0ea6db;} .twocolumns{ margin: 0 0 231px -3px; overflow:hidden; } -#content{ +.twocolumns #content, +.twocolumns .contents{ width:765px; float:right; } + + #content h1{ margin: 0 0 10px; color:#e30186; @@ -297,63 +303,7 @@ q:after{content:"";} background:url(../images/bullet.svg) no-repeat 2px 8px; padding: 0 0 3px 9px; } -#sidebar{ - width:179px; - float:left; - margin:6px 0 0; -} -.sidenav{ - border-radius:3px; - padding: 7px 0 8px; - background:#0ea6db; -} -.sidenav ul{ - margin:0; - padding:0; - list-style:none; -} -.sidenav span{font-size:13px;} -.sidenav a:hover{text-decoration:none;} -.sidenav>ul>li:hover{background:url(../images/arrow-nav-1.svg) no-repeat 9px 7px;} -.sidenav>ul>li>a{ - padding:7px 0 11px 39px; - color:#fff; - display:block; -} -.sidenav .subnav{ - overflow:hidden; - border:0; -} -.sidenav .subnav .holder:first-child{padding: 0 5px 20px 39px;} -.sidenav .holder{ - color:#035277; - font:13px; - background:#f3fafd; - padding: 0 5px 12px 39px; - width:137px; - margin:0 -1px -1px; - overflow:hidden; -} -.sidenav ul ul a{ - color: #035277; - display: block; - font-size: 13px; - line-height: 16px; -} -.sidenav ul ul li{ - margin: 0 0 1px; - padding: 8px 0 0; -} -.sidenav ul ul li:hover{ - background:url(../images/arrow-nav-2.svg) no-repeat 22px 12px; - padding:8px 0 0 39px; - margin:0 0 1px -39px -} -.sidenav .holder .heading{ - font-weight:500; - display:block; - padding: 5px 0 0; -} + #footer .timing.info-area{ float: left; margin: 12px 0 0 -17px; diff --git a/css/home.css b/css/home.css index 7968528..3528877 100644 --- a/css/home.css +++ b/css/home.css @@ -1,79 +1,4 @@ -.slideshow { - margin:0 0 21px; - position: relative; - padding:0 0 0 36px; -} -.slideshow img{display:block;} -.slideshow .mask { - overflow: hidden; -} -.slideshow .slideset { - width: 9999px; - float: left; -} -.slideshow .slide { - float: left; -} -.slideshow .pagination { - position: absolute; - bottom: 100px; - left: 0; - width:100%; - text-align:center; -} -.slideshow .pagination ul { - list-style:none; - display:inline-block; - vertical-align:top; - padding: 0 8px 0 0; - margin:5px 0 0; -} -.slideshow .pagination li { - float: left; - margin: 0 0 0 9px; -} -.slideshow .pagination li a { - background:url(../images/elements.png) no-repeat -15px 0; - width: 15px; - height: 16px; - overflow: hidden; - text-indent: -9999px; - display: block; - border-radius:12px; -} -.slideshow .pagination .active a, -.slideshow .pagination a:hover {background-position:0 0;} -.slideshow .caption{ - background-color:rgba(255,255,255,0.5); - position:absolute; - right:143px; - top:47px; - width:233px; - height:233px; - font-size:30px; - line-height:35px; - color:#fff; - font-weight:300; - text-align:center; - border-radius:253px; - padding:10px; -} -.slideshow .caption .holder{ - background-image: linear-gradient(to bottom, #51cdf8 0%,#46c6f2 31%,#2db6e6 81%,#28b3e3 100%); - border-radius:233px; - width:233px; - height:194px; - padding: 39px 0 0; - overflow:hidden; -} -.slideshow .caption span{ - font-style:italic; - font-size:21px; -} -#main{ - margin:0 auto; - width:981px; -} + .services{ overflow:hidden; margin:0 0 65px; diff --git a/framework/application/Bootstrap.php b/framework/application/Bootstrap.php index 3475aaa..817dd62 100644 --- a/framework/application/Bootstrap.php +++ b/framework/application/Bootstrap.php @@ -46,12 +46,54 @@ class Bootstrap extends CubeIT_Bootstrap { * @return array */ public function getCMSTemplates() { - $templates = parent::getCMSTemplates(); + $templates = array(); + $templates['Génériques'] = array('text' => 'Page de texte'); + $templates['Accueil'] = array('home' => 'Page d\'accueil'); + $templates['Redirections'] = array( + 'externalredirection' => 'Redirection externe', + 'nextredirection' => 'Redirection vers la première sous-rubrique', + 'pageredirection' => 'Redirection interne', + 'subredirection' => 'Redirection vers une sous-rubrique'); + return $templates; return $templates; } + protected function _makeURL($r, $seoUrl, $locale, $title, $parent, $isAdmin) { + if ($locale) { + $navLocales = $this->getNavigationLocales($isAdmin); + if ($r->label == 'home') { + if ($locale == $navLocales[0]) { + $url = ''; + } else { + $url = '/' . $locale; + } + } else { + $base = '/' . $locale; + if ($seoUrl) { + $url = $base . '/' . $this->_escapeSeoUrl($seoUrl); + } else { + $url = $base . '/' . CubeIT_Text::str2URL($title); + } + } + } else { + if ($r->label == 'home') { + $url = '/'; + } elseif ($seoUrl) { + $url = '/' . $this->_escapeSeoUrl($seoUrl); + } else { + if ($parent->getLevel() > 1) { + $url = $parent->getHref() . '/' . CubeIT_Text::str2URL($title); + } else { + $url = '/' . CubeIT_Text::str2URL($title); + } + } + } + + return $url; + } + public function run() { // run have to be the last call of bootstrap parent::run(); diff --git a/framework/application/forms/CMS/Home.php b/framework/application/forms/CMS/Home.php index 3328092..bcec11e 100644 --- a/framework/application/forms/CMS/Home.php +++ b/framework/application/forms/CMS/Home.php @@ -5,9 +5,17 @@ class CCGM_Form_CMS_Home extends CCGM_Form_CMS { public function init() { parent::init(); + $carrousel = new CCGM_Form_CMS_Sub_Home_Carrousel(); + $carrousel->setLegend('Carrousel'); + $this->addSubForm($carrousel, 'carrousel'); + $actualites = new CCGM_Form_CMS_Sub_Home_Actualites(); $actualites->setLegend('Actualités'); $this->addSubForm($actualites, 'actualites'); + + $blocs=new CCGM_Form_CMS_Sub_Home_Blocs(); + $blocs->setLegend('Blocs de présentation'); + $this->addSubForm($blocs, 'blocs'); } } diff --git a/framework/application/forms/CMS/Sub/Home/Bloc.php b/framework/application/forms/CMS/Sub/Home/Bloc.php new file mode 100644 index 0000000..8307ef6 --- /dev/null +++ b/framework/application/forms/CMS/Sub/Home/Bloc.php @@ -0,0 +1,30 @@ +setLabel('Titre'); + $this->addElement($titre); + + $texte = new Zend_Form_Element_Textarea('texte'); + $texte->setLabel('Texte'); + $texte->setAttrib('rows', 2); + $this->addElement($texte); + + $lien = new CubeIT_Form_Element_Link(); + $lien->urlEnabled(false); + $lien->setLabel('Lien'); + $this->addSubForm($lien, 'lien'); + + $icone = new Zend_Form_Element_Select('icone'); + $icone->setLabel('Icône'); + $icone->setMultiOptions(array('centre'=>'Centre', 'parcours' => 'Parcours', 'pathologies' => 'Pathologies', 'recherche' => 'Recherche', 'pratique' => 'Infos Pratiques')); + $this->addElement($icone); + } + +} + +?> diff --git a/framework/application/forms/CMS/Sub/Home/Blocs.php b/framework/application/forms/CMS/Sub/Home/Blocs.php new file mode 100644 index 0000000..37d9968 --- /dev/null +++ b/framework/application/forms/CMS/Sub/Home/Blocs.php @@ -0,0 +1,17 @@ +setLabel('Bloc n°' . $i); + $this->addSubForm($b, 'b_' . $i); + } + } + +} + +?> diff --git a/framework/application/forms/CMS/Sub/Home/Carrousel.php b/framework/application/forms/CMS/Sub/Home/Carrousel.php new file mode 100644 index 0000000..9a0ce7d --- /dev/null +++ b/framework/application/forms/CMS/Sub/Home/Carrousel.php @@ -0,0 +1,18 @@ +setAttrib('rows', 4); + $titre->setLabel('Bulle'); + $this->addElement($titre); + + $images = new CubeIT_Form_Element_File_Image('images'); + $images->setLabel('Images'); + $this->addElement($images); + } + +} \ No newline at end of file diff --git a/framework/application/forms/CMS/Text.php b/framework/application/forms/CMS/Text.php new file mode 100644 index 0000000..f7cd8d6 --- /dev/null +++ b/framework/application/forms/CMS/Text.php @@ -0,0 +1,7 @@ + diff --git a/framework/application/views/helpers/Carrousel.php b/framework/application/views/helpers/Carrousel.php new file mode 100644 index 0000000..cc50dfc --- /dev/null +++ b/framework/application/views/helpers/Carrousel.php @@ -0,0 +1,54 @@ +view->headScript()->addScriptAndStyle('carrousel'); + $res = '
'; + $res.='
'; + $res.='
'; + $res.='
'; + $res.='
'; + $c = 0; + foreach ($datas['images'] as $image) { + $res.=$this->_slide($image); + $c++; + } + $res.='
'; + $res.='
'; + $res.=$this->_nav($c); + $res.=$this->_caption($datas['titre']); + $res.='
'; + $res.='
'; + $res.='
'; + return $res; + } + + protected function _slide($image) { + return '
' . $this->view->imageCms($image, '', -1, -1) . '
'; + } + + protected function _nav($count) { + $res = ''; + return $res; + } + + protected function _caption($title) { + $res = '
'; + $res.= $this->view->markupDotclear($title, array(), array('class' => 'holder')); + $res.='
'; + return $res; + } + +} +?> diff --git a/framework/application/views/helpers/Leftbar.php b/framework/application/views/helpers/Leftbar.php new file mode 100644 index 0000000..db98faf --- /dev/null +++ b/framework/application/views/helpers/Leftbar.php @@ -0,0 +1,31 @@ +view->showsidebar) { + return; + } + + $n = $this->view->navigation()->menu()->setExpandSiblingNodesOfActiveBranch()->renderMenu($this->view->currentRubrique, array('maxDepth' => 2)); + if ($n == '') { + $this->view->showsidebar = false; + return; + } + + + $n = preg_replace('#\(.*)\((.*)\)(.*)\<\/a\>#i', '$2($3)$4', $n); + + $this->view->headScript()->addScriptAndStyle('sidebar'); + + $res = '
'; + return $res; + } + +} + +?> diff --git a/framework/application/views/scripts/templates/home.phtml b/framework/application/views/scripts/templates/home.phtml index 0317d15..08b01de 100644 --- a/framework/application/views/scripts/templates/home.phtml +++ b/framework/application/views/scripts/templates/home.phtml @@ -1,59 +1,29 @@ showbreadcrubms = $this->showsidebar = $this->showtopimage = false; $this->headScript()->addScriptAndStyle('home'); + +echo $this->carrousel($this->carrousel); ?> -
-
-
-
-
-
image description
-
image description
-
image description
-
image description
-
-
- -
Service de Radiothérapie Curiethérapie Oncologie
-
-
-
+
-
- Le centre -
-

Le centre

-

Consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore

- En savoir + -
-
-
- Parcours patien -
-

Parcours patient

-

Consectetur adipisicing elit, sed do eiusmod tempor incididunt ut

- En savoir + -
-
-
- Parcours patient -
-

Pathologies

-

Consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore

- En savoir + -
-
+ blocs['b_' . $i]; + echo '
'; + echo $this->image('/images/' . $b['icone'] . '.svg', $b['titre'], 73, 73, array('class' => 'icon')); + echo '
'; + echo '

' . $b['titre'] . '

'; + echo '

' . $b['texte'] . '

'; + if ($b['lien']['label']) { + echo $this->linkInternal($b['lien']['label'], $b['lien']['page'], array('class' => 'more')); + } + echo '
'; + echo '
'; + } + ?>
actualites($this->actualites); -?> \ No newline at end of file +echo $this->actualites($this->actualites); \ No newline at end of file diff --git a/framework/application/views/scripts/templates/text.phtml b/framework/application/views/scripts/templates/text.phtml index 1d13ec1..2bb61e1 100644 --- a/framework/application/views/scripts/templates/text.phtml +++ b/framework/application/views/scripts/templates/text.phtml @@ -1,89 +1,37 @@ -
-
-
image description
+
+

Pathologies

+
+ Le digestif + Le rectum + Le scanner dosimétrique
-
-
- -
-
-

Pathologies

-
- Le digestif - Le rectum - Le scanner dosimétrique -
-

Cet examen n’est pas réalisé dans un but de diagnostic : aucune interprétation ne sera réalisée.

-
- Ce scanner a pour but : -
    -
  • De définir votre positionnement pendant tout votre traitement (contention)
  • -
  • De pouvoir reconstruire virtuellement votre corps en 3D afin de délimiter plus précisément les zones à traiter et celles à protéger.
  • -
-
-
- Déroulement de l’examen : -
    -
  • Des marques au feutre sont faites sur la peau
  • -
  • Des repères métalliques sont posés sur les marques
  • -
  • Le scanner est réalisé
  • -
  • Les marques peuvent être déplacées si nécessaire
  • -
  • Lorsque le positionnement est validé, des points de tatouages très discrets sont réalisés.
  • -
  • Les images de ce scanner sont récupérées par le service de Physique médicale afin de réaliser la Dosimétrie
  • -
-
-

A la fin de cet examen, vous rencontrerez un manipulateur de radiothérapie qui fixera avec vous votre
début de traitement et vous expliquera les modalités de la radiothérapie.

-

Des conseils vous seront donnés pour minimiser les effets secondaires : mesure d’hygiène, habillement, vie quotidienne…

-
- Conseils -
    -
  • Se laver avec un savon doux (Marseille, Alep)
  • -
  • Privilégier les vêtements en coton au contact direct de la peau
  • -
  • Suivre les conseils alimentaires
  • -
-
-
-
-
\ No newline at end of file +
+ Déroulement de l’examen : +
    +
  • Des marques au feutre sont faites sur la peau
  • +
  • Des repères métalliques sont posés sur les marques
  • +
  • Le scanner est réalisé
  • +
  • Les marques peuvent être déplacées si nécessaire
  • +
  • Lorsque le positionnement est validé, des points de tatouages très discrets sont réalisés.
  • +
  • Les images de ce scanner sont récupérées par le service de Physique médicale afin de réaliser la Dosimétrie
  • +
+
+

A la fin de cet examen, vous rencontrerez un manipulateur de radiothérapie qui fixera avec vous votre
début de traitement et vous expliquera les modalités de la radiothérapie.

+

Des conseils vous seront donnés pour minimiser les effets secondaires : mesure d’hygiène, habillement, vie quotidienne…

+
+ Conseils +
    +
  • Se laver avec un savon doux (Marseille, Alep)
  • +
  • Privilégier les vêtements en coton au contact direct de la peau
  • +
  • Suivre les conseils alimentaires
  • +
+
+
\ No newline at end of file diff --git a/js/carrousel.js b/js/carrousel.js new file mode 100644 index 0000000..c28239f --- /dev/null +++ b/js/carrousel.js @@ -0,0 +1,95 @@ +(function($) { + function JQcarrousel(element) { + this.element = element; + this.number = this.element.find('.slide').length; + this.currentIndex = -1; + this.duration = 0.5; + this.stay = 5; + this.animating = false; + this.timeout; + this.init(); + + } + + JQcarrousel.prototype = { + init: function() { + var $this = this; + this.element.find('.pagination a').click(function() { + $this.gotoIndex($(this).data('n')); + return false; + }); + + this.gotoIndex(0); + }, + goNext: function() { + this.gotoIndex(this.currentIndex + 1); + }, + goPrev: function() { + this.gotoIndex(this.currentIndex - 1); + }, + gotoIndex: function(index) { + if (this.animating) { + return; + } + var $this = this; + var dir = -1; + if (index > this.currentIndex) { + dir = 1; + } + index = (index + this.number) % this.number; + if (index == this.currentIndex) { + return; + } + + this.resetTimer(); + this.animating = true; + + this.activatePuce(index); + var nextSlide = this.getSlide(index); + + if (this.currentIndex == -1) { + $(nextSlide).fadeIn(this.duration * 1000, function() { + $this.endTransition(index); + }); + return; + } + var currentSlide = this.getSlide(this.currentIndex); + $(nextSlide).css('z-index', 2).fadeIn(this.duration * 1000, function() { + $this.endTransition(index); + }); + $(currentSlide).css('z-index', 1).fadeOut(this.duration * 1000); + }, + activatePuce: function(index) { + this.element.find('.pagination a').removeClass('active'); + this.element.find('.pagination a[data-n="' + index + '"]').addClass('active'); + }, + endTransition: function(index) { + this.currentIndex = index; + this.animating = false; + this.resetTimer(); + }, + getSlide: function(index) { + return this.element.find('.slide:eq(' + index + ')'); + }, + resetTimer: function() { + clearTimeout(this.timeout); + var $this = this; + this.timeout = setTimeout(function() { + $this.goNext(); + }, this.stay * 1000); + } + }; + + jQuery.fn.carrousel = function() { + return this.each(function() { + var $this = $(this); + $(this).data('carrousel', new JQcarrousel($this)); + }) + }; +})(jQuery); + +TO_LOAD_ONCE[TO_LOAD_ONCE.length] = 'load_carrousel();'; + +function load_carrousel() { + $(".slideshow").carrousel(); +} \ No newline at end of file -- 2.39.5