From d9e0e061b07899758db71c533db03a51a51563bd Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Tue, 10 Apr 2018 16:14:14 +0000 Subject: [PATCH] wip #1809 @0:05 --- .../views/helpers/FeatureDetails.php | 45 ++++++++++--------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/framework/application/views/helpers/FeatureDetails.php b/framework/application/views/helpers/FeatureDetails.php index 7ddc765..c2b712b 100644 --- a/framework/application/views/helpers/FeatureDetails.php +++ b/framework/application/views/helpers/FeatureDetails.php @@ -1,28 +1,31 @@ _detail($detail, $i % 2 == 1); - $i++; - } +class Fluidbook_View_Helper_FeatureDetails extends CubeIT_View_Helper_Abstract +{ + /** + * @return string + */ + public function featureDetails($details) + { + $res = ''; + $i = 0; + foreach ($details as $detail) { + $res .= $this->_detail($detail, $i % 2 == 1); + $i++; + } - return $this->htmlElement($res, 'section', ['id' => 'featureDetails', 'class' => 'content-wrapper grid wrap']); - } + return $this->htmlElement($res, 'section', ['id' => 'featureDetails', 'class' => 'content-wrapper grid wrap']); + } - protected function _detail($d, $imageRight) { - $c = $this->htmlElement($d['title'], 'h3'); - $c .= $this->markupDotclear($d['text']); - $c = $this->htmlElement($c, 'div', ['class' => 'content']); - $image = $this->imageProcess($d['image'], $d['title'], 755, 1000, [], 'R'); + protected function _detail($d, $imageRight) + { + $c = $this->htmlElement($d['title'], 'h3'); + $c .= $this->markupDotclear($d['text']); + $c = $this->htmlElement($c, 'div', ['class' => 'content']); + $image = $this->imageProcess($d['image'], $d['title'], 755 * 2, 1000 * 2, [], 'R'); - $res = $image . $c; + $res = $image . $c; - return $this->htmlElement($res, 'article', ['class' => $imageRight ? 'iright' : 'ileft']); - } + return $this->htmlElement($res, 'article', ['class' => $imageRight ? 'iright' : 'ileft']); + } } \ No newline at end of file -- 2.39.5