From f717a9235d6605b041544940bf2e343c19e1b9ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maur=C3=ADcio=20Meneghini=20Fauth?= Date: Fri, 27 Nov 2020 23:29:58 -0300 Subject: [PATCH 01/15] Remove action_icons array from display_structure.twig MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maurício Meneghini Fauth --- .../table/structure/display_partitions.twig | 93 ++++++++++++++++--- .../table/structure/display_structure.twig | 13 --- 2 files changed, 80 insertions(+), 26 deletions(-) diff --git a/templates/table/structure/display_partitions.twig b/templates/table/structure/display_partitions.twig index b026a66360..0520d46f01 100644 --- a/templates/table/structure/display_partitions.twig +++ b/templates/table/structure/display_partitions.twig @@ -74,18 +74,85 @@ {{ index_length[1] }} {{ partition.getComment() }} - {% for action, icon in action_icons %} - - - {{ icon|raw }} - - - {% endfor %} + + + + {{ get_icon('b_search', 'Analyze'|trans) }} + + + + + + {{ get_icon('eye', 'Check'|trans) }} + + + + + + {{ get_icon('normalize', 'Optimize'|trans) }} + + + + + + {{ get_icon('s_tbl', 'Rebuild'|trans) }} + + + + + + {{ get_icon('b_tblops', 'Repair'|trans) }} + + + + + + {{ get_icon('b_empty', 'Truncate'|trans) }} + + + + {% if range_or_list %} + + + {{ get_icon('b_drop', 'Drop'|trans) }} + + + {% endif %} {% if has_sub_partitions %} {% for sub_partition in partition.getSubPartitions() %} @@ -140,7 +207,7 @@ 'sql_query': 'ALTER TABLE ' ~ backquote(table) ~ ' REMOVE PARTITIONING' }), 'Remove partitioning'|trans, { - 'class': 'button ajax', + 'class': 'btn btn-secondary ajax', 'id': 'remove_partitioning' }) }} diff --git a/templates/table/structure/display_structure.twig b/templates/table/structure/display_structure.twig index 7c9359fb5b..65f3e2debb 100644 --- a/templates/table/structure/display_structure.twig +++ b/templates/table/structure/display_structure.twig @@ -528,18 +528,6 @@ {% set first_sub_partition = sub_partitions[0] %} {% endif %} - {% set action_icons = { - 'ANALYZE': get_icon('b_search', 'Analyze'|trans), - 'CHECK': get_icon('eye', 'Check'|trans), - 'OPTIMIZE': get_icon('normalize', 'Optimize'|trans), - 'REBUILD': get_icon('s_tbl', 'Rebuild'|trans), - 'REPAIR': get_icon('b_tblops', 'Repair'|trans), - 'TRUNCATE': get_icon('b_empty', 'Truncate'|trans), - } %} - {% if range_or_list %} - {% set action_icons = action_icons|merge({'DROP': get_icon('b_drop', 'Drop'|trans)}) %} - {% endif %} -