]> _ Git - physioassist.git/commitdiff
wip #738 @1
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 20 Sep 2016 16:26:40 +0000 (16:26 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 20 Sep 2016 16:26:40 +0000 (16:26 +0000)
framework/application/forms/CMS/Sub/Operation.php
framework/application/views/helpers/SimeoxDocuments.php [new file with mode: 0644]
framework/application/views/helpers/SimeoxVideos.php [new file with mode: 0644]
framework/application/views/scripts/home/simeox.phtml

index 0fdfe75db87680d5b8f4f38e6a27d0e9d0c03592..4cdc1a1d44c9798055154579f21d79b2b9b9de32 100644 (file)
@@ -34,8 +34,5 @@ class Simeox_Form_CMS_Sub_Operation extends CubeIT_Form_SubForm {
                $bg_image->setLabel("Image de fond");
                $bg_image->setMaxItems(1);
                $this->addElement($bg_image);
-
        }
-
-
 }
\ No newline at end of file
diff --git a/framework/application/views/helpers/SimeoxDocuments.php b/framework/application/views/helpers/SimeoxDocuments.php
new file mode 100644 (file)
index 0000000..7f7d884
--- /dev/null
@@ -0,0 +1,12 @@
+<?php\r
+\r
+class Simeox_View_Helper_SimeoxDocuments extends CubeIT_View_Helper_Abstract {\r
+       /**\r
+        * @return string\r
+        */\r
+       public function simeoxDocuments() {\r
+        $res='';\r
+        \r
+        return $res;\r
+       }\r
+}
\ No newline at end of file
diff --git a/framework/application/views/helpers/SimeoxVideos.php b/framework/application/views/helpers/SimeoxVideos.php
new file mode 100644 (file)
index 0000000..e20d23c
--- /dev/null
@@ -0,0 +1,21 @@
+<?php\r
+\r
+class Simeox_View_Helper_SimeoxVideos extends CubeIT_View_Helper_Abstract {\r
+       /**\r
+        * @return string\r
+        */\r
+       public function simeoxVideos($videos) {\r
+               $res = array();\r
+               foreach ($videos as $video) {\r
+                       $res[] = $this->_video($video);\r
+               }\r
+               return $this->listUnordered($res, array('class' => 'videos'));\r
+       }\r
+\r
+       protected function _video($v) {\r
+               $res = $this->imageProcess($v['thumbnail'], '', 165, 96, array(), 'C', 'C', 'M');\r
+               $res .= $this->htmlElement($v['title'], 'h4');\r
+\r
+               return $this->link($res, CubeIT_Util_WebVideo::getIframeUrl($v['url']), array('data-video' => $v['url']));\r
+       }\r
+}
\ No newline at end of file
index e8236ad4aa13a6a4ffa57a0d1a0ff90315c8abe1..c3ec321d9e4ba5977dce23049404c8bc0b83d00e 100644 (file)
@@ -5,45 +5,45 @@ $this->headScript()->addScriptAndStyle('simeox');
 ?>
 <section id="simeox">
 
-    <?php $c = $this->simeox['carousel']; ?>
-    <article class="carousel">
-
-        <div class="content">
-            <h1><?php echo $c['heading'] ?></h1>
-            <h2><?php echo $c['subheading'] ?></h2>
-        </div>
-
-        <?php echo $this->imageSlideshowContinuous($c['image_carousel'], 790, array(), array('arrowspermanent' => 1)); ?>
-    </article>
-
-    <?php $o = $this->simeox['operation']; ?>
-    <article class="operation" style="<?php echo $this->backgroundImage($o['bg_image'], 100); ?>">
-        <div class="content">
-            <h1><?php echo $o['heading'] ?></h1>
-            <h2><?php echo $o['subheading'] ?></h2>
-            <?php echo $this->markupDotclear($o['content']) ?>
-            <?php if(!empty($o['video'])): ?>
-                <div class="video">
-                    <?php echo $this->videoWeb($o['video']); ?>
-                </div>
-            <?php endif; ?>
-        </div>
-    </article>
-
-    <?php $b = $this->simeox['benefits']; ?>
-    <article class="benefits">
-        <div class="content">
-            <div class="col"><?php echo $this->markupDotclear($b['content_left']); ?></div>
-            <div class="col"><?php echo $this->markupDotclear($b['content_right']); ?></div>
-        </div>
-    </article>
-
-    <?php $i = $this->simeox['interface'] ?>
-    <article class="interface">
-        <div class="content">
-            <h1><?php echo $i['heading']; ?></h1>
-            <?php echo $this->markupDotclear($i['content']); ?>
-        </div>
-        <div class="screenshot" style="<?php echo $this->backgroundImage($i['image']); ?>"></div>
-    </article>
+       <?php $c = $this->simeox['carousel']; ?>
+       <article class="carousel">
+
+               <div class="content">
+                       <h1><?php echo $c['heading'] ?></h1>
+                       <h2><?php echo $c['subheading'] ?></h2>
+               </div>
+
+               <?php echo $this->imageSlideshowContinuous($c['image_carousel'], 790, array(), array('arrowspermanent' => 1)); ?>
+       </article>
+
+       <?php $o = $this->simeox['operation']; ?>
+       <article class="operation" style="<?php echo $this->backgroundImage($o['bg_image'], 100); ?>">
+               <div class="content">
+                       <h1><?php echo $o['heading'] ?></h1>
+                       <h2><?php echo $o['subheading'] ?></h2>
+                       <?php $c = $this->markupDotclear($o['content']);
+                       $c = str_replace('$videos', $this->simeoxVideos($o['videos']), $c);
+                       $c = str_replace('$documents', $this->simeoxDocuments($o['documents']), $c);
+                       echo $c;
+                       ?>
+
+               </div>
+       </article>
+
+       <?php $b = $this->simeox['benefits']; ?>
+       <article class="benefits">
+               <div class="content">
+                       <div class="col"><?php echo $this->markupDotclear($b['content_left']); ?></div>
+                       <div class="col"><?php echo $this->markupDotclear($b['content_right']); ?></div>
+               </div>
+       </article>
+
+       <?php $i = $this->simeox['interface'] ?>
+       <article class="interface">
+               <div class="content">
+                       <h1><?php echo $i['heading']; ?></h1>
+                       <?php echo $this->markupDotclear($i['content']); ?>
+               </div>
+               <div class="screenshot" style="<?php echo $this->backgroundImage($i['image']); ?>"></div>
+       </article>
 </section>
\ No newline at end of file