table_structure_row.twig 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <td class="center print_ignore">
  2. <input type="checkbox" class="checkall" name="selected_fld[]" value="{{ row['Field'] }}" id="checkbox_row_{{ rownum }}"/>
  3. </td>
  4. <td class="right">{{ rownum }}</td>
  5. <th class="nowrap">
  6. <label for="checkbox_row_{{ rownum }}">
  7. {{ displayed_field_name|raw }}
  8. </label>
  9. </th>
  10. <td {{ type_nowrap }}>
  11. <bdo dir="ltr" lang="en">
  12. {{ extracted_columnspec['displayed_type']|raw }}
  13. {% if relation_commwork and relation_mimework and browse_mime
  14. and mime_map[row['Field']]['mimetype'] is defined %}
  15. <br />MIME: {{ mime_map[row['Field']]['mimetype']|replace({'_': '/'})|lower }}
  16. {% endif %}
  17. </bdo>
  18. </td>
  19. <td>
  20. {% if field_charset is not empty %}
  21. <dfn title="{{ Charsets_getCollationDescr(field_charset) }}">{{ field_charset }}</dfn>
  22. {% endif %}
  23. </td>
  24. <td class="column_attribute nowrap">{{ attribute }}</td>
  25. <td>{{ row['Null'] == 'YES' ? 'Yes'|trans : 'No'|trans }}</td>
  26. <td class="nowrap">
  27. {% if row['Default'] is not null %}
  28. {% if extracted_columnspec['type'] == 'bit' %}
  29. {{ Util_convertBitDefaultValue(row['Default']) }}
  30. {% else %}
  31. {{ row['Default']|raw }}
  32. {% endif %}
  33. {% else %}
  34. <em>{% trans %}None{% context %}None for default{% endtrans %}</em>
  35. {% endif %}
  36. </td>
  37. {% if show_column_comments %}
  38. <td>
  39. {{ comments }}
  40. </td>
  41. {% endif %}
  42. <td class="nowrap">{{ row['Extra']|upper }}</td>
  43. {% if not tbl_is_view and not db_is_system_schema %}
  44. <td class="edit center print_ignore">
  45. <a class="change_column_anchor ajax" href="tbl_structure.php
  46. {{- url_query }}&amp;field={{ row['Field']|url_encode }}&amp;change_column=1">
  47. {{ titles['Change']|raw }}
  48. </a>
  49. </td>
  50. <td class="drop center print_ignore">
  51. <a class="drop_column_anchor ajax" href="sql.php" data-post="{{ url_query }}&amp;sql_query=
  52. {{- ('ALTER TABLE ' ~ Util_backquote(table)
  53. ~ ' DROP ' ~ Util_backquote(row['Field']) ~ ';')|url_encode -}}
  54. &amp;dropped_column={{ row['Field']|url_encode }}&amp;purge=1&amp;message_to_show=
  55. {{- ('Column %s has been dropped.'|trans|format(row['Field']|e))|url_encode }}">
  56. {{ titles['Drop']|raw }}
  57. </a>
  58. </td>
  59. {% endif %}