diff --git a/VERSIONS_HOTLINE/135538 b/VERSIONS_HOTLINE/135538 new file mode 100644 index 0000000000000000000000000000000000000000..1a7467e7af1376334b6e6c6d877d95c5baafda29 --- /dev/null +++ b/VERSIONS_HOTLINE/135538 @@ -0,0 +1 @@ + - correctif #135538 : Magasin de thèmes : correction de la prise en charge du paramètre de profil dans les liens vers une sélection d'articles. \ No newline at end of file diff --git a/application/modules/opac/controllers/WidgetController.php b/application/modules/opac/controllers/WidgetController.php index 817dbe16192205e355c16874d5a510240cd33507..52de1f535ad581d205db93fe9f7c94bd609484bd 100644 --- a/application/modules/opac/controllers/WidgetController.php +++ b/application/modules/opac/controllers/WidgetController.php @@ -124,7 +124,7 @@ class WidgetController extends ZendAfi_Controller_Action { if (!$profile_id = $this->_getParam('menu_profil')) return ''; - Class_Template::setCurrentFrom($profile_id); + Class_Template::setCurrentFrom($this->_getParam('id_profil', $profile_id)); $child = new Class_Systeme_Widget_Menu; diff --git a/library/ZendAfi/View/Helper/RenderForm.php b/library/ZendAfi/View/Helper/RenderForm.php index 9bcbdeb1aed964063c99003167e3c01e824d5603..dd20ad163f11dd257f9327d5c966cd2dba35ebdd 100644 --- a/library/ZendAfi/View/Helper/RenderForm.php +++ b/library/ZendAfi/View/Helper/RenderForm.php @@ -167,7 +167,9 @@ class ZendAfi_View_Helper_RenderForm extends ZendAfi_View_Helper_BaseHelper { $decorator->setOption('wrap', ['tag' => 'td', 'attribs' => ['class' => 'droite']]); $newDecorators[$name] = $decorator; - $newDecorators[] = ['HtmlTag', ['tag' => 'tr', 'data-level' => $this->_getModeFrom($element)]]; + $newDecorators[] = ['HtmlTag', ['tag' => 'tr', + 'data-level' => $this->_getModeFrom($element), + 'class' => $element->getId()]]; return $newDecorators; } diff --git a/public/admin/skins/bokeh74/form.css b/public/admin/skins/bokeh74/form.css index fbe76178d92a3c8d3e6aa5b872182e5e1f81ee94..b1056cc0e25a4c100e20264c64a24db712f4e843 100644 --- a/public/admin/skins/bokeh74/form.css +++ b/public/admin/skins/bokeh74/form.css @@ -175,7 +175,7 @@ body .ui-tabs .ui-tabs-nav > .ui-state-default > a.modified { background-color: var(--main-background); } -body:not(.template_HISTORIC) #fieldset-style_group tr + tr td.gauche { +body:not(.template_HISTORIC) #fieldset-style_group tr.boite > td.gauche { display: grid; grid-gap: 1em; grid-template-columns: repeat( 2, auto); @@ -185,7 +185,7 @@ body:not(.template_HISTORIC) #fieldset-style_group tr + tr td.gauche { overflow: scroll; } -body:not(.template_HISTORIC) #fieldset-style_group tr + tr td.gauche > * { +body:not(.template_HISTORIC) #fieldset-style_group tr.boite > td.gauche > * { display: inline-block; white-space: nowrap; min-height: 1em; diff --git a/tests/scenarios/Templates/135538_page_with_side.json b/tests/scenarios/Templates/135538_page_with_side.json new file mode 100644 index 0000000000000000000000000000000000000000..fce5773347c09cbbff048e483f9bd2a23a45a3be --- /dev/null +++ b/tests/scenarios/Templates/135538_page_with_side.json @@ -0,0 +1,27 @@ +{ + "id": 1097, + "parent_id": 1, + "cfg_accueil": { + "modules": { + "68": { + "division": "1", + "type_module": "MENU", + "preferences": { + "titre": "S\u00e9lectionnez un th\u00e8me", + "menu": "1097-27", + "layout": "vertical", + "boite": [ + "menu_sticky_gauche", + "menu_text_black", + "sandwich_menu_help" + ], + "id_module": "68", + "profile_id": "990", + "all_rendering": "card-description", + "all_layout": "carousel", + "description_length": "20" + } + } + } + } +} diff --git a/tests/scenarios/Templates/TemplatesMenuTest.php b/tests/scenarios/Templates/TemplatesMenuTest.php index 858bdb6e82bbd0a1dba0cf68b567fb4903c0f98c..17fc80597770596d3c600100ad9177965b6148a5 100644 --- a/tests/scenarios/Templates/TemplatesMenuTest.php +++ b/tests/scenarios/Templates/TemplatesMenuTest.php @@ -93,6 +93,12 @@ class TemplatesMenuUrlFormTest extends TemplatesMenuUrlTestCase { public function inputLibelleShouldContainsUrlDeLienVersSite() { $this->assertXPath('//input[@id="libelle"][@value="url de lien vers site"]'); } + + + /** @test */ + public function logoInputShouldBeInPictoTr() { + $this->assertXPath('//div//form//table//tr[@class="picto"]//td//input[@id="picto"]'); + } } @@ -647,4 +653,39 @@ class TemplatesMenuWithArticlesByPreferencesAndWidgetRenderingTest extends Admin public function editRenderMenuEntryLinkShouldBePresent() { $this->assertXPath('//main//div[contains(@class, "boite news")]/a[contains(@class, "edit_menu")][contains(@href, "/admin/widget/edit-menu/id/10/id_profil/1/parent/0")]'); } -} \ No newline at end of file +} + + + +/* hotline #135538 */ +class TemplatesMenuRenderMenuEntryTemplateSettingsTest extends Admin_AbstractControllerTestCase { + + protected $_storm_default_to_volatile = true; + + + public function setUp() { + parent::setUp(); + + $profile_1 = $this->_buildTemplateProfil(['id' => 1]); + + (new Class_Profil_Import($profile_1)) + ->import(__DIR__ . '/137985_profile_with_menu_with_widget_with_menu.json'); + + + $profile_1097 = + $this->fixture(Class_Profil::class, + ['id' => 1097, + 'parent_id' => 1]); + + (new Class_Profil_Import($profile_1097)) + ->import(__DIR__ . '/135538_page_with_side.json'); + + $this->dispatch('/widget/render-menu-entry/parent/6/menu_profil/1/menu/3/id_profil/1097'); + } + + + /** @test */ + public function aSideShouldContainsWidgetMenu68() { + $this->assertXPath('//aside//div[@id="boite_68"][contains(@class, "boite menu")]'); + } +}