- {% for task_state, actions, workflow_tasks in states %}
- {% with task_state.revision as revision %}
- {% page_permissions revision.content_object as page_perms %}
+ {% for state in states %}
+ {% with revision=state.task_state.revision obj=state.obj task_state=state.task_state actions=state.actions workflow_tasks=state.workflow_tasks %}
+ {% is_page obj as is_page %}
+ {% if is_page %}
+ {% page_permissions obj as page_perms %}
+ {% endif %}
- {% if page_perms.can_edit %}
- {{ revision.content_object.specific_deferred.get_admin_display_title }}
+ {% admin_edit_url obj as edit_url %}
+ {% if page_perms.can_edit or not is_page and edit_url %}
+ {% latest_str obj %}
{% else %}
- {{ revision.content_object.specific_deferred.get_admin_display_title }}
+ {% latest_str obj %}
{% endif %}
{% i18n_enabled as show_locale_labels %}
- {% if show_locale_labels and revision.content_object.locale_id %}
- {% locale_label_from_id revision.content_object.locale_id as locale_label %}
+ {% if show_locale_labels and obj.locale_id %}
+ {% locale_label_from_id obj.locale_id as locale_label %}
{{ locale_label }}
{% endif %}
- {% include "wagtailadmin/pages/listing/_privacy_indicator.html" with page=revision.content_object %}
- {% include "wagtailadmin/pages/listing/_locked_indicator.html" with page=revision.content_object %}
+ {% include "wagtailadmin/pages/listing/_privacy_indicator.html" with page=obj %}
+ {% include "wagtailadmin/pages/listing/_locked_indicator.html" with page=obj %}
{% if actions %}
{% for action_name, action_label, modal in actions %}
-
+
{% endfor %}
- {% if page_perms.can_edit %}
+ {% if page_perms.can_edit or not is_page and edit_url %}