diff --git a/templates/table/search/fields_table.twig b/templates/table/search/fields_table.twig index df625ec085..8b749399f9 100644 --- a/templates/table/search/fields_table.twig +++ b/templates/table/search/fields_table.twig @@ -1,7 +1,16 @@ - {% include 'table/search/table_header.twig' with { - 'geom_column_flag': geom_column_flag - } only %} + + + {% if geom_column_flag %} + + {% endif %} + + + + + + + {% if search_type == 'zoom' %} {% include 'table/search/rows_zoom.twig' with { diff --git a/templates/table/search/options.twig b/templates/table/search/options.twig deleted file mode 100644 index 99ae985126..0000000000 --- a/templates/table/search/options.twig +++ /dev/null @@ -1,67 +0,0 @@ -{{ Util_getDivForSliderEffect('searchoptions', 'Options'|trans) }} - -{# Displays columns select list for selecting distinct columns in the search #} -
- - {% trans 'Select columns (at least one):' %} - - - - -
- -{# Displays input box for custom 'Where' clause to be used in the search #} -
- - {% trans 'Or' %} - {% trans 'Add search conditions (body of the "where" clause):' %} - - {{ Util_showMySQLDocu('Functions') }} - -
- -{# Displays option of changing default number of rows displayed per page #} -
- {% trans 'Number of rows per page' %} - -
- -{# Displays option for ordering search results by a column value (Asc or Desc) #} -
- {% trans 'Display order:' %} - - - {{ Util_getRadioFields( - 'order', - { - 'ASC': 'Ascending'|trans, - 'DESC': 'Descending'|trans - }, - 'ASC', - false, - true, - 'formelement' - ) }} - -
-
diff --git a/templates/table/search/options_zoom.twig b/templates/table/search/options_zoom.twig deleted file mode 100644 index 328eb4aea3..0000000000 --- a/templates/table/search/options_zoom.twig +++ /dev/null @@ -1,43 +0,0 @@ -
{% trans 'Function' %}{% trans 'Column' %}{% trans 'Type' %}{% trans 'Collation' %}{% trans 'Operator' %}{% trans 'Value' %}
- {# Select options for data label #} - - - - - {# Inputbox for changing default maximum rows to plot #} - - - - -
- - - -
- - - -
diff --git a/templates/table/search/search_and_replace.twig b/templates/table/search/search_and_replace.twig deleted file mode 100644 index 8237dd599e..0000000000 --- a/templates/table/search/search_and_replace.twig +++ /dev/null @@ -1,25 +0,0 @@ -{% trans 'Find:' %} - -{% trans 'Replace with:' %} - - -{% trans 'Column:' %} - - -{% include 'checkbox.twig' with { - 'html_field_id': 'useRegex', - 'html_field_name': 'useRegex', - 'label': 'Use regular expression'|trans, - 'checked': false, - 'onclick': false -} only %} diff --git a/templates/table/search/selection_form.twig b/templates/table/search/selection_form.twig index 38061f7b33..ab8cc25bb4 100644 --- a/templates/table/search/selection_form.twig +++ b/templates/table/search/selection_form.twig @@ -21,12 +21,49 @@ 'keys' : keys, 'criteria_column_names': criteria_column_names, 'criteria_column_types': criteria_column_types - } only %} - {% include 'table/search/options_zoom.twig' with { - 'data_label': data_label, - 'column_names': column_names, - 'max_plot_limit': max_plot_limit - } only %} + } only %} + {# Select options for data label #} + + + + + {# Inputbox for changing default maximum rows to plot #} + + + + +
+ + + +
+ + + +
{% elseif search_type == 'normal' %} @@ -57,10 +94,73 @@
- {% include 'table/search/options.twig' with { - 'column_names': column_names, - 'max_rows': max_rows - } only %} + {{ Util_getDivForSliderEffect('searchoptions', 'Options'|trans) }} + + {# Displays columns select list for selecting distinct columns in the search #} +
+ + {% trans 'Select columns (at least one):' %} + + + + +
+ + {# Displays input box for custom 'Where' clause to be used in the search #} +
+ + {% trans 'Or' %} + {% trans 'Add search conditions (body of the "where" clause):' %} + + {{ Util_showMySQLDocu('Functions') }} + +
+ + {# Displays option of changing default number of rows displayed per page #} +
+ {% trans 'Number of rows per page' %} + +
+ + {# Displays option for ordering search results by a column value (Asc or Desc) #} +
+ {% trans 'Display order:' %} + + + {{ Util_getRadioFields( + 'order', + { + 'ASC': 'Ascending'|trans, + 'DESC': 'Descending'|trans + }, + 'ASC', + false, + true, + 'formelement' + ) }} + +
+
{% elseif search_type == 'replace' %} {% include 'table/search/form_tag.twig' with { @@ -74,12 +174,30 @@
{% trans 'Find and replace' %} - - {% include 'table/search/search_and_replace.twig' with { - 'column_names': column_names, - 'column_types': column_types, - 'sql_types': sql_types, - 'types': types + {% trans 'Find:' %} + + {% trans 'Replace with:' %} + + + {% trans 'Column:' %} + + + {% include 'checkbox.twig' with { + 'html_field_id': 'useRegex', + 'html_field_name': 'useRegex', + 'label': 'Use regular expression'|trans, + 'checked': false, + 'onclick': false } only %}
diff --git a/templates/table/search/table_header.twig b/templates/table/search/table_header.twig deleted file mode 100644 index 4093f5bfc5..0000000000 --- a/templates/table/search/table_header.twig +++ /dev/null @@ -1,12 +0,0 @@ - - - {% if geom_column_flag %} - {% trans 'Function' %} - {% endif %} - {% trans 'Column' %} - {% trans 'Type' %} - {% trans 'Collation' %} - {% trans 'Operator' %} - {% trans 'Value' %} - - diff --git a/templates/table/structure/actions_in_table_structure.twig b/templates/table/structure/actions_in_table_structure.twig deleted file mode 100644 index 6607f851da..0000000000 --- a/templates/table/structure/actions_in_table_structure.twig +++ /dev/null @@ -1,140 +0,0 @@ - diff --git a/templates/table/structure/add_column.twig b/templates/table/structure/add_column.twig deleted file mode 100644 index 9c88c0a2d2..0000000000 --- a/templates/table/structure/add_column.twig +++ /dev/null @@ -1,24 +0,0 @@ -
- {{ Url_getHiddenInputs(db, table) }} - {% if Util_showIcons('ActionLinksMode') %} - {{ Util_getImage('b_insrow', 'Add column'|trans) }}  - {% endif %} - {% set num_fields -%} - - {%- endset %} - {{ 'Add %s column(s)'|trans|format(num_fields)|raw }} -   - {# I tried displaying the drop-down inside the label but with Firefox the drop-down was blinking #} - - -
diff --git a/templates/table/structure/check_all_table_column.twig b/templates/table/structure/check_all_table_column.twig deleted file mode 100644 index 57e6e11220..0000000000 --- a/templates/table/structure/check_all_table_column.twig +++ /dev/null @@ -1,93 +0,0 @@ - diff --git a/templates/table/structure/display_structure.twig b/templates/table/structure/display_structure.twig index e1f3b9ee07..1e5aea5caa 100644 --- a/templates/table/structure/display_structure.twig +++ b/templates/table/structure/display_structure.twig @@ -12,11 +12,27 @@
{# Table header #} - {% include 'table/structure/table_structure_header.twig' with { - 'db_is_system_schema': db_is_system_schema, - 'tbl_is_view': tbl_is_view, - 'show_column_comments': show_column_comments - } only %} + + + + + + + + + + + {% if show_column_comments -%} + + {%- endif %} + + {# @see tbl_structure.js, function moreOptsMenuResize() #} + {% if not db_is_system_schema and not tbl_is_view %} + + {% endif %} + + {# Table body #} {% set rownum = 0 %} @@ -30,64 +46,325 @@ {# Underline commented fields and display a hover-title (CSS only) #} - {% include 'table/structure/table_structure_row.twig' with { - 'row': row, - 'rownum': rownum, - 'displayed_field': displayed_fields[rownum], - 'type_nowrap': Util_getClassForType(extracted_columnspec['type']), - 'extracted_columnspec': extracted_columnspec, - 'attribute': attributes[rownum], - 'tbl_is_view': tbl_is_view, - 'db_is_system_schema': db_is_system_schema, - 'url_query': url_query, - 'titles': titles, - 'table': table, - 'tbl_storage_engine': tbl_storage_engine, - 'field_charset': row['Collation'], - 'comments': comments, - 'show_column_comments': show_column_comments, - 'relation_commwork': relation_commwork, - 'relation_mimework': relation_mimework, - 'browse_mime': browse_mime - } only %} + + + + + + + + + {% if show_column_comments %} + + {% endif %} + {% if not tbl_is_view and not db_is_system_schema %} - {% include 'table/structure/actions_in_table_structure.twig' with { - 'row': row, - 'rownum': rownum, - 'extracted_columnspec': extracted_columnspec, - 'type': extracted_columnspec['print_type'] is not empty ? extracted_columnspec['print_type'], - 'tbl_storage_engine': tbl_storage_engine, - 'primary': primary, - 'field_name': field_name, - 'url_query': url_query, - 'titles': titles, - 'columns_with_unique_index': columns_with_unique_index, - 'is_in_central_columns': row['Field'] in central_list ? true : false, - 'central_columns_work': central_columns_work, - 'table': table, - 'hide_structure_actions': hide_structure_actions, - 'mysql_int_version': mysql_int_version - } only %} + + + {% endif %} + + {% if not tbl_is_view and not db_is_system_schema %} + {% set type = extracted_columnspec['print_type'] is not empty ? extracted_columnspec['print_type'] %} + {% endif %} {% endfor %}
#{% trans 'Name' %}{% trans 'Type' %}{% trans 'Collation' %}{% trans 'Attributes' %}{% trans 'Null' %}{% trans 'Default' %}{% trans 'Comments' %}{% trans 'Extra' %}{% trans 'Action' %}
{{ rownum }} + + + + {{ extracted_columnspec['displayed_type']|raw }} + {% if relation_commwork and relation_mimework and browse_mime + and mime_map[row['Field']]['mimetype'] is defined %} +
MIME: {{ mime_map[row['Field']]['mimetype']|replace({'_': '/'})|lower }} + {% endif %} +
+
+ {% if row['Collation'] is not empty %} + {{ row['Collation'] }} + {% endif %} + {{ attributes[rownum] }}{{ row['Null'] == 'YES' ? 'Yes'|trans : 'No'|trans }} + {% if row['Default'] is not null %} + {% if extracted_columnspec['type'] == 'bit' %} + {{ Util_convertBitDefaultValue(row['Default']) }} + {% else %} + {{ row['Default']|raw }} + {% endif %} + {% else %} + {% trans %}None{% context %}None for default{% endtrans %} + {% endif %} + + {{ comments }} + {{ row['Extra']|upper }}
- {% include 'table/structure/check_all_table_column.twig' with { - 'pma_theme_image': pma_theme_image, - 'text_dir': text_dir, - 'tbl_is_view': tbl_is_view, - 'db_is_system_schema': db_is_system_schema, - 'tbl_storage_engine': tbl_storage_engine, - 'central_columns_work': central_columns_work - } only %} + -{% include 'table/structure/move_columns_dialog.twig' with { - 'db': db, - 'table': table -} only %} +
+

{% trans 'Move the columns by dragging them up and down.' %}

+
+
+ {{ Url_getHiddenInputs(db, table) }} +
    +
    +
    +
    {# Work on the table #} {% if not tbl_is_view and not db_is_system_schema %} - {% include 'table/structure/add_column.twig' with { - 'columns_list': columns_list, - 'db': db, - 'table': table - } only %} +
    + {{ Url_getHiddenInputs(db, table) }} + {% if Util_showIcons('ActionLinksMode') %} + {{ Util_getImage('b_insrow', 'Add column'|trans) }}  + {% endif %} + {% set num_fields -%} + + {%- endset %} + {{ 'Add %s column(s)'|trans|format(num_fields)|raw }} +   + {# I tried displaying the drop-down inside the label but with Firefox the drop-down was blinking #} + + +
    {% endif %} {# Displays indexes #} diff --git a/templates/table/structure/display_table_stats.twig b/templates/table/structure/display_table_stats.twig index 14e6ab332d..2fd7e29e48 100644 --- a/templates/table/structure/display_table_stats.twig +++ b/templates/table/structure/display_table_stats.twig @@ -67,13 +67,102 @@ {% endif %} - {% include 'table/structure/row_stats_table.twig' with { - 'showtable': showtable, - 'tbl_collation': tbl_collation, - 'is_innodb': is_innodb, - 'mergetable': mergetable, - 'avg_size': avg_size is defined ? avg_size : null, - 'avg_unit': avg_unit is defined ? avg_unit : null - } only %} + {% set avg_size = avg_size is defined ? avg_size : null %} + {% set avg_unit = avg_unit is defined ? avg_unit : null %} + + + + {% if showtable['Row_format'] is defined %} + + + {% if showtable['Row_format'] == 'Fixed' %} + + {% elseif showtable['Row_format'] == 'Dynamic' %} + + {% else %} + + {% endif %} + + {% endif %} + + {% if showtable['Create_options'] is not empty %} + + + {% if showtable['Create_options'] == 'partitioned' %} + + {% else %} + + {% endif %} + + {% endif %} + + {% if tbl_collation is not empty %} + + + + + {% endif %} + + {% if not is_innodb and showtable['Rows'] is defined %} + + + + + {% endif %} + + {% if not is_innodb + and showtable['Avg_row_length'] is defined + and showtable['Avg_row_length'] > 0 %} + + + {% set avg_row_length = Util_formatByteDown(showtable['Avg_row_length'], 6, 1) %} + + + {% endif %} + + {% if not is_innodb + and showtable['Data_length'] is defined + and showtable['Rows'] is defined + and showtable['Rows'] > 0 + and mergetable == false %} + + + + + {% endif %} + + {% if showtable['Auto_increment'] is defined %} + + + + + {% endif %} + + {% if showtable['Create_time'] is defined %} + + + + + {% endif %} + + {% if showtable['Update_time'] is defined %} + + + + + {% endif %} + + {% if showtable['Check_time'] is defined %} + + + + + {% endif %} + +
    {% trans 'Row statistics' %}
    {% trans 'Format' %}{% trans 'static' %}{% trans 'dynamic' %}{{ showtable['Row_format'] }}
    {% trans 'Options' %}{% trans 'partitioned' %}{{ showtable['Create_options'] }}
    {% trans 'Collation' %} + + {{ tbl_collation }} + +
    {% trans 'Rows' %}{{ Util_formatNumber(showtable['Rows'], 0) }}
    {% trans 'Row length' %}{{ avg_row_length[0] }} {{ avg_row_length[1] }}
    {% trans 'Row size' %}{{ avg_size }} {{ avg_unit }}
    {% trans 'Next autoindex' %}{{ Util_formatNumber(showtable['Auto_increment'], 0) }}
    {% trans 'Creation' %}{{ Util_localisedDate(showtable['Create_time']|date('U')) }}
    {% trans 'Last update' %}{{ Util_localisedDate(showtable['Update_time']|date('U')) }}
    {% trans 'Last check' %}{{ Util_localisedDate(showtable['Check_time']|date('U')) }}
    diff --git a/templates/table/structure/move_columns_dialog.twig b/templates/table/structure/move_columns_dialog.twig deleted file mode 100644 index bf826952a0..0000000000 --- a/templates/table/structure/move_columns_dialog.twig +++ /dev/null @@ -1,9 +0,0 @@ -
    -

    {% trans 'Move the columns by dragging them up and down.' %}

    -
    -
    - {{ Url_getHiddenInputs(db, table) }} -
      -
      -
      -
      diff --git a/templates/table/structure/optional_action_links.twig b/templates/table/structure/optional_action_links.twig deleted file mode 100644 index fe7cce13ff..0000000000 --- a/templates/table/structure/optional_action_links.twig +++ /dev/null @@ -1,31 +0,0 @@ -{{ Util_getIcon('b_print', 'Print'|trans, true) }} -{% if not tbl_is_view and not db_is_system_schema %} - - {{ Util_getIcon( - 'b_tblanalyse', - 'Propose table structure'|trans, - true - ) }} - - {{ Util_showMySQLDocu('procedure_analyse') }} - {% if is_active %} - - {{ Util_getIcon('eye', 'Track table'|trans, true) }} - - {% endif %} - - {{ Util_getIcon('b_move', 'Move columns'|trans, true) }} - - - {{ Util_getIcon('normalize', 'Normalize'|trans, true) }} - -{% endif %} -{% if tbl_is_view and not db_is_system_schema %} - {% if is_active %} - - {{ Util_getIcon('eye', 'Track view'|trans, true) }} - - {% endif %} -{% endif %} diff --git a/templates/table/structure/row_stats_table.twig b/templates/table/structure/row_stats_table.twig deleted file mode 100644 index e176e904bd..0000000000 --- a/templates/table/structure/row_stats_table.twig +++ /dev/null @@ -1,95 +0,0 @@ - - - - {% if showtable['Row_format'] is defined %} - - - {% if showtable['Row_format'] == 'Fixed' %} - - {% elseif showtable['Row_format'] == 'Dynamic' %} - - {% else %} - - {% endif %} - - {% endif %} - - {% if showtable['Create_options'] is not empty %} - - - {% if showtable['Create_options'] == 'partitioned' %} - - {% else %} - - {% endif %} - - {% endif %} - - {% if tbl_collation is not empty %} - - - - - {% endif %} - - {% if not is_innodb and showtable['Rows'] is defined %} - - - - - {% endif %} - - {% if not is_innodb - and showtable['Avg_row_length'] is defined - and showtable['Avg_row_length'] > 0 %} - - - {% set avg_row_length = Util_formatByteDown(showtable['Avg_row_length'], 6, 1) %} - - - {% endif %} - - {% if not is_innodb - and showtable['Data_length'] is defined - and showtable['Rows'] is defined - and showtable['Rows'] > 0 - and mergetable == false %} - - - - - {% endif %} - - {% if showtable['Auto_increment'] is defined %} - - - - - {% endif %} - - {% if showtable['Create_time'] is defined %} - - - - - {% endif %} - - {% if showtable['Update_time'] is defined %} - - - - - {% endif %} - - {% if showtable['Check_time'] is defined %} - - - - - {% endif %} - -
      {% trans 'Row statistics' %}
      {% trans 'Format' %}{% trans 'static' %}{% trans 'dynamic' %}{{ showtable['Row_format'] }}
      {% trans 'Options' %}{% trans 'partitioned' %}{{ showtable['Create_options'] }}
      {% trans 'Collation' %} - - {{ tbl_collation }} - -
      {% trans 'Rows' %}{{ Util_formatNumber(showtable['Rows'], 0) }}
      {% trans 'Row length' %}{{ avg_row_length[0] }} {{ avg_row_length[1] }}
      {% trans 'Row size' %}{{ avg_size }} {{ avg_unit }}
      {% trans 'Next autoindex' %}{{ Util_formatNumber(showtable['Auto_increment'], 0) }}
      {% trans 'Creation' %}{{ Util_localisedDate(showtable['Create_time']|date('U')) }}
      {% trans 'Last update' %}{{ Util_localisedDate(showtable['Update_time']|date('U')) }}
      {% trans 'Last check' %}{{ Util_localisedDate(showtable['Check_time']|date('U')) }}
      diff --git a/templates/table/structure/table_structure_header.twig b/templates/table/structure/table_structure_header.twig deleted file mode 100644 index 5af12980a2..0000000000 --- a/templates/table/structure/table_structure_header.twig +++ /dev/null @@ -1,21 +0,0 @@ - - - - # - {% trans 'Name' %} - {% trans 'Type' %} - {% trans 'Collation' %} - {% trans 'Attributes' %} - {% trans 'Null' %} - {% trans 'Default' %} - {% if show_column_comments -%} - {% trans 'Comments' %} - {%- endif %} - {% trans 'Extra' %} - {# @see tbl_structure.js, function moreOptsMenuResize() #} - {% if not db_is_system_schema and not tbl_is_view %} - {% trans 'Action' %} - {% endif %} - - diff --git a/templates/table/structure/table_structure_row.twig b/templates/table/structure/table_structure_row.twig deleted file mode 100644 index dd48b3dcb8..0000000000 --- a/templates/table/structure/table_structure_row.twig +++ /dev/null @@ -1,64 +0,0 @@ - - - -{{ rownum }} - - - - - - {{ extracted_columnspec['displayed_type']|raw }} - {% if relation_commwork and relation_mimework and browse_mime - and mime_map[row['Field']]['mimetype'] is defined %} -
      MIME: {{ mime_map[row['Field']]['mimetype']|replace({'_': '/'})|lower }} - {% endif %} -
      - - -{% if field_charset is not empty %} - {{ field_charset }} -{% endif %} - -{{ attribute }} -{{ row['Null'] == 'YES' ? 'Yes'|trans : 'No'|trans }} - - {% if row['Default'] is not null %} - {% if extracted_columnspec['type'] == 'bit' %} - {{ Util_convertBitDefaultValue(row['Default']) }} - {% else %} - {{ row['Default']|raw }} - {% endif %} - {% else %} - {% trans %}None{% context %}None for default{% endtrans %} - {% endif %} - -{% if show_column_comments %} - - {{ comments }} - -{% endif %} -{{ row['Extra']|upper }} -{% if not tbl_is_view and not db_is_system_schema %} - - - {{ titles['Change']|raw }} - - - - - {{ titles['Drop']|raw }} - - -{% endif %}