diff --git a/VERSIONS_HOTLINE/134150 b/VERSIONS_HOTLINE/134150 new file mode 100644 index 0000000000000000000000000000000000000000..3e46473179190a7c0446c80370374a55c3ac6e6c --- /dev/null +++ b/VERSIONS_HOTLINE/134150 @@ -0,0 +1 @@ + - ticket #134150 : Magasin de thèmes : Correction de l'affichage des boutons des listes. \ No newline at end of file diff --git a/library/templates/Intonation/Assets/css/intonation.css b/library/templates/Intonation/Assets/css/intonation.css index bd10b1ab1ce6560c34932ac53b4e1df836b02132..93935a19163380fde76e08f8626b7353217acc3b 100644 --- a/library/templates/Intonation/Assets/css/intonation.css +++ b/library/templates/Intonation/Assets/css/intonation.css @@ -580,6 +580,7 @@ dl.row { } .card-footer > a.card-link:first-child:last-child .button_text, +.collection_action:first-child:last-child .button_text, .card_action:first-child:last-child .button_text { display: inline !important; } @@ -979,3 +980,7 @@ a.audio_track:hover .fa-music::before { .audio_tracks .list-group-item { padding: 0; } + +.collection_action > .card-link { + width: 100%; +} diff --git a/library/templates/Intonation/Library/Settings.php b/library/templates/Intonation/Library/Settings.php index 063619813bc677d17adb3af8a3b99990491a29f3..dba5d8a1814cecf8cfc42cf2bd95083d2e84be30 100644 --- a/library/templates/Intonation/Library/Settings.php +++ b/library/templates/Intonation/Library/Settings.php @@ -140,6 +140,8 @@ class Intonation_Library_Settings extends Intonation_System_Abstract { 'a class active' => '', 'a class card-link' => '', 'div class card_action' => 'col col-sm-12 p-1 m-1', + 'div class collection_action' => 'col mr-3', + 'div class alone_in_the_list' => 'col-3', 'a class list-group-item' => '', 'div class list-group-item' => 'bg-transparent px-0 mb-3', 'div class list-group' => ' bg-transparent no_border', diff --git a/library/templates/Intonation/View/RenderCollection.php b/library/templates/Intonation/View/RenderCollection.php index 82fe8f4a86d22c205c4cbd8f8e526fbc6064b085..29505e62e17beb79bf7174557a42e51ed3065bb8 100644 --- a/library/templates/Intonation/View/RenderCollection.php +++ b/library/templates/Intonation/View/RenderCollection.php @@ -33,14 +33,19 @@ class Intonation_View_RenderCollection extends ZendAfi_View_Helper_BaseHelper { if ( ! $action->getClass()) $action->setClass('btn btn-sm btn-success'); + $one_action_class = (1 == count($actions)) + ? 'alone_in_the_list' + : ''; + $html = [$this->view->div(['class' => 'col-12'], $this->view->renderActions($actions, - ['class' => 'col-auto p-1 m-1 card_action'])), + ['class' => implode(' ', ['collection_action', + $one_action_class])])), $this->view->div(['class' => 'col-12'], $this->view->renderTruncateList($collection, $callback, $page_size))]; - return $this->view->grid(implode($html)); + return $this->view->grid($html); } } diff --git a/tests/scenarios/Templates/TemplatesAbonneTest.php b/tests/scenarios/Templates/TemplatesAbonneTest.php index cae6c7c049d8828e047e6e410899600635c34cf7..e9ed85c171f22a4aeb5cf8aeb46659e0cd760333 100644 --- a/tests/scenarios/Templates/TemplatesAbonneTest.php +++ b/tests/scenarios/Templates/TemplatesAbonneTest.php @@ -719,6 +719,18 @@ class TemplatesDispatchAbonneSelectionsTest extends TemplatesIntonationAccountTe . '[contains(@href, "/id_panier/2")]' . '[not(contains(@href, "/id/"))]'); } + + + /** @test */ + public function mesRechercheSuiviesShouldBeDisplay() { + $this->assertXPathContentContains('//div//h3', 'Mes recherches suivies'); + } + + + /** @test */ + public function linkToFollowASearchShouldBePresent() { + $this->assertXPathContentContains('//div[@class = "collection_action alone_in_the_list btn btn-sm btn-success col mr-3 col-3"]//a', 'Suivre'); + } }