aboutsummaryrefslogtreecommitdiff
path: root/srcs/phpmyadmin/templates/columns_definitions/table_fields_definitions.twig
blob: f23b2fe6fb14406add0024cc067e1b764db5a0af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<div class="responsivetable">
<table id="table_columns" class="noclick">
    <caption class="tblHeaders">
        {% trans 'Structure' %}
        {{ show_mysql_docu('CREATE_TABLE') }}
    </caption>
    <tr>
        <th>
            {% trans 'Name' %}
        </th>
        <th>
            {% trans 'Type' %}
            {{ show_mysql_docu('data-types') }}
        </th>
        <th>
            {% trans 'Length/Values' %}
            {{ show_hint('If column type is "enum" or "set", please enter the values using this format: \'a\',\'b\',\'c\'…<br>If you ever need to put a backslash ("\") or a single quote ("\'") amongst those values, precede it with a backslash (for example \'\\\\xyz\' or \'a\\\'b\').'|trans) }}
        </th>
        <th>
            {% trans 'Default' %}
            {{ show_hint('For default values, please enter just a single value, without backslash escaping or quotes, using this format: a'|trans) }}
        </th>
        <th>
            {% trans 'Collation' %}
        </th>
        <th>
            {% trans 'Attributes' %}
        </th>
        <th>
            {% trans 'Null' %}
        </th>

        {# Only for 'Edit' Column(s) #}
        {% if change_column is defined and change_column is not empty %}
            <th>
                {% trans 'Adjust privileges' %}
                {{ show_docu('faq', 'faq6-39') }}
            </th>
        {% endif %}

        {# We could remove this 'if' and let the key information be shown and
           editable. However, for this to work, structure.lib.php must be
           modified to use the key fields, as tbl_addfield does. #}
        {% if not is_backup %}
            <th>
                {% trans 'Index' %}
            </th>
        {% endif %}

        <th>
            <abbr title="AUTO_INCREMENT">A_I</abbr>
        </th>
        <th>
            {% trans 'Comments' %}
        </th>

        {% if is_virtual_columns_supported %}
            <th>
                {% trans 'Virtuality' %}
            </th>
        {% endif %}

        {% if fields_meta is defined %}
            <th>
                {% trans 'Move column' %}
            </th>
        {% endif %}

        {% if mimework and browse_mime %}
            <th>
                {% trans 'Media (MIME) type' %}
            </th>
            <th>
                <a href="transformation_overview.php
                    {{- get_common() }}#transformation" title="
                    {%- trans 'List of available transformations and their options' -%}
                    " target="_blank">
                    {% trans 'Browser display transformation' %}
                </a>
            </th>
            <th>
                {% trans 'Browser display transformation options' %}
                {{ show_hint('Please enter the values for transformation options using this format: \'a\', 100, b,\'c\'…<br>If you ever need to put a backslash ("\\") or a single quote ("\'") amongst those values, precede it with a backslash (for example \'\\\\xyz\' or \'a\\\'b\').'|trans) }}
            </th>
            <th>
                <a href="transformation_overview.php{{ get_common() }}#input_transformation"
                   title="{% trans 'List of available transformations and their options' %}"
                   target="_blank">
                    {% trans 'Input transformation' %}
                </a>
            </th>
            <th>
                {% trans 'Input transformation options' %}
                {{ show_hint('Please enter the values for transformation options using this format: \'a\', 100, b,\'c\'…<br>If you ever need to put a backslash ("\\") or a single quote ("\'") amongst those values, precede it with a backslash (for example \'\\\\xyz\' or \'a\\\'b\').'|trans) }}
            </th>
        {% endif %}
    </tr>
    {% set options = {'': '', 'VIRTUAL': 'VIRTUAL'} %}
    {% if server_type == 'MariaDB' %}
        {% set options = options|merge({'PERSISTENT': 'PERSISTENT'}) %}
        {% set options = options|merge({'STORED': 'STORED'}) %}
    {% else %}
        {% set options = options|merge({'STORED': 'STORED'}) %}
    {% endif %}
    {% for content_row in content_cells %}
        <tr>
            {% include 'columns_definitions/column_attributes.twig' with content_row|merge({
                'options': options,
                'change_column': change_column,
                'is_virtual_columns_supported': is_virtual_columns_supported,
                'browse_mime': browse_mime,
                'max_rows': max_rows,
                'char_editing': char_editing,
                'attribute_types': attribute_types,
                'privs_available': privs_available,
                'max_length': max_length,
                'charsets': charsets
            }) only %}
        </tr>
    {% endfor %}
</table>
</div>