{% load django_tables2 %} {% load i18n l10n mvp %} {% block table-wrapper %} {% block table %} {% block table.thead %} {% if table.show_header %} {% for column in table.columns %} {% endfor %} {% endif %} {% endblock table.thead %} {% block table.tbody %} {% comment %} Meta.row_headers columns get th scope="row" cells (#320). Content is written under both branches, not shared, since rendering a variable applies locale/timezone formatting a tag return would not. {% endcomment %} {% row_header_columns table as row_headers %} {% for row in table.paginated_rows %} {% block table.tbody.row %} {% for column, cell in row.items %} {% if column.name in row_headers %} {% else %} {% endif %} {% endfor %} {% endblock table.tbody.row %} {% empty %} {% if table.empty_text %} {% block table.tbody.empty_text %} {% endblock table.tbody.empty_text %} {% endif %} {% endfor %} {% endblock table.tbody %} {% block table.tfoot %} {% if table.has_footer %} {% for column in table.columns %} {% endfor %} {% endif %} {% endblock table.tfoot %}
{% comment %} A falsey heading prints nothing rather than the value (#319); the cell and its sort control stay — suppressing the heading is not a request to drop ordering too. {% endcomment %} {% if column.orderable %} {{ column.header|default:"" }} {% else %} {{ column.header|default:"" }} {% endif %}
{% if column.localize == None %} {{ cell }} {% else %} {% if column.localize %} {{ cell|localize }} {% else %} {{ cell|unlocalize }} {% endif %} {% endif %} {% if column.localize == None %} {{ cell }} {% else %} {% if column.localize %} {{ cell|localize }} {% else %} {{ cell|unlocalize }} {% endif %} {% endif %}
{{ column.footer }}
{% endblock table %} {% endblock table-wrapper %}