Skip to content
Snippets Groups Projects
Commit a10f258d authored by Ghislain Loas's avatar Ghislain Loas
Browse files

hotline #135538 fix reading id_profil param in render-menu-entry action

parent c62b5ec6
Branches
Tags
1 merge request!4361hotline #135538 fix reading id_profil param in render-menu-entry action
Pipeline #16274 passed with stage
in 33 minutes and 51 seconds
- 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
......@@ -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;
......
......@@ -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;
}
......
......@@ -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;
......
{
"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"
}
}
}
}
}
......@@ -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")]');
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment