diff --git a/VERSIONS_HOTLINE/149168 b/VERSIONS_HOTLINE/149168 new file mode 100644 index 0000000000000000000000000000000000000000..6826a10243eab8a4178a0158a7b401b238d1fcfe --- /dev/null +++ b/VERSIONS_HOTLINE/149168 @@ -0,0 +1 @@ + - correctif #149168 : Magasin de thème : vue notice, correction l'onglet média qui affichait toujours la même vidéo par défaut \ No newline at end of file diff --git a/library/templates/Intonation/Library/View/Wrapper/Record/RichContent/Media.php b/library/templates/Intonation/Library/View/Wrapper/Record/RichContent/Media.php index 9afefe5506dab9a11c59656305dead740a1ac4ad..edcb0c4db19b4438c51f6473ae680cc12110a7a5 100644 --- a/library/templates/Intonation/Library/View/Wrapper/Record/RichContent/Media.php +++ b/library/templates/Intonation/Library/View/Wrapper/Record/RichContent/Media.php @@ -34,7 +34,10 @@ class Intonation_Library_View_Wrapper_Record_RichContent_Media extends Intonatio if ($this->_content) return $this->_content; - $html = [$this->_view->renderAjax('noticeajax', 'media', [], $this->_getJsCallback())]; + $html = [$this->_view->renderAjax('noticeajax', + 'media', + ['id' => $this->_model->getId()], + $this->_getJsCallback())]; return $this->_content = $this->_view->grid(implode($html)); } diff --git a/tests/scenarios/Templates/TemplatesRecordsTest.php b/tests/scenarios/Templates/TemplatesRecordsTest.php index d47d0bc4eb41a3aabf8c1930641ba8c6c27e3cf8..c4dbb755a298cf19396acaf1049d8507ff8fdcf2 100644 --- a/tests/scenarios/Templates/TemplatesRecordsTest.php +++ b/tests/scenarios/Templates/TemplatesRecordsTest.php @@ -200,6 +200,15 @@ class TemplatesRecords_Notice_NoThumbnailVignetteTest public function withoutUnimarcAndNoUrlVignettehtmlShouldContainsNothumbnail() { $this->assertXPath('//div[@class = "record_no_thumbnail card card-img-overlay"]//i[@class="fas fa-book ico_xl doc_type_1 doc_types"]'); } + + + /** + * @see hotline : https://forge.afi-sa.net/issues/149168 + * @test + **/ + public function JSloadMediaShouldHaveRecordId() { + $this->assertXPathContentContains('//script', '.load("/noticeajax/media/id/1"'); + } }