{% extends "wagtailadmin/generic/index.html" %} {% load i18n wagtailadmin_tags %} {% block content %} {% fragment as workflow_actions %} {% if showing_disabled %} {% icon name="no-view" %}{% trans "Hide disabled tasks" %} {% else %} {% icon name="view" %}{% trans "Show disabled tasks" %} {% endif %} {{ view.add_item_label }} {% endfragment %} {% include "wagtailadmin/shared/header.html" with title=view.page_title icon=view.header_icon extra_actions=workflow_actions %}
{% if tasks %} {% for task in tasks %} {% endfor %}
{% trans "Name" %} {% trans "Type" %} {% trans "Used on" %}
{{ task }} {% trans "Disabled" as status_label %} {% if not task.active %}{% status status_label %}{% endif %}
{{ task.specific.get_verbose_name }} {% for workflow in task.active_workflows|slice:":5" %} {{ workflow.name }}{% if not forloop.last %}, {% endif %} {% empty %} {% trans "Not used" %} {% endfor %} {% if task.active_workflows.count > 5 %} {% blocktrans trimmed count counter=task.active_workflows.count|add:-5 %}+{{ counter }} more{% plural %}+{{ counter }} more{% endblocktrans %} {% endif %}
{% else %} {% url view.add_url_name as add_url %} {% if showing_disabled %}

{% blocktrans trimmed %}No tasks have been created. Why not add one?{% endblocktrans %}

{% else %}

{% blocktrans trimmed %}There are no enabled tasks. Why not add one?{% endblocktrans %}

{% endif %} {% endif %}
{% endblock %}