{% load django_tables2 %} {% load geojson_tags %} {% load i18n %}
{% block table %} {% block table.thead %} {% if table.show_header %} {% for column in table.columns %} {% if column.orderable %} {{ column.header }} {% else %} {{ column.header }} {% endif %} {% endfor %} {% endif %} {% endblock table.thead %} {% block table.tbody %} {% for row in table.page.object_list|default:table.rows %} {# support pagination #} {% block table.tbody.row %} {% for column, cell in row.items %} {% if column.localize == None %}{{ cell }}{% else %}{% if column.localize %} {{ cell|localize }}{% else %}{{ cell|unlocalize }}{% endif %}{% endif %} {% endfor %} {% endblock table.tbody.row %} {% empty %} {% if table.empty_text %} {% block table.tbody.empty_text %} {{ table.empty_text }} {% endblock table.tbody.empty_text %} {% endif %} {% endfor %} {% endblock table.tbody %} {% block table.tfoot %} {% if table.has_footer %} {% for column in table.columns %} {{ column.footer }} {% endfor %} {% endif %} {% endblock table.tfoot %} {% endblock table %}
{#{% if table.page %}#} {# {% with table.page.paginator.count as total %}#} {# {% with table.page.object_list|length as count %}#} {# {% block pagination %}#} {#
#} {# {% if table.page.has_previous %}#} {# {% block pagination.previous %}#} {# {% trans "Previous" %}#} {# {% endblock pagination.previous %}#} {# {% endif %}#} {# {% if table.page.has_previous or table.page.has_next %}#} {# {% block pagination.cardinality %}#} {# #} {# {% blocktrans with table.page.number as current and table.paginator.num_pages as total %}#} {# Page {{ current }} of {{ total }}{% endblocktrans %}#} {# #} {# {% endblock pagination.cardinality %}#} {# {% endif %}#} {##} {# {% if table.page.has_next %}#} {# {% block pagination.next %}#} {# {% trans "Next" %}#} {# #} {# {% endblock pagination.next %}#} {# {% endif %}#} {#
#} {# {% endblock pagination %}#} {# {% endwith %}#} {# {% endwith %}#} {#{% endif %}#} {% if table.page %} {% with table.page.paginator.count as total %} {% with table.page.object_list|length as count %} {% block pagination %} {% endblock pagination %} {% endwith %} {% endwith %} {% endif %}