diff --git a/VERSIONS_HOTLINE/138115 b/VERSIONS_HOTLINE/138115 new file mode 100644 index 0000000000000000000000000000000000000000..7b8cad17b818a33e22270e0f3435af4619f22aa9 --- /dev/null +++ b/VERSIONS_HOTLINE/138115 @@ -0,0 +1 @@ + - ticket #138115 : Magasin de Thèmes : Correction du bouton des flux RSS dans les caroussels \ No newline at end of file diff --git a/library/templates/Intonation/Library/Settings.php b/library/templates/Intonation/Library/Settings.php index af7da64244fbc204cd398daf470a0ce7c5005961..b8c50a69bf961668fbae7ba1a1782e531acb4b70 100644 --- a/library/templates/Intonation/Library/Settings.php +++ b/library/templates/Intonation/Library/Settings.php @@ -129,6 +129,7 @@ class Intonation_Library_Settings extends Intonation_System_Abstract { 'dt class user_info' => 'col-12 col-sm-6', 'dd class user_info' => 'col-12 col-sm-6', 'a' => 'text-secondary', + 'a class flux-rss' => 'btn btn-secondary', 'a class carousel_control' => 'text-dark', 'a class btn' => 'text-light', 'a class list_format' => 'btn btn-light', diff --git a/library/templates/Intonation/Library/Widget/Carousel/View.php b/library/templates/Intonation/Library/Widget/Carousel/View.php index 2e3f4a72653eb1f2cec8c43193228e1f5fb0b174..dfc5f3a9d7c35b2b9aa55b75bb35cb4aa650d5de 100644 --- a/library/templates/Intonation/Library/Widget/Carousel/View.php +++ b/library/templates/Intonation/Library/Widget/Carousel/View.php @@ -102,11 +102,14 @@ abstract class Intonation_Library_Widget_Carousel_View extends Zendafi_View_Help protected function _getTagRss() { - return $this->view->button((new Class_Button) - ->setText(Class_Template::current() - ->getIco($this->view, 'rss','utils')) - ->setUrl($this->_getRSSUrl()) - ->setTitle($this->_('Flux RSS de la boite "%s"', $this->titre))); + return $this->view->tagAnchor( + $this->_getRSSUrl(), + $this->view + ->templateIco('rss', + 'utils'), + ['class' => 'flux-rss', + 'type' => 'application/rss+xml', + 'title' => $this->_('Flux RSS de la boite "%s"', $this->_settings->getTitre()) ]); } @@ -114,7 +117,7 @@ abstract class Intonation_Library_Widget_Carousel_View extends Zendafi_View_Help $id = 'dropdown_embed_' . $this->getId(); return $this->_tag('div', $this->_tag('button', - Class_Template::current()->getIco($this->view, 'embed', 'utils'), + $this->view->templateIco('embed', 'utils'), ['class' => 'dropdown-toggle', 'title' => $this->_('Code IFRAME à copier coller'), 'id' => $id, diff --git a/tests/scenarios/Templates/TemplatesArticlesTest.php b/tests/scenarios/Templates/TemplatesArticlesTest.php index d3033f5740dba458ee0ccb3fc9173bfc4b9ef513..8d409da4f3009e3c824c0efaa86012e82ed957fa 100644 --- a/tests/scenarios/Templates/TemplatesArticlesTest.php +++ b/tests/scenarios/Templates/TemplatesArticlesTest.php @@ -984,7 +984,7 @@ class TemplatesArticlesWithWidgetRenderWallNotLoggedTest ]; $key = md5(json_encode($expected_settings)); - $this->assertXPath('//button[contains(@onclick, "rss/kiosque?id_profil=32&language=fr&cache_key=' . $key . '")]'); + $this->assertXPath('//a[contains(@href, "rss/kiosque?id_profil=32&language=fr&cache_key=' . $key . '")]'); } } diff --git a/tests/scenarios/Templates/TemplatesWidgetTest.php b/tests/scenarios/Templates/TemplatesWidgetTest.php index a7fbcd7333416446645f91258761d453a75fa148..c4150955d60a6d5d57d9c7f9069e3d99772ad0ab 100644 --- a/tests/scenarios/Templates/TemplatesWidgetTest.php +++ b/tests/scenarios/Templates/TemplatesWidgetTest.php @@ -206,7 +206,7 @@ class TemplatesWidgetRenderAllAgendaTest extends TemplatesWidgetRenderAllTestCas /** @test */ public function renderWidgetAgendaShouldDisplayRSSLink() { - $this->assertXPath('//button[contains(@title, "Flux RSS de la boite")][contains(@onclick, "/cms/calendarrss?id_module=21&id_profil=72")]'); + $this->assertXPath('//a[contains(@href, "/cms/calendarrss?id_module=21&id_profil=72")][contains(@class,"btn")][@type="application/rss+xml"][contains(@title,"Flux RSS de la boite")]'); } @@ -824,7 +824,7 @@ class TemplateRecordsWidgetWithOptionsTest extends TemplatesIntonationTestCase { /** @test */ public function shouldContainsRSS() { - $this->assertXPath('//button[contains(@title, "Flux RSS de la boite")][contains(@onclick, "/rss/kiosque?id_module=17")]'); + $this->assertXPath('//a[contains(@title, "Flux RSS de la boite")][contains(@href, "/rss/kiosque?id_module=17")]'); }