index.twig 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <h1>{{ database }}</h1>
  2. {% if comment is not empty %}
  3. <p>{% trans 'Database comment:' %} <em>{{ comment }}</em></p>
  4. {% endif %}
  5. <div>
  6. {% for table in tables %}
  7. <div>
  8. <h2>{{ table.name }}</h2>
  9. {% if table.comment is not empty %}
  10. <p>{% trans 'Table comments:' %} <em>{{ table.comment }}</em></p>
  11. {% endif %}
  12. <table class="print">
  13. <tr>
  14. <th>{% trans 'Column' %}</th>
  15. <th>{% trans 'Type' %}</th>
  16. <th>{% trans 'Null' %}</th>
  17. <th>{% trans 'Default' %}</th>
  18. {% if table.has_relation %}
  19. <th>{% trans 'Links to' %}</th>
  20. {% endif %}
  21. <th>{% trans 'Comments' %}</th>
  22. {% if table.has_mime %}
  23. <th>{% trans 'Media (MIME) type' %}</th>
  24. {% endif %}
  25. </tr>
  26. {% for column in table.columns %}
  27. <tr>
  28. <td class="nowrap">
  29. {{ column.name }}
  30. {% if column.has_primary_key %}
  31. <em>({% trans 'Primary' %})</em>
  32. {% endif %}
  33. </td>
  34. <td lang="en" dir="ltr"{{ 'set' != column.type and 'enum' != column.type ? ' class="nowrap"' }}>
  35. {{ column.print_type }}
  36. </td>
  37. <td>{{ column.is_nullable ? 'Yes'|trans : 'No'|trans }}</td>
  38. <td class="nowrap">
  39. {% if column.default is null and column.is_nullable %}
  40. <em>NULL</em>
  41. {% else %}
  42. {{ column.default }}
  43. {% endif %}
  44. </td>
  45. {% if table.has_relation %}
  46. <td>{{ column.relation }}</td>
  47. {% endif %}
  48. <td>{{ column.comment }}</td>
  49. {% if table.has_mime %}
  50. <td>{{ column.mime }}</td>
  51. {% endif %}
  52. </tr>
  53. {% endfor %}
  54. </table>
  55. {{ table.indexes_table|raw }}
  56. </div>
  57. {% endfor %}
  58. </div>
  59. <p class="print_ignore">
  60. <input type="button" class="btn btn-secondary button" id="print" value="{% trans 'Print' %}">
  61. </p>