diff --git a/VERSIONS_HOTLINE/121287 b/VERSIONS_HOTLINE/121287 new file mode 100644 index 0000000000000000000000000000000000000000..61bbfad364a282801bfc2011b91587759b6268d5 --- /dev/null +++ b/VERSIONS_HOTLINE/121287 @@ -0,0 +1 @@ + - ticket #121287 : Magasin de thèmes : Amélioration de l'affichage du tag voir tous les numéros de la série dans les notices en rajoutant la class CSS no_truncate. \ No newline at end of file diff --git a/library/templates/Chili/Library/Settings.php b/library/templates/Chili/Library/Settings.php index 9d95032007be55949ab86958529878dd410b22ab..6ff2461381610cd809e00b256e19f8b44fb174c5 100644 --- a/library/templates/Chili/Library/Settings.php +++ b/library/templates/Chili/Library/Settings.php @@ -85,7 +85,7 @@ class Chili_Library_Settings extends Intonation_Library_Settings { $hydrating_mapping['span class record_pro_reviews_average_score'] = 'order-1'; $hydrating_mapping['a class record_facets'] = 'order-5'; $hydrating_mapping['span class record_facets'] = 'order-6'; - $hydrating_mapping['a class record_serie'] = 'order-7'; + $hydrating_mapping['a class record_serie'] = 'badge-white no_truncate order-7'; $hydrating_mapping['div class left_highlight_column'] = 'col-12 col-md-4 col-lg-5 rounded'; $hydrating_mapping['div class left_carousel_columns'] = 'col-12 col-md-8 col-lg-7'; $hydrating_mapping['div class top_highlight_column'] = 'col-12 rounded'; diff --git a/library/templates/Intonation/Library/Settings.php b/library/templates/Intonation/Library/Settings.php index 8e95166f8586ef3b09b1bca610a550cb56c8cc0a..ea0295df962674af86b377f456e2fc53099383ce 100644 --- a/library/templates/Intonation/Library/Settings.php +++ b/library/templates/Intonation/Library/Settings.php @@ -229,6 +229,7 @@ class Intonation_Library_Settings extends Intonation_System_Abstract { 'div class jumbotron_content' => 'col-10 col-xl-9', 'div class jumbotron_rich_content' => 'col-12 border-bottom border-primary mb-3 pb-3', 'a class active_item' => 'active', + 'a class record_serie' => 'badge-white no_truncate', 'div class rich_content_actions' => 'col-12 px-0 mt-3 record_summary', 'div class rich_content_row_actions' => 'col col-lg-12 pt-1 mt-1 mr-1 pr-1 w-s_nowrap', diff --git a/library/templates/Intonation/Library/View/Wrapper/Record.php b/library/templates/Intonation/Library/View/Wrapper/Record.php index 7866a7a555cec07f75b90e302b7fbda54a69097d..445dc77eafd65a0f3b74164a9ffe6cc6cfe12fe7 100644 --- a/library/templates/Intonation/Library/View/Wrapper/Record.php +++ b/library/templates/Intonation/Library/View/Wrapper/Record.php @@ -233,7 +233,7 @@ class Intonation_Library_View_Wrapper_Record extends Intonation_Library_View_Wra $badges [] = (new Intonation_Library_Badge) ->setTag('a') ->setUrl($this->_view->url((new Class_CriteresRecherche)->getNewUrlCriteresSerie($serie), null, true)) - ->setClass('badge-white record_serie') + ->setClass('record_serie') ->setText($label) ->setTitle($this->_view->_('%s dans la recherche.', $label)); diff --git a/tests/scenarios/Templates/TemplatesSearchTest.php b/tests/scenarios/Templates/TemplatesSearchTest.php index 5a9d676e10b1f0eaf6352d8907e829003df33953..cc5b40d31a6519f0398a8e0e5962025e3f2c0ada 100644 --- a/tests/scenarios/Templates/TemplatesSearchTest.php +++ b/tests/scenarios/Templates/TemplatesSearchTest.php @@ -550,9 +550,72 @@ class TemplatesSearchReservationPickupAjaxConnectedUserTest extends TemplatesSea $this->_xpath->assertXPath($this->_html, '//input[@type="radio"][@value=37]',$this->_html); } - /** @test */ public function holdMessageShouldBeDisplayedIfDefined() { $this->_xpath->assertXPathContentContains($this->_html,'//div[contains(@class, "hold_site_selection_message")]','<b>This is an additional text message</b>'); } } + + + + +class TemplateSearchWithSerieTest extends abstractControllerTestCase { + protected $_storm_default_to_volatile = true; + + + public function setUp() { + parent::setUp(); + + Class_AdminVar::set('TEMPLATING', 1); + ZendAfi_Auth::getInstance()->clearIdentity(); + + $profile = $this->fixture('Class_Profil', + ['id' => 34, + 'template' => 'MUSCLE' + ]); + + $profile->beCurrentProfil(); + + $fakir_58 = $this->fixture('Class_Notice', + ['id' => 14188, + 'titre_principal' => 'Fakir 58', + 'clef_chapeau' => 'FAKIR', + 'tome_alpha' => '58', + 'type_doc' => Class_TypeDoc::PERIODIQUE, + 'resume' => 'Fakir hebdo']); + + + $fakir_57 = $this->fixture('Class_Notice', + ['id' => 2345, + 'titre_principal' => 'Fakir 57 septembre-novembre 2012', + 'clef_chapeau' => 'FAKIR', + 'type_doc' => Class_TypeDoc::PERIODIQUE, + 'tome_alpha' => '57', + 'url_vignette' => '', + 'url_image' => '', + 'resume' => 'Fakir hebdo']); + + $fakir_56 = $this->fixture('Class_Notice', + ['id' => 23456, + 'titre_principal' => 'juillet Fakir 56', + 'clef_chapeau' => 'FAKIR', + 'tome_alpha' => '56', + 'url_vignette' => '', + 'url_image' => '', + 'type_doc' => Class_TypeDoc::PERIODIQUE, + 'resume' => 'Fakir hebdo']); + + Zend_Registry::set('sql', + $this->mock() + ->whenCalled('fetchAll') + ->answers([[14188, ''], [2345,''], [23456,'']])); + + $this->dispatch('/recherche/simple'); + } + + + /** @test */ + public function voirTousLesNumerosDeFakirShouldBePresentWithNoTruncate() { + $this->assertXPathContentContains('//a[@class="badge_tag record_serie text-left badge badge-white no_truncate"][contains(@href,"/recherche/simple/serie/FAKIR-2")]', 'Voir tous les numéros de Fakir'); + } +} \ No newline at end of file