Skip to content
Snippets Groups Projects
Commit eeb868b5 authored by Patrick Barroca's avatar Patrick Barroca :grin:
Browse files

Merge branch...

Merge branch 'hotline#73645_option_flux_rss_non_prise_en_compte_dans_une_boite_sitotheque' into 'hotline'

hotline #73645 fix sitoheque widget rss option

See merge request !2605
parents 9d7d5264 639273fa
Branches
Tags
2 merge requests!2660Master,!2605hotline #73645 fix sitoheque widget rss option
Pipeline #3924 passed with stage
in 32 minutes and 40 seconds
- ticket #73645 : Boite sitothèque : correction de la prise en charge de l'option 'flux rss'.
\ No newline at end of file
......@@ -241,16 +241,14 @@ class ZendAfi_View_Helper_Accueil_Base extends ZendAfi_View_Helper_ModuleAbstrac
//------------------------------------------------------------------------------------------------------
public function getBoiteFromTemplate($template, $html_array)
{
// Fil rss interne
if (array_isset('RSS', $html_array))
$html_array["RSS"]= sprintf('<a href="%s" target="_blank"><img src="%s" style="border:0px" alt="%s"/></a>',
$html_array["RSS"],
URL_IMG.'rss.gif',
$this->translate()->_('flux RSS de la boite %s',
$this->preferences['titre']));
else
$html_array["RSS"]="";
$html_array['RSS'] = array_isset('RSS', $html_array)
? $this->view->tagAnchor($html_array['RSS'],
$this->view->tagImg(URL_IMG . 'rss.gif',
['alt' => $this->_('flux RSS de la boite %s',
$this->preferences['titre'])]),
['target' => '_blank',
'style' => 'border: 0px;'])
: '';
// Lire le template
if(file_exists($template))
......
......@@ -80,7 +80,7 @@ class ZendAfi_View_Helper_Accueil_Sito extends ZendAfi_View_Helper_Accueil_Base
public function getHtml() {
if ($this->getPreference('rss'))
if ($this->getPreference('rss') || $this->getPreference('rss_avis'))
$this->rss_interne = $this->_getRSSurl('sito', 'sito-rss');
$strategy = $this->getStrategy();
......
......@@ -129,6 +129,7 @@ class SitoViewHelperSelectItemsBySelectionOrderTest extends SitoViewHelperTestCa
'id_items' => '12-15',
'id_categorie' => '',
'nb_aff' => 0,
'rss' => 1,
'display_order' => 'Selection'];
/** @test */
......@@ -145,6 +146,12 @@ class SitoViewHelperSelectItemsBySelectionOrderTest extends SitoViewHelperTestCa
'//div/div[2]//h2//a',
'RMLL');
}
/** @test */
public function rssLinkShouldBePresent() {
$this->assertXPath($this->html, '//a[contains(@href, "/sito/sito-rss")]/img');
}
}
......@@ -156,8 +163,16 @@ class SitoViewHelperSelectItemsBySelectionOrderPaginationTest extends SitoViewHe
'id_items' => '12-15',
'id_categorie' => '',
'nb_aff' => 1,
'rss_avis' => 1,
'display_order' => 'Selection'];
/** @test */
public function rssLinkShouldBePresent() {
$this->assertXPath($this->html, '//a[contains(@href, "/sito/sito-rss")]/img');
}
/** @test */
public function firstPageShoulNotContainsRMLL() {
$this->assertNotXPathContentContains($this->html,
......
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