table_fields_definitions.twig 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <div class="responsivetable">
  2. <table id="table_columns" class="noclick">
  3. <caption class="tblHeaders">
  4. {% trans 'Structure' %}
  5. {{ Util_showMySQLDocu('CREATE_TABLE') }}
  6. </caption>
  7. <tr>
  8. <th>
  9. {% trans 'Name' %}
  10. </th>
  11. <th>
  12. {% trans 'Type' %}
  13. {{ Util_showMySQLDocu('data-types') }}
  14. </th>
  15. <th>
  16. {% trans 'Length/Values' %}
  17. {{ Util_showHint('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) }}
  18. </th>
  19. <th>
  20. {% trans 'Default' %}
  21. {{ Util_showHint('For default values, please enter just a single value, without backslash escaping or quotes, using this format: a'|trans) }}
  22. </th>
  23. <th>
  24. {% trans 'Collation' %}
  25. </th>
  26. <th>
  27. {% trans 'Attributes' %}
  28. </th>
  29. <th>
  30. {% trans 'Null' %}
  31. </th>
  32. {# Only for 'Edit' Column(s) #}
  33. {% if change_column is defined and change_column is not empty %}
  34. <th>
  35. {% trans 'Adjust privileges' %}
  36. {{ Util_showDocu('faq', 'faq6-39') }}
  37. </th>
  38. {% endif %}
  39. {# We could remove this 'if' and let the key information be shown and
  40. editable. However, for this to work, structure.lib.php must be
  41. modified to use the key fields, as tbl_addfield does. #}
  42. {% if not is_backup %}
  43. <th>
  44. {% trans 'Index' %}
  45. </th>
  46. {% endif %}
  47. <th>
  48. <abbr title="AUTO_INCREMENT">A_I</abbr>
  49. </th>
  50. <th>
  51. {% trans 'Comments' %}
  52. </th>
  53. {% if is_virtual_columns_supported %}
  54. <th>
  55. {% trans 'Virtuality' %}
  56. </th>
  57. {% endif %}
  58. {% if fields_meta is defined %}
  59. <th>
  60. {% trans 'Move column' %}
  61. </th>
  62. {% endif %}
  63. {% if mimework and browse_mime %}
  64. <th>
  65. {% trans 'MIME type' %}
  66. </th>
  67. <th>
  68. <a href="transformation_overview.php
  69. {{- Url_getCommon() }}#transformation" title="
  70. {%- trans 'List of available transformations and their options' -%}
  71. " target="_blank">
  72. {% trans 'Browser display transformation' %}
  73. </a>
  74. </th>
  75. <th>
  76. {% trans 'Browser display transformation options' %}
  77. {{ Util_showHint('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) }}
  78. </th>
  79. <th>
  80. <a href="transformation_overview.php{{ Url_getCommon() }}#input_transformation"
  81. title="{% trans 'List of available transformations and their options' %}"
  82. target="_blank">
  83. {% trans 'Input transformation' %}
  84. </a>
  85. </th>
  86. <th>
  87. {% trans 'Input transformation options' %}
  88. {{ Util_showHint('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) }}
  89. </th>
  90. {% endif %}
  91. </tr>
  92. {% set options = {'': '', 'VIRTUAL': 'VIRTUAL'} %}
  93. {% if server_type == 'MariaDB' %}
  94. {% set options = options|merge({'PERSISTENT': 'PERSISTENT'}) %}
  95. {% set options = options|merge({'STORED': 'STORED'}) %}
  96. {% else %}
  97. {% set options = options|merge({'STORED': 'STORED'}) %}
  98. {% endif %}
  99. {% for content_row in content_cells %}
  100. <tr>
  101. {% include 'columns_definitions/column_attributes.twig' with content_row|merge({
  102. 'options': options,
  103. 'change_column': change_column,
  104. 'is_virtual_columns_supported': is_virtual_columns_supported,
  105. 'browse_mime': browse_mime,
  106. 'max_rows': max_rows,
  107. 'char_editing': char_editing,
  108. 'attribute_types': attribute_types,
  109. 'privs_available': privs_available,
  110. 'max_length': max_length,
  111. 'dbi': dbi,
  112. 'disable_is': disable_is
  113. }) only %}
  114. </tr>
  115. {% endfor %}
  116. </table>
  117. </div>