{% extends "wagtailadmin/generic/base.html" %} {% load i18n wagtailadmin_tags %} {% block main_content %}
{% blocktrans trimmed with modified_by=workflow_state.requested_by|user_display_name %}Requested by {{ modified_by }}{% endblocktrans %} {% avatar user=workflow_state.requested_by size="small" %}
{% blocktrans trimmed with workflow_state.created_at as started_at %}Started at {{ started_at }}{% endblocktrans %}
{% fragment as status_tag_variable %}{% status workflow_state.get_status_display classname="w-status--primary" %}{% endfragment %} {% blocktrans trimmed with status_tag_variable as status %}Status {{ status }}{% endblocktrans %}
{% for task in tasks %} | {{ task }} | {% endfor %} {% for revision, task_states in task_states_by_revision %}
---|---|
{% if forloop.first %} {% trans "Initial Revision" %} {% else %} {% if not forloop.first %} {% trans "Edited" as action %} {% if revision.user %} {% blocktrans trimmed with ''|add:action|add:'' as action and revision.user|user_display_name as who and revision.created_at as at %} {{ action }} by {{ who }} at {{ at }} {% endblocktrans %} {% else %} {% blocktrans trimmed with ''|add:action|add:'' as action and revision.created_at as at %} {{ action }} at {{ at }} {% endblocktrans %} {% endif %} {% endif %} {% endif %} | {% for task_state in task_states %}
{% if task_state.status == 'approved' or task_state.status == 'rejected' %}
{% fragment as status_action %}{% status task_state.get_status_display classname="w-status--primary" %}{% endfragment %}
{% if task_state.finished_by %}
{% blocktrans trimmed with action=status_action|safe who=task_state.finished_by|user_display_name at=task_state.finished_at %}
{{ action }} by {{ who }} at {{ at }}
{% endblocktrans %}
{% else %}
{% blocktrans trimmed with action=status_action|safe at=task_state.finished_at %}
{{ action }} at {{ at }}
{% endblocktrans %}
{% endif %}
{% else %}
{% status task_state.get_status_display classname="w-status--primary" %}
{% endif %}
{% if task_state.get_comment %}
{% trans 'with comment:' %} "{{ task_state.get_comment }}" {% endif %} |
{% endfor %}
{{ timeline_item.time }} | {% if timeline_item.action == 'workflow_started' %} {% trans "Workflow started" %} {% elif timeline_item.action == 'workflow_completed' %} {% trans "Workflow completed" %} {% status timeline_item.workflow_state.get_status_display classname="w-status--primary" %} {% elif timeline_item.action == 'edited' %} {% trans "Edited" as action %} {% if revision.user %} {% blocktrans trimmed with ''|add:action|add:'' as action and timeline_item.revision.user|user_display_name as who %} {{ action }} by {{ who }} {% endblocktrans %} {% else %} {{ action }} {% endif %} {% elif timeline_item.action == 'task_completed' %} {{ timeline_item.task_state.task }} {% if timeline_item.task_state.finished_by %} {% fragment as status_action %}{% status timeline_item.task_state.get_status_display classname="w-status--primary" %}{% endfragment %} {% blocktrans trimmed with action=status_action|safe who=timeline_item.task_state.finished_by|user_display_name %} {{ action }} by {{ who }} {% endblocktrans %} {% else %} {% status timeline_item.task_state.get_status_display classname="w-status--primary" %} {% endif %} {% if timeline_item.task_state.specific.get_comment %} {% trans 'with comment:' %} "{{ timeline_item.task_state.specific.get_comment }}" {% endif %} {% endif %} |