From 934239952ddb92478b08cb3c6cd886e7a2eea7ce Mon Sep 17 00:00:00 2001 From: Matthias Goudjil Date: Tue, 23 Apr 2024 10:12:26 +0200 Subject: [PATCH] related #35591 - bug 9: add linkRowAction for attributes group and attributes grids --- admin-dev/themes/new-theme/js/pages/attribute-group/index.ts | 2 ++ admin-dev/themes/new-theme/js/pages/attribute/index.ts | 2 ++ .../Grid/Definition/Factory/AttributeGridDefinitionFactory.php | 1 + .../Definition/Factory/AttributeGroupGridDefinitionFactory.php | 1 + 4 files changed, 6 insertions(+) diff --git a/admin-dev/themes/new-theme/js/pages/attribute-group/index.ts b/admin-dev/themes/new-theme/js/pages/attribute-group/index.ts index 885066a154cc6..43cb8c84d5c18 100644 --- a/admin-dev/themes/new-theme/js/pages/attribute-group/index.ts +++ b/admin-dev/themes/new-theme/js/pages/attribute-group/index.ts @@ -35,6 +35,7 @@ import FiltersSubmitButtonEnablerExtension from '@components/grid/extension/filt import ShowcaseCard from '@components/showcase-card/showcase-card'; import ShowcaseCardCloseExtension from '@components/showcase-card/extension/showcase-card-close-extension'; import PositionExtension from '@components/grid/extension/position-extension'; +import LinkRowActionExtension from '@components/grid/extension/link-row-action-extension'; const {$} = window; @@ -50,6 +51,7 @@ $(() => { grid.addExtension(new BulkActionCheckboxExtension()); grid.addExtension(new FiltersSubmitButtonEnablerExtension()); grid.addExtension(new PositionExtension(grid)); + grid.addExtension(new LinkRowActionExtension()); const showcaseCard = new ShowcaseCard('attributesShowcaseCard'); showcaseCard.addExtension(new ShowcaseCardCloseExtension()); diff --git a/admin-dev/themes/new-theme/js/pages/attribute/index.ts b/admin-dev/themes/new-theme/js/pages/attribute/index.ts index a61ad2be6dea9..ae7dc1486d7ae 100644 --- a/admin-dev/themes/new-theme/js/pages/attribute/index.ts +++ b/admin-dev/themes/new-theme/js/pages/attribute/index.ts @@ -33,6 +33,7 @@ import BulkActionCheckboxExtension from '@components/grid/extension/bulk-action- import ExportToSqlManagerExtension from '@components/grid/extension/export-to-sql-manager-extension'; import FiltersSubmitButtonEnablerExtension from '@components/grid/extension/filters-submit-button-enabler-extension'; import PositionExtension from '@components/grid/extension/position-extension'; +import LinkRowActionExtension from '@components/grid/extension/link-row-action-extension'; const {$} = window; @@ -48,4 +49,5 @@ $(() => { grid.addExtension(new BulkActionCheckboxExtension()); grid.addExtension(new FiltersSubmitButtonEnablerExtension()); grid.addExtension(new PositionExtension(grid)); + grid.addExtension(new LinkRowActionExtension()); }); diff --git a/src/Core/Grid/Definition/Factory/AttributeGridDefinitionFactory.php b/src/Core/Grid/Definition/Factory/AttributeGridDefinitionFactory.php index 6efc57c917a0a..9c3f395455b6c 100644 --- a/src/Core/Grid/Definition/Factory/AttributeGridDefinitionFactory.php +++ b/src/Core/Grid/Definition/Factory/AttributeGridDefinitionFactory.php @@ -159,6 +159,7 @@ protected function getColumns() 'extra_route_params' => [ 'attributeId' => 'id_attribute', ], + 'clickable_row' => true, ]) ) ->add( diff --git a/src/Core/Grid/Definition/Factory/AttributeGroupGridDefinitionFactory.php b/src/Core/Grid/Definition/Factory/AttributeGroupGridDefinitionFactory.php index 728ac8d153d46..7083c93397d00 100644 --- a/src/Core/Grid/Definition/Factory/AttributeGroupGridDefinitionFactory.php +++ b/src/Core/Grid/Definition/Factory/AttributeGroupGridDefinitionFactory.php @@ -120,6 +120,7 @@ protected function getColumns() 'route' => 'admin_attributes_index', 'route_param_name' => 'attributeGroupId', 'route_param_field' => 'id_attribute_group', + 'clickable_row' => true, ]) ) ->add((new LinkRowAction('edit'))