panel_table.html 683 B

1234567891011121314151617181920212223242526
  1. {% extends 'django_tables2/table.html' %}
  2. {% load django_tables2 %}
  3. {% load i18n %}
  4. {# Wraps a table inside a Bootstrap panel and includes custom pagination rendering #}
  5. {% block table %}
  6. <div class="panel panel-{{ panel_class|default:'default' }}">
  7. {% if heading %}
  8. <div class="panel-heading">
  9. <strong>{{ heading }}</strong>
  10. </div>
  11. {% endif %}
  12. {% if table.rows %}
  13. {{ block.super }}
  14. {% else %}
  15. <div class="panel-body text-muted">None</div>
  16. {% endif %}
  17. </div>
  18. {% endblock %}
  19. {% block pagination %}
  20. {% if not hide_paginator %}
  21. {% include 'table_paginator.html' %}
  22. {% endif %}
  23. {% endblock pagination %}