{% extends "admin/base_site.html" %} {% load humanize i18n palette palette_admin admin_urls %} {% block content %} {% with results=cl %} {% with result_list=cl.result_list %}
{% comment %}
{{ results.opts.verbose_name_plural|capfirst }}: {{ result_list|length }}
Add {{ results.opts.verbose_name|capfirst }}
{% endcomment %}
{% block actions %}
{% csrf_token %} {% block actions-form %} {% for field in action_form %} {% if field.label %}
{% if field.widget_type == 'select' %} {% endif %}
{% else %} {{ field }} {% endif %} {% endfor %} {% endblock %} {% block actions-submit %} {% endblock %}
{% comment %} {% block actions-counter %} {% endblock %} {% endcomment %} {% endblock %}
{% if actions_selection_counter %} {{ selection_note }} {% endif %}
{% if cl.result_list %}
{% for item in cl.result_list %}
{% palette_ui file="palette/components/card.html" component="card" %} {% palette_override card_header %}
{{ results.opts.verbose_name|capfirst }}
{% endpalette_override card_header %} {% palette_override card_body %} {% for field_name in cl.list_display %} {% if field_name == '__str__' %}

{{ opts.verbose_name|capfirst }}: {{ item|getattr:field_name|truncatewords:10 }}

{% elif field_name == 'action_checkbox' %} {% else %}

{{ field_name|capfirst }}: {{ item|getattr:field_name|truncatewords:10 }}

{% endif %} {% endfor %} {% if action_form %}
{% endif %} {% for field in action_form %} {% if field.label %} {% for action in field.subwidgets %} {% if "----" in action.choice_label %} {% else %} {% with act_label=action.choice_label|action_label %} {% endwith %} {% endif %} {% endfor %} {% else %} {{ field }} {% endif %} {% endfor %} {% endpalette_override card_body %} {% endpalette_ui %}
{% endfor %}
{% else %}

{% trans "No items to display." %}

{% endif %}
{% if cl.result_list %}
{% for field_name in cl.list_display %} {% if field_name == '__str__' %} {% elif field_name == 'action_checkbox' %} {% else %} {% endif %} {% endfor %} {% for item in cl.result_list %} {% for field_name in cl.list_display %} {% if field_name == '__str__' %} {% elif field_name == 'action_checkbox' %} {% else %} {% endif %} {% endfor %} {% endfor %}
{% trans cl.opts.verbose_name|capfirst %}{% trans field_name|capfirst %}{% trans "Actions" %}
{{ item|capfirst }} {{ item|getattr:field_name }}
{% trans "View" %} {% trans "Edit" %} {% if 'delete_{{model.name}}' in user.perms %} {{ user.perms }} {% trans "Delete" %} {% endif %}
{% else %}

{% trans "No items to display." %}

{% endif %}
{% endwith %} {% endwith %} {% endblock content %}