From acd80e2f186d6fab3c9d8baaba1652387448421f Mon Sep 17 00:00:00 2001 From: Sami Mokaddem Date: Wed, 10 Nov 2021 09:30:23 +0100 Subject: [PATCH] chg: [genericElement:index_table] Small UI improvement for column visibility selector --- .../genericElements/ListTopBar/group_table_action.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/templates/element/genericElements/ListTopBar/group_table_action.php b/templates/element/genericElements/ListTopBar/group_table_action.php index bee116e..71380f9 100644 --- a/templates/element/genericElements/ListTopBar/group_table_action.php +++ b/templates/element/genericElements/ListTopBar/group_table_action.php @@ -21,7 +21,6 @@ if (!empty($meta_templates)) { $numberActiveMetaField = !empty($tableSettings['visible_meta_column'][$meta_template->id]) ? count($tableSettings['visible_meta_column'][$meta_template->id]) : 0; $metaTemplateColumnMenu[] = [ 'text' => $meta_template->name, - 'icon' => 'object-group', 'badge' => [ 'text' => $numberActiveMetaField, 'variant' => 'secondary', @@ -40,7 +39,12 @@ if (!empty($meta_templates)) { ]; } } -$indexColumnMenu = array_merge([['html' => $availableColumnsHtml]], $metaTemplateColumnMenu); +$indexColumnMenu = array_merge( + [['header' => true, 'text' => sprintf('%s\'s fields', $this->request->getParam('controller'))]], + [['html' => $availableColumnsHtml]], + [['header' => true, 'text' => __('Meta Templates'), 'icon' => 'object-group',]], + $metaTemplateColumnMenu +); $compactDisplayHtml = $this->element('/genericElements/ListTopBar/group_table_action/compactDisplay', [ 'table_data' => $table_data,