Skip to content
Snippets Groups Projects
Commit c62aaeb6 authored by Laurent's avatar Laurent
Browse files

dev #27000 rgaa article title

do not add empty <h2> when article title is hidden
parent 1adf60f1
Branches
Tags
2 merge requests!984Dev#27000 rgaa article title,!983Dev#27000 rgaa article title
......@@ -16,7 +16,7 @@
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
abstract class ZendAfi_View_Helper_Article_RenderAbstract extends ZendAfi_View_Helper_BaseHelper {
public function renderArticle($article, $html_class) {
......@@ -61,7 +61,9 @@ abstract class ZendAfi_View_Helper_Article_RenderAbstract extends ZendAfi_View_H
public function renderTitreHeader($article) {
return '<h2>'.$this->renderTitre($article).'</h2>';
return $article->getCacherTitre()
? ''
: $this->renderTitre($article);
}
......@@ -116,7 +118,7 @@ abstract class ZendAfi_View_Helper_Article_RenderAbstract extends ZendAfi_View_H
'action' => 'reseau',
'id_article' => $article->getId()], null, true);
return
return
'<div class="reseaux-sociaux" data-article-url="'.$url_reseau.'">'
.$this->view->tagImg(URL_IMG . 'patience.gif')
.'</div>';
......@@ -130,7 +132,7 @@ abstract class ZendAfi_View_Helper_Article_RenderAbstract extends ZendAfi_View_H
public function renderAvis($article) {
return $article->getAvis() == 1
return $article->getAvis() == 1
? $this->view->avisCms($article)
: '';
}
......
......@@ -530,9 +530,12 @@ class NewsHelperWithThreeArticlesTest extends NewsHelperWithThreeArticlesTestCas
/** @test */
public function articleFeteDuNashiShouldBePresentWithoutTitle() {
$this->assertNotXPathContentContains($this->html,
'//div[@class="auto_resize article_full"]//a',
'//article[@class="auto_resize article_full"]//a',
utf8_encode('Fête du nashi'));
$this->assertNotXPath($this->html,
'//article[@class="auto_resize article_full"]//header//h2');
$this->assertXPathContentContains($this->html,
'//article[@class="auto_resize article_full"]',
utf8_encode('à Beijing'));
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment