From 20d862ea7056f4016145adf0f485c5b35724a220 Mon Sep 17 00:00:00 2001 From: Arthur Suzuki <arthur.suzuki@biblibre.com> Date: Wed, 16 Feb 2022 14:48:40 +0100 Subject: [PATCH] hotline#146941 : fix reset-thumbnail link in bootstrap --- VERSIONS_HOTLINE/146941 | 1 + .../templates/Intonation/Library/View/Wrapper/Record.php | 3 ++- tests/scenarios/Templates/TemplatesRecordsTest.php | 6 ++++++ 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 VERSIONS_HOTLINE/146941 diff --git a/VERSIONS_HOTLINE/146941 b/VERSIONS_HOTLINE/146941 new file mode 100644 index 00000000000..c4f9670ff19 --- /dev/null +++ b/VERSIONS_HOTLINE/146941 @@ -0,0 +1 @@ + - correctif #146941 : Magasin de thème : le lien "Générer" pour regénérer les vignettes est corrigé. \ 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 dac33546c32..be574456dc9 100644 --- a/library/templates/Intonation/Library/View/Wrapper/Record.php +++ b/library/templates/Intonation/Library/View/Wrapper/Record.php @@ -631,7 +631,8 @@ class Intonation_Library_View_Wrapper_Record extends Intonation_Library_View_Wra $actions [] = (new Intonation_Library_Link) ->setUrl($this->_view->url(['module' => 'admin', 'controller' => 'records', - 'action' => 'reset-thumbnail'], null, true)) + 'action' => 'reset-thumbnail', + 'id' => $this->_model->getId()], null, true)) ->setImage($this->getIco('refresh', 'utils')) ->setText($this->_('Générer …')) ->setTitle($this->_('Supprimer et re-générer la vignette de %s', diff --git a/tests/scenarios/Templates/TemplatesRecordsTest.php b/tests/scenarios/Templates/TemplatesRecordsTest.php index d2182a184ef..26f7e0ebeed 100644 --- a/tests/scenarios/Templates/TemplatesRecordsTest.php +++ b/tests/scenarios/Templates/TemplatesRecordsTest.php @@ -253,6 +253,12 @@ class TemplatesRecordsViewnoticeTest extends TemplateRecordsWithDescriptionAndUn public function languagePictoShouldBeFasFaGlobeAfrica() { $this->assertXPath('//div[contains(@class, "badge-group")]//a[contains(@class, "badge_record_language")]//i[contains(@class, "fas fa-globe-africa")]'); } + + + /** @test */ + public function genererLaVignetteLinkShouldBePresent() { + $this->assertXPath('//a[contains(@class,"reset_record_thumbnail")][contains(@href, "admin/records/reset-thumbnail/id/2")]'); + } } -- GitLab