Commit 55bcc860 authored by Henri-Damien LAURENT's avatar Henri-Damien LAURENT

hotline#138115 : MT : Flux RSS becomes a link

parent 8bca79a7
Pipeline #14199 passed with stage
in 47 minutes and 40 seconds
- ticket #138115 : Magasin de Thèmes : Correction du bouton des flux RSS dans les caroussels
\ No newline at end of file
......@@ -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',
......
......@@ -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,
......
......@@ -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 . '")]');
}
}
......
......@@ -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")]');
}
......
Markdown is supported
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