diff --git a/VERSIONS_HOTLINE/143674 b/VERSIONS_HOTLINE/143674 new file mode 100644 index 0000000000000000000000000000000000000000..823441920772c26d2c510fc229166bacbd0c3893 --- /dev/null +++ b/VERSIONS_HOTLINE/143674 @@ -0,0 +1,2 @@ + - correctif #143674 : Magasin de thèmes : Le paramètre "Autoriser les balises HTML" + des boites notices est maintenant bien pris en compte. \ No newline at end of file diff --git a/library/templates/Intonation/Library/View/Wrapper/Record.php b/library/templates/Intonation/Library/View/Wrapper/Record.php index ec3731f720b50e2836d56d10e17f7256c6af036c..25233f6516b9c0414fdc6d4e26d7dd2346f26679 100644 --- a/library/templates/Intonation/Library/View/Wrapper/Record.php +++ b/library/templates/Intonation/Library/View/Wrapper/Record.php @@ -102,9 +102,7 @@ class Intonation_Library_View_Wrapper_Record extends Intonation_Library_View_Wra $description = $xsl->isEnabled() && $this->getAllowXSL() ? $this->_view->Notice_Xsl($xsl) - : $this->_view->truncate($this->_model->getResume(), - ['class' => 'model_description_' . get_class($this->_model)], - $description_length); + : $this->_truncate($this->_model->getResume()); return ($this->_description = $this->getBadges() . $description); } diff --git a/tests/scenarios/Templates/TemplatesRecordsTest.php b/tests/scenarios/Templates/TemplatesRecordsTest.php index dc13810f8e9de2c212b7a5394ae04cc82c363601..7ae3a3f0ea48c70aa790404a5532ce9f4e2c7b11 100644 --- a/tests/scenarios/Templates/TemplatesRecordsTest.php +++ b/tests/scenarios/Templates/TemplatesRecordsTest.php @@ -83,7 +83,6 @@ class TemplatesRecordsWidgetTest extends Admin_AbstractControllerTestCase { abstract class TemplateRecordsWithDescriptionAndUnimarcTest extends AbstractControllerTestCase { - protected $_storm_default_to_volatile = true; public function setUp() { @@ -96,7 +95,7 @@ abstract class TemplateRecordsWithDescriptionAndUnimarcTest extends AbstractCont ['id' => 'fre', 'libelle' => 'Français']); $notice_unimarc = (new Class_NoticeUnimarc_Fluent) - ->zoneWithChildren('330', ['a' => 'La description s\'arrête ici et pas plus loin.']) + ->zoneWithChildren('330', ['a' => 'La description s\'arrête ici et pas plus loin. <a href="/mon-super-lien">mon super lien</a>']) ->zoneWithChildren('210', ['c' => 'Auzou']) ->zoneWithChildren('225', ['a' => 'Pocket']) ->zoneWithChildren('101', ['a' => 'fre']); @@ -1411,4 +1410,34 @@ class TemplatesRecordWithMultipleMoreDescriptionDataTest extends AbstractControl $this->assertXPathContentContains('//dl/dt[text()="Public"]/following-sibling::dd//ul//li//span[@class="more_description_data_title font-italic"]', 'Jeunesse'); } +} + + + + +class TemplatesRecordsWithAnchorInDescriptionTest extends TemplateRecordsWithDescriptionAndUnimarcTest { + public function setUp() { + parent::setUp(); + + $profile_patcher = (new Class_Template_ProfilePatcher(null)) + ->setProfile(Class_Profil::find(34)); + + $profile_patcher + ->addWidget(Intonation_Library_Widget_Carousel_Record_Definition::CODE, + Class_Profil::DIV_MAIN, + ['rendering' => 'card-description', + 'layout' => 'list', + 'size' => '1', + 'description_html' => '1', + 'description_length' => 1000]); + + $this->dispatch('/opac/widget/render/widget_id/1/profile_id/34'); + } + + + /** @test */ + public function anchorBlablaShouldBeDisplay() { + $this->assertXPathContentContains('//div[contains(@class, "kiosque widget")]//p[@class= "model_description_Class_Notice"]//a', + 'mon super lien'); + } } \ No newline at end of file