From 876b23c16d621fd76de6294affdc34cbbe175ffd Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Fri, 29 Jul 2016 15:41:56 +0000 Subject: [PATCH] mall adjustments #493 @0.5 --- framework/application/models/Reference.php | 4 ++++ framework/application/views/helpers/Exemples.php | 3 ++- framework/application/views/helpers/HomeReferences.php | 8 +++++--- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/framework/application/models/Reference.php b/framework/application/models/Reference.php index 288bde5..d26d094 100644 --- a/framework/application/models/Reference.php +++ b/framework/application/models/Reference.php @@ -45,4 +45,8 @@ class Fluidbook_Model_Reference extends CubeIT_Model_Data_Table { } return $res; } + + public function hasUrl() { + return $this->getUrl() != ''; + } } \ No newline at end of file diff --git a/framework/application/views/helpers/Exemples.php b/framework/application/views/helpers/Exemples.php index 975741f..c7a1cf9 100644 --- a/framework/application/views/helpers/Exemples.php +++ b/framework/application/views/helpers/Exemples.php @@ -93,7 +93,8 @@ class Fluidbook_View_Helper_Exemples extends CubeIT_View_Helper_Abstract { $res = ''; $res .= $this->htmlElement($f->getTitle(), 'h3'); - if ($featured) { + if ($featured && !is_array($f->getText())) { + $res .= $this->htmlElement($f->getText(), 'p'); } diff --git a/framework/application/views/helpers/HomeReferences.php b/framework/application/views/helpers/HomeReferences.php index 66ce89e..f24d6d1 100644 --- a/framework/application/views/helpers/HomeReferences.php +++ b/framework/application/views/helpers/HomeReferences.php @@ -41,9 +41,11 @@ class Fluidbook_View_Helper_HomeReferences extends Fluidbook_View_Helper_HomeLay 'class' => 'img', ) ); - $rollover = $this->htmlElement($fluidbook->getTitle(), 'h3'); - $rollover .= $this->link('Voir le fluidbook', $fluidbook->getUrl()); - $res .= $this->htmlElement($this->htmlElement($rollover, 'div', array('class' => 'content')), 'div', array('class' => 'hover')); + if ($fluidbook->hasUrl()) { + $rollover = $this->htmlElement($fluidbook->getTitle(), 'h3'); + $rollover .= $this->link('Voir le fluidbook', $fluidbook->getUrl()); + $res .= $this->htmlElement($this->htmlElement($rollover, 'div', array('class' => 'content')), 'div', array('class' => 'hover')); + } $attributes = array('class' => array('reference')); if ($big) { -- 2.39.5