From: vincent@cubedesigners.com Date: Mon, 4 Dec 2017 13:07:47 +0000 (+0000) Subject: done #1785 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=f47102c0aef9c8e8bf60116f8c5bbd351e811e04;p=ccgm.git done #1785 @1 --- diff --git a/framework/application/views/helpers/News.php b/framework/application/views/helpers/News.php index 155cb20..27370f5 100644 --- a/framework/application/views/helpers/News.php +++ b/framework/application/views/helpers/News.php @@ -16,7 +16,8 @@ class CCGM_View_Helper_News extends CubeIT_View_Helper_Abstract { } protected function _news($n) { - $res = $this->imageProcess($n->getImage(), '', 200, 200); + $img = $this->imageProcess($n->getImage(), '', 200, 200); + $res = $img; $c = $this->dateTime($n->getDate(), CubeIT_Date::DAY . '/' . CubeIT_Date::MONTH . '/' . CubeIT_Date::YEAR); $c .= $this->htmlElement($n->getTitle(), 'h2'); $c .= '
'; @@ -26,6 +27,10 @@ class CCGM_View_Helper_News extends CubeIT_View_Helper_Abstract { $c .= $this->link('Lire la suite', '#', ['class' => 'more']); $c .= $this->link('Réduire', '#', ['class' => 'less']); $res .= $this->htmlElement($c, 'div', ['class' => 'c']); - return $this->htmlElement($res, 'article'); + $aargs = []; + if (!$img) { + $aargs['class'] = 'noimg'; + } + return $this->htmlElement($res, 'article', $aargs); } } \ No newline at end of file diff --git a/less/news.less b/less/news.less index f5024e0..992142e 100644 --- a/less/news.less +++ b/less/news.less @@ -10,6 +10,13 @@ margin-bottom: 0; } + &.noimg { + .c { + margin-left: 0; + width: 980px; + } + } + img { vertical-align: top; display: inline-block; @@ -56,6 +63,7 @@ .dotclear { line-height: 24px; + min-height: 72px; p:last-child { margin-bottom: 0; }