From f65f8dbc2e2e11730eb0623414bd158407ef2517 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Tue, 20 Sep 2016 16:26:40 +0000 Subject: [PATCH] wip #738 @1 --- .../application/forms/CMS/Sub/Operation.php | 3 - .../views/helpers/SimeoxDocuments.php | 12 +++ .../views/helpers/SimeoxVideos.php | 21 +++++ .../views/scripts/home/simeox.phtml | 82 +++++++++---------- 4 files changed, 74 insertions(+), 44 deletions(-) create mode 100644 framework/application/views/helpers/SimeoxDocuments.php create mode 100644 framework/application/views/helpers/SimeoxVideos.php diff --git a/framework/application/forms/CMS/Sub/Operation.php b/framework/application/forms/CMS/Sub/Operation.php index 0fdfe75..4cdc1a1 100644 --- a/framework/application/forms/CMS/Sub/Operation.php +++ b/framework/application/forms/CMS/Sub/Operation.php @@ -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 index 0000000..7f7d884 --- /dev/null +++ b/framework/application/views/helpers/SimeoxDocuments.php @@ -0,0 +1,12 @@ +_video($video); + } + return $this->listUnordered($res, array('class' => 'videos')); + } + + protected function _video($v) { + $res = $this->imageProcess($v['thumbnail'], '', 165, 96, array(), 'C', 'C', 'M'); + $res .= $this->htmlElement($v['title'], 'h4'); + + return $this->link($res, CubeIT_Util_WebVideo::getIframeUrl($v['url']), array('data-video' => $v['url'])); + } +} \ No newline at end of file diff --git a/framework/application/views/scripts/home/simeox.phtml b/framework/application/views/scripts/home/simeox.phtml index e8236ad..c3ec321 100644 --- a/framework/application/views/scripts/home/simeox.phtml +++ b/framework/application/views/scripts/home/simeox.phtml @@ -5,45 +5,45 @@ $this->headScript()->addScriptAndStyle('simeox'); ?>
- simeox['carousel']; ?> - - - simeox['operation']; ?> -
-
-

-

- markupDotclear($o['content']) ?> - -
- videoWeb($o['video']); ?> -
- -
-
- - simeox['benefits']; ?> -
-
-
markupDotclear($b['content_left']); ?>
-
markupDotclear($b['content_right']); ?>
-
-
- - simeox['interface'] ?> -
-
-

- markupDotclear($i['content']); ?> -
-
-
+ simeox['carousel']; ?> + + + simeox['operation']; ?> +
+
+

+

+ markupDotclear($o['content']); + $c = str_replace('$videos', $this->simeoxVideos($o['videos']), $c); + $c = str_replace('$documents', $this->simeoxDocuments($o['documents']), $c); + echo $c; + ?> + +
+
+ + simeox['benefits']; ?> +
+
+
markupDotclear($b['content_left']); ?>
+
markupDotclear($b['content_right']); ?>
+
+
+ + simeox['interface'] ?> +
+
+

+ markupDotclear($i['content']); ?> +
+
+
\ No newline at end of file -- 2.39.5