From 8fab4a7bfb0de97a4049a752cb466375d7872c61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maur=C3=ADcio=20Meneghini=20Fauth?= Date: Tue, 24 Nov 2020 16:21:14 -0300 Subject: [PATCH] Use Bootstrap's table for the db structure page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: MaurĂ­cio Meneghini Fauth --- .../structure/body_for_table_summary.twig | 22 +++++----- .../structure/structure_table_row.twig | 42 +++++++++---------- .../database/structure/table_header.twig | 10 ++--- 3 files changed, 37 insertions(+), 37 deletions(-) diff --git a/templates/database/structure/body_for_table_summary.twig b/templates/database/structure/body_for_table_summary.twig index 1a21582b7b..9c6b8b9766 100644 --- a/templates/database/structure/body_for_table_summary.twig +++ b/templates/database/structure/body_for_table_summary.twig @@ -1,7 +1,7 @@ - + - - + + {% set num_tables_trans -%} {% trans %}%s table{% plural num_tables %}%s tables{% endtrans %} {%- endset %} @@ -14,7 +14,7 @@ {% if num_favorite_tables == 0 %} {% set sum_colspan = sum_colspan - 1 %} {% endif %} - {% trans 'Sum' %} + {% trans 'Sum' %} {% set row_count_sum = format_number(sum_entries, 0) %} {# If a table shows approximate rows count, display update-all-real-count anchor. #} {% set row_sum_url = [] %} @@ -34,7 +34,7 @@ {% else %} {% set cell_text = row_count_sum %} {% endif %} - {{ cell_text }} + {{ cell_text }} {% if not (properties_num_columns > 1) %} {# MySQL <= 5.5.2 #} {% set default_engine = dbi.fetchValue('SELECT @@storage_engine;') %} @@ -60,12 +60,12 @@ {% set sum = format_byte_down(sum_size, 3, 1) %} {% set sum_formatted = sum[0] %} {% set sum_unit = sum[1] %} - {{ sum_formatted }} {{ sum_unit }} + {{ sum_formatted }} {{ sum_unit }} {% set overhead = format_byte_down(overhead_size, 3, 1) %} {% set overhead_formatted = overhead[0] %} {% set overhead_unit = overhead[1] %} - {{ overhead_formatted }} {{ overhead_unit }} + {{ overhead_formatted }} {{ overhead_unit }} {% endif %} {% if show_charset %} @@ -75,19 +75,19 @@ {% endif %} {% if show_creation %} - + {{ create_time_all }} {% endif %} {% if show_last_update %} - + {{ update_time_all }} {% endif %} {% if show_last_check %} - + {{ check_time_all }} {% endif %} - + diff --git a/templates/database/structure/structure_table_row.twig b/templates/database/structure/structure_table_row.twig index dea94c2da9..45563d15b6 100644 --- a/templates/database/structure/structure_table_row.twig +++ b/templates/database/structure/structure_table_row.twig @@ -1,5 +1,5 @@ - + 0 %} - + {# Check if current table is already in favorite list #} {% set fav_params = { 'db': db, @@ -38,35 +38,35 @@ {% endif %} - + {{ may_have_rows ? get_icon('b_browse', 'Browse'|trans) : get_icon('bd_browse', 'Browse'|trans) }} - + {{ get_icon('b_props', 'Structure'|trans) }} - + {{ may_have_rows ? get_icon('b_select', 'Search'|trans) : get_icon('bd_select', 'Search'|trans) }} {% if not db_is_system_schema %} - + {{ get_icon('b_insrow', 'Insert'|trans) }} {% if table_is_view %} - + {{ get_icon('b_edit', 'Edit'|trans) }} {% else %} - + + {% if approx_rows %} + {{ formatted_size }} {{ unit }} - + {{ overhead|raw }} {% endif %} @@ -163,32 +163,32 @@ {% endif %} {% if show_creation %} - + {{ create_time }} {% endif %} {% if show_last_update %} - + {{ update_time }} {% endif %} {% if show_last_check %} - + {{ check_time }} {% endif %} {% elseif table_is_view %} - - + - {% trans 'View' %} --- {% if is_show_stats %} - - - - + - + - {% endif %} {% if show_charset %} @@ -197,13 +197,13 @@ {% endif %} {% if show_creation %} - - + - {% endif %} {% if show_last_update %} - - + - {% endif %} {% if show_last_check %} - - + - {% endif %} {% else %} diff --git a/templates/database/structure/table_header.twig b/templates/database/structure/table_header.twig index fc85f2f1ae..edb822191b 100644 --- a/templates/database/structure/table_header.twig +++ b/templates/database/structure/table_header.twig @@ -1,10 +1,10 @@
{{ get_hidden_inputs(db) }} -
- - +
+
+ - + {% if replication %} @@ -18,7 +18,7 @@ {% if num_favorite_tables > 0 %} {% set action_colspan = action_colspan + 1 %} {% endif %} - {# larger values are more interesting so default sort order is DESC #}
{{ sortable_table_header('Table'|trans, 'table') }}{% trans 'Replication' %} + {% trans 'Action' %}