]> _ Git - ccgm.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 4 Oct 2013 08:28:00 +0000 (08:28 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 4 Oct 2013 08:28:00 +0000 (08:28 +0000)
.ovhconfig
framework/application/forms/CMS/Parcours.php [new file with mode: 0644]
framework/application/forms/CMS/Sub/Parcours/Etape.php [new file with mode: 0644]
framework/application/forms/CMS/Sub/Parcours/Etapes.php [new file with mode: 0644]
framework/application/views/helpers/Etapes.php [new file with mode: 0644]
framework/application/views/scripts/templates/parcours.phtml
images/etapes.png [new file with mode: 0644]
less/parcours.less [new file with mode: 0644]

index cbd0e2f8c0f106c6e9e23075a29c06c877027299..fb174a6f526b41610ff224aee3a52b0e36fb4d7d 100644 (file)
@@ -1,2 +1,3 @@
 app.engine=php\r
-app.engine.version=5.5
\ No newline at end of file
+app.engine.version=5.5\r
+environement = development
\ No newline at end of file
diff --git a/framework/application/forms/CMS/Parcours.php b/framework/application/forms/CMS/Parcours.php
new file mode 100644 (file)
index 0000000..d16ace4
--- /dev/null
@@ -0,0 +1,15 @@
+<?php
+
+class CCGM_Form_CMS_Parcours extends CCGM_Form_CMS_Text {
+
+       public function init() {
+               parent::init();
+
+               $etapes = new CCGM_Form_CMS_Sub_Parcours_Etapes();
+               $etapes->setLegend('Etapes');
+               $this->addSubForm($etapes, 'etapes');
+       }
+
+}
+
+?>
diff --git a/framework/application/forms/CMS/Sub/Parcours/Etape.php b/framework/application/forms/CMS/Sub/Parcours/Etape.php
new file mode 100644 (file)
index 0000000..36c308e
--- /dev/null
@@ -0,0 +1,29 @@
+<?php
+
+class CCGM_Form_CMS_Sub_Parcours_Etape extends CubeIT_Form_SubForm {
+
+       public function init() {
+               parent::init();
+
+               $titre = new Zend_Form_Element_Text('titre');
+               $titre->setLabel('Titre de la bulle');
+               $this->addElement($titre);
+
+               $soustitre = new Zend_Form_Element_Text('soustitre');
+               $soustitre->setLabel('Sous-titre');
+               $this->addElement($soustitre);
+
+               $contenu = new CubeIT_Form_Element_Markitup_Essential('contenu');
+               $contenu->setLabel('Contenu (affiché au passage de la souris)');
+               $contenu->setAttrib('rows', 5);
+               $this->addElement($contenu);
+
+               $couleur = new Zend_Form_Element_Select('couleur');
+               $couleur->setLabel('Couleur');
+               $couleur->setMultiOptions(array('orange' => 'Orange', 'vert' => 'Vert', 'bleu' => 'Bleu', 'petrole' => 'Petrole', 'rose' => 'Rose'));
+               $this->addElement($couleur);
+       }
+
+}
+
+?>
diff --git a/framework/application/forms/CMS/Sub/Parcours/Etapes.php b/framework/application/forms/CMS/Sub/Parcours/Etapes.php
new file mode 100644 (file)
index 0000000..9f732e4
--- /dev/null
@@ -0,0 +1,17 @@
+<?php
+
+class CCGM_Form_CMS_Sub_Parcours_Etapes extends CubeIT_Form_Multi_SubForm {
+
+       public function init() {
+               parent::init();
+
+               $etape = new CCGM_Form_CMS_Sub_Parcours_Etape();
+
+               $this->setBaseSubForm($etape);
+               $this->setBaseLegend('Edition de l`étape « $titre »');
+               $this->setNewLegend('Nouvelle étape');
+       }
+
+}
+
+?>
diff --git a/framework/application/views/helpers/Etapes.php b/framework/application/views/helpers/Etapes.php
new file mode 100644 (file)
index 0000000..a5dd5a5
--- /dev/null
@@ -0,0 +1,44 @@
+<?php
+
+class CCGM_View_Helper_Etapes extends Zend_View_Helper_Abstract {
+
+       public function etapes($etapes) {
+               $res = '<div id="etapes">';
+               $nb = count($etapes);
+               foreach ($etapes as $k => $etape) {
+                       $res.=$this->_etape($etape, $k+1, $nb);
+               }
+               $res.='</div>';
+
+               return $res;
+       }
+
+       protected function _etape($e, $i, $total) {
+               $pos = $this->_getPosition($i, $total);
+               $res = '<div class="etape ' . $e['couleur'] . '" style="top:' . $pos['top'] . 'px;left:' . $pos['left'] . 'px;">';
+               $res.='<div class="face">';
+               $res.='<h3>' . $e['titre'] . '</h3>';
+               $res.='<h4>' . $e['soustitre'] . '</h4>';
+               $res.='</div>';
+               $res.=$this->view->markupDotclear($e['contenu']);
+               $res.='</div>';
+               return $res;
+       }
+
+       protected function _getPosition($i, $total) {
+               $dim = array(1 => array(72, 52),
+                       2 => array(451, 2),
+                       3 => array(618, 213),
+                       4 => array(281, 241),
+                       5 => array(3, 391),
+                       6 => array(295, 467),
+                       7 => array(596, 431),
+               );
+
+               $d = $dim[$i];
+               return array('left' => $d[0], 'top' => $d[1]);
+       }
+
+}
+
+?>
index ab4fa67a01a0faa5e9ef79cc221abc59b8c9bb82..ec9b56072a8f3ec1c63c54cc0116b26f05583939 100644 (file)
@@ -1,2 +1,12 @@
 <?php\r
-\r
+$this->headScript()->addScriptAndStyle('parcours');\r
+?>\r
+<section id="content">\r
+       <div id="c">\r
+               <?php\r
+               echo $this->markupDotclear($this->text);\r
+               echo $this->etapes($this->etapes);\r
+               ?>\r
+       </div>\r
+       <?php echo $this->rightbar() ?>\r
+</section>
\ No newline at end of file
diff --git a/images/etapes.png b/images/etapes.png
new file mode 100644 (file)
index 0000000..f4181ef
Binary files /dev/null and b/images/etapes.png differ
diff --git a/less/parcours.less b/less/parcours.less
new file mode 100644 (file)
index 0000000..6ac36c8
--- /dev/null
@@ -0,0 +1,11 @@
+#etapes{
+       background-image: url("../images/etapes.png");
+       position:relative;
+       width:709px;
+       height:477px;
+       margin:140px 0 50px -20px;
+       
+       .etape{
+               position:absolute;
+       }
+}
\ No newline at end of file