{% load i18n common admin_workbook %}{% comment %} A list of objects: in a tab of their parent's page (``manager`` is set, and the list draws its own heading with the button that adds another) or on a list page of its own. Blocks a list may fill: heading, actions the heading of a tab's list and its buttons (include "touchtechnology/admin/workbook/_add.html" with url=... for Add) modal dialogs the list needs (such as "Add several") table-headings cells (the title is the first) filter the box that filters a long list in a tab (include "touchtechnology/admin/workbook/_filter.html" to always offer it) table-head-actions the heading of the actions column (empty when rows have none) table-columns cells (the first, class "wb-title-cell", links the object) row-buttons-extra buttons always on show in a row (Build, Undo, Up...) row-buttons-items the row's menu:
  • Label
  • row-buttons-delete the menu's last item, Delete (empty it for none) delete-data-title how the object is named when asking to delete it table-row-empty what an empty list says {% endcomment %}{% firstof create|resolved create_url as create_link %}{% with type=model|type %} {% if manager %} {% block heading %}

    {{ manager.all|types|capfirst }}

    {% block actions %} {% if create_link %}{% include "touchtechnology/admin/workbook/_add.html" with url=create_link %}{% endif %} {% endblock actions %}
    {% endblock %} {% endif %} {% block modal %}{% endblock modal %} {% block table %} {% block filter %} {% if manager and object_list|length > 8 %}{% include "touchtechnology/admin/workbook/_filter.html" %}{% endif %} {% endblock filter %}
    {% block table-head %} {% block table-headings %} {% endblock %} {% block table-head-actions %}{% endblock %} {% endblock table-head %} {% with checker=queryset|permchecker:user %} {% for obj in object_list %} {% block table-row %} {% with object_perms=obj|checkperm:checker %} {% block table-columns %} {% endblock table-columns %} {% endwith %} {% endblock table-row %} {% empty %} {% block table-row-empty %} {% endblock table-row-empty %} {% endfor %} {% endwith %}
    {% trans "Title" %}{% trans "Actions" %}
    {% if change_perm in object_perms and obj.urls.edit %} {{ obj }} {% else %} {{ obj }} {% endif %} {% block row-buttons %}
    {% block row-buttons-extra %}{% endblock %}
      {% block row-buttons-items %} {% if obj.urls.detail %}
    • {% icon "eye" %}{% trans "View" %}
    • {% endif %} {% if obj.urls.edit and change_perm in object_perms %}
    • {% icon "pencil" %}{% trans "Edit" %}
    • {% endif %} {% if obj.urls.perms and add_perm in object_perms %}
    • {% icon "lock" %}{% trans "Security" %}
    • {% endif %} {% endblock row-buttons-items %} {% block row-buttons-delete %} {% if obj.urls.delete and delete_perm in object_perms %}
    • {% include "touchtechnology/admin/workbook/_delete.html" with action=obj.urls.delete %}
    • {% endif %} {% endblock row-buttons-delete %}
    {% endblock %}
    {% if create_link %} {% blocktrans %}No {{ type }} yet.{% endblocktrans %} {% blocktrans %}Add the first {{ type }}{% endblocktrans %} {% else %} {% blocktrans with types=model|types %}There are no {{ types }}.{% endblocktrans %} {% endif %}
    {% endblock table %} {% block pagination %} {% include "touchtechnology/admin/workbook/_pagination.html" %} {% endblock pagination %} {% endwith %}