aboutsummaryrefslogtreecommitdiff
path: root/srcs/phpmyadmin/templates/database/data_dictionary/index.twig
blob: 2f5dc5ab72650bd34449a01da857dab7006ac4f0 (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
<h1>{{ database }}</h1>
{% if comment is not empty %}
  <p>{% trans 'Database comment:' %} <em>{{ comment }}</em></p>
{% endif %}

<div>
  {% for table in tables %}
    <div>
      <h2>{{ table.name }}</h2>
      {% if table.comment is not empty %}
        <p>{% trans 'Table comments:' %} <em>{{ table.comment }}</em></p>
      {% endif %}

      <table class="print">
        <tr>
          <th>{% trans 'Column' %}</th>
          <th>{% trans 'Type' %}</th>
          <th>{% trans 'Null' %}</th>
          <th>{% trans 'Default' %}</th>
          {% if table.has_relation %}
            <th>{% trans 'Links to' %}</th>
          {% endif %}
          <th>{% trans 'Comments' %}</th>
          {% if table.has_mime %}
            <th>{% trans 'Media (MIME) type' %}</th>
          {% endif %}
        </tr>
        {% for column in table.columns %}
          <tr>
            <td class="nowrap">
              {{ column.name }}
              {% if column.has_primary_key %}
                <em>({% trans 'Primary' %})</em>
              {% endif %}
            </td>
            <td lang="en" dir="ltr"{{ 'set' != column.type and 'enum' != column.type ? ' class="nowrap"' }}>
              {{ column.print_type }}
            </td>
            <td>{{ column.is_nullable ? 'Yes'|trans : 'No'|trans }}</td>
            <td class="nowrap">
              {% if column.default is null and column.is_nullable %}
                <em>NULL</em>
              {% else %}
                {{ column.default }}
              {% endif %}
            </td>
            {% if table.has_relation %}
              <td>{{ column.relation }}</td>
            {% endif %}
            <td>{{ column.comment }}</td>
            {% if table.has_mime %}
              <td>{{ column.mime }}</td>
            {% endif %}
          </tr>
        {% endfor %}
      </table>

      {{ table.indexes_table|raw }}
    </div>
  {% endfor %}
</div>

<p class="print_ignore">
  <input type="button" class="btn btn-secondary button" id="print" value="{% trans 'Print' %}">
</p>