{% load i18n %} {% if self.as_pdf %} {% with queryset=self.get_queryset %} {% if queryset.exists %} {% for column_name, lookup, sortable, to in self.column_names %} {% endfor %} {% for obj in queryset %} {% for column_name, lookup, sortable, to in self.column_names %} {% with value=obj|getattr:lookup %} {% endwith %} {% endfor %} {% endfor %}
#{{ column_name }}
{{ forloop.counter }}{{ value|print_format|safe }}
{% else %}
{% trans "No records found" %}
{% endif %} {% endwith %} {% else %}
{% with queryset=self.get_queryset %} {% if self.is_list_view or self.subset_dropdown.has_items or self.paginator_dropdown.has_items %}
{% if self.is_list_view %}

{% if self.icon %} {% endif %}{{ self.title }} ({{ self.qs.count }})

{% endif %}
{% if not self.request.GET.popup %} {{ self.subset_dropdown }} {{ self.paginator_dropdown }} {% endif %}
{% endif %}
{% if not self.is_list_view %}
{% if self.url %} {% if self.icon %} {% endif %} {{ self.title }} {% else %} {% if self.icon %} {% endif %} {{ self.title }} {% endif %}
{% endif %}
{% if self.tabs|length > 1 and not self.readonly %}
    {% for tab in self.tabs %}
  • {{ tab.1 }} {{ tab.2.count }}    
  • {% endfor %}
{% endif %} {% if self.form %} {{ self.form }} {% endif %} {% if self.list_total %} {% with total=self.get_total %} {% if total %}
{{ total|format }}
{% else %}
{% endif %} {% endwith %} {% endif %}
{% with list_filter=self.get_list_filter search_fields=self.get_search_fields %} {% if list_filter or search_fields %}
{% with filter_form=self.get_filter_form %} {{ filter_form.media }} {% if search_fields or list_filter %}
{% if search_fields %} {% endif %} {% for field in filter_form %} {{ field }} {% endfor %}
{% endif %} {% if list_filter1 %} {% endif %} {% endwith %}
{% endif %} {% endwith %}
{% if queryset.exists %} {% if self.help_text %}
{{ self.help_text }}
{% endif %} {% if self.has_customized_template %} {{ self|render_paginator }} {% else %} {% if self.mobile %}
    {% for obj in queryset %} {% set_request obj self.request %}
  • {{ obj }} {% for column_name, lookup, sortable, to in self.column_names %} {% with value=obj|getattr:lookup %} {% if value|displayable %}
    {{ column_name }}: {{ value|format|safe }} {% endif %} {% endwith %} {% endfor %}

    {% obj_icons self.request obj %}
  • {% endfor %}
{% else %} {% if self.is_list_view and self.subset_dropdown.has_items %} {% endif %} {% if self.can_show_actions and not self.request.GET.popup %} {% endif %} {% for column_name, lookup, sortable, to in self.column_names %} {% endfor %} {% if self.drop_down.has_inline_action and not self.readonly and not self.request.GET.popup %} {% endif %} {% for obj in queryset %} {% set_request obj self.request %} {% if self.is_list_view and self.subset_dropdown.has_items %} {% endif %} {% if self.can_show_actions and not self.request.GET.popup %} {% endif %} {% for column_name, lookup, sortable, to in self.column_names %} {% with value=obj|getattr:lookup %} {% endwith %} {% endfor %} {% if self.drop_down.has_inline_action and not self.readonly and not self.request.GET.popup %} {% endif %} {% endfor %}
{% trans "Options" %} {% if sortable %}{% endif %} {{ column_name|normalyze }} {% if sortable %}{% endif %} {% if self.order_by == lookup and sortable %} {% endif %} {% trans "Actions" %}
{{ value|format|safe }} {{ self|add_actions:obj }} {{ self.drop_down }}
{% endif %} {% endif %} {% else %}
{% trans "No records found" %}.
{% endif %} {% if self.subset_dropdown.actions and not self.request.GET.popup %}
{{ self.subset_dropdown }}
{% endif %}
{{ self.pagination|safe }}
{% if not self.is_list_view %} {% endif %}
{% endwith %}
{% endif %}