table_header.twig 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <thead>
  2. <tr>
  3. {% if is_superuser or allow_user_drop_database %}
  4. <th></th>
  5. {% endif %}
  6. <th>
  7. <a href="server_databases.php{{ Url_getCommon(url_params) }}">
  8. {% trans 'Database' %}
  9. {{ sort_by == 'SCHEMA_NAME' ? Util_getImage(
  10. 's_' ~ sort_order,
  11. sort_order_text
  12. ) }}
  13. </a>
  14. </th>
  15. {% for stat_name, stat in column_order %}
  16. {% if stat_name in first_database|keys %}
  17. {% set url_params = url_params|merge({
  18. 'sort_by': stat_name,
  19. 'sort_order': sort_by == stat_name and sort_order == 'desc' ? 'asc' : 'desc'
  20. }) %}
  21. <th{{ stat['format'] is same as('byte') ? ' colspan="2"' }}>
  22. <a href="server_databases.php{{ Url_getCommon(url_params) }}">
  23. {{ stat['disp_name'] }}
  24. {{ sort_by == stat_name ? Util_getImage(
  25. 's_' ~ sort_order,
  26. sort_order_text
  27. ) }}
  28. </a>
  29. </th>
  30. {% endif %}
  31. {% endfor %}
  32. {% if master_replication %}
  33. <th>{% trans 'Master replication' %}</th>
  34. {% endif %}
  35. {% if slave_replication %}
  36. <th>{% trans 'Slave replication' %}</th>
  37. {% endif %}
  38. <th>{% trans 'Action' %}</th>
  39. </tr>
  40. </thead>