From 04d6d5ca99ebfd1cebb8ce06618fb3811fc1a8aa Mon Sep 17 00:00:00 2001 From: Charles Date: Thu, 9 Jan 2020 10:55:03 +0100 Subject: phpmyadmin working --- .../table/tracking/structure_snapshot_columns.twig | 56 ++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 srcs/phpmyadmin/templates/table/tracking/structure_snapshot_columns.twig (limited to 'srcs/phpmyadmin/templates/table/tracking/structure_snapshot_columns.twig') diff --git a/srcs/phpmyadmin/templates/table/tracking/structure_snapshot_columns.twig b/srcs/phpmyadmin/templates/table/tracking/structure_snapshot_columns.twig new file mode 100644 index 0000000..4ef8c21 --- /dev/null +++ b/srcs/phpmyadmin/templates/table/tracking/structure_snapshot_columns.twig @@ -0,0 +1,56 @@ +

{% trans 'Structure' %}

+ + + + + + + + + + + + + + + {% set index = 1 %} + {% for field in columns %} + + + {% set index = index + 1 %} + + + + + + + + + {% endfor %} + +
{% trans %}#{% context %}Number{% endtrans %}{% trans 'Column' %}{% trans 'Type' %}{% trans 'Collation' %}{% trans 'Null' %}{% trans 'Default' %}{% trans 'Extra' %}{% trans 'Comment' %}
{{ index }} + + {{ field['Field'] }} + {% if field['Key'] == 'PRI' %} + {{ get_image('b_primary', 'Primary'|trans) }} + {% elseif field['Key'] is not empty %} + {{ get_image('bd_primary', 'Index'|trans) }} + {% endif %} + + {{ field['Type'] }}{{ field['Collation'] }}{{ field['Null'] == 'YES' ? 'Yes'|trans : 'No'|trans }} + {% if field['Default'] is defined %} + {% set extracted_columnspec = extract_column_spec(field['Type']) %} + {% if extracted_columnspec['type'] == 'bit' %} + {# here, $field['Default'] contains something like b'010' #} + {{ field['Default']|convert_bit_default_value }} + {% else %} + {{ field['Default'] }} + {% endif %} + {% else %} + {% if field['Null'] == 'YES' %} + NULL + {% else %} + {% trans %}None{% context %}None for default{% endtrans %} + {% endif %} + {% endif %} + {{ field['Extra'] }}{{ field['Comment'] }}
-- cgit