mirror of
https://github.com/wagtail/wagtail.git
synced 2024-12-01 11:41:20 +01:00
Update leftover status-tag class usage to use status template tag
- Closes #10129 - Relates to #8656 & #9721
This commit is contained in:
parent
fdc36a6989
commit
427f5623d9
@ -65,7 +65,7 @@ Changelog
|
||||
* Maintenance: Remove unneeded float styles on 404 page (Fabien Le Frapper)
|
||||
* Maintenance: Convert userbar implementation to TypeScript (Albina Starykova)
|
||||
* Maintenance: Migrate slug field behaviour to a Stimulus controller and create new `SlugInput` widget (Loveth Omokaro)
|
||||
* Maintenance: Refactor `status` HTML usage to shared template tag (Aman Pandey, LB (Ben) Johnston)
|
||||
* Maintenance: Refactor `status` HTML usage to shared template tag (Aman Pandey, LB (Ben) Johnston, Himanshu Garg)
|
||||
* Maintenance: Add curlylint and update djhtml, semgrep versions in pre-commit config (Himanshu Garg)
|
||||
* Maintenance: Use shared header template for `ModelAdmin` header (Aman Pandey)
|
||||
* Maintenance: Move models and forms for `wagtailsearch.Query` to `wagtail.contrib.search_promotions` (Karl Hobley)
|
||||
|
@ -86,7 +86,7 @@ Support for adding custom validation logic to StreamField blocks has been formal
|
||||
* Remove unneeded float styles on 404 page (Fabien Le Frapper)
|
||||
* Convert userbar implementation to TypeScript (Albina Starykova)
|
||||
* Migrate slug field behaviour to a Stimulus controller and create new `SlugInput` widget (Loveth Omokaro)
|
||||
* Refactor `status` HTML usage to shared template tag (Aman Pandey, LB (Ben) Johnston)
|
||||
* Refactor `status` HTML usage to shared template tag (Aman Pandey, LB (Ben) Johnston, Himanshu Garg)
|
||||
* Add curlylint and update djhtml, semgrep versions in pre-commit config (Himanshu Garg)
|
||||
* Use shared header template for `ModelAdmin` header (Aman Pandey)
|
||||
* Move models and forms for `wagtailsearch.Query` to `wagtail.contrib.search_promotions` (Karl Hobley)
|
||||
|
@ -51,9 +51,8 @@
|
||||
</td>
|
||||
<td>
|
||||
{% admin_url_name workflow_state.content_object 'workflow_history_detail' as workflow_history_detail_url_name %}
|
||||
<a href="{% url workflow_history_detail_url_name workflow_state.content_object.pk|admin_urlquote workflow_state.pk %}" class="status-tag primary">
|
||||
{{ workflow_state.get_status_display }}
|
||||
</a>
|
||||
{% url workflow_history_detail_url_name workflow_state.content_object.pk|admin_urlquote workflow_state.pk as status_url %}
|
||||
{% status workflow_state.get_status_display url=status_url classname="primary" %}
|
||||
</td>
|
||||
<td>
|
||||
<h2>{{ workflow_name }}</h2>
|
||||
|
@ -77,17 +77,18 @@
|
||||
{% for task_state in task_states %}
|
||||
<td>
|
||||
{% if task_state.status == 'approved' or task_state.status == 'rejected' %}
|
||||
{% fragment as status_action %}{% status task_state.get_status_display classname="primary" %}{% endfragment %}
|
||||
{% if task_state.finished_by %}
|
||||
{% blocktrans trimmed with action='<div class="status-tag primary">'|add:task_state.get_status_display|add:'</div>'|safe who=task_state.finished_by|user_display_name at=task_state.finished_at %}
|
||||
{% blocktrans trimmed with action=status_action|safe who=task_state.finished_by|user_display_name at=task_state.finished_at %}
|
||||
{{ action }} by <b>{{ who }}</b> at <b>{{ at }}</b>
|
||||
{% endblocktrans %}
|
||||
{% else %}
|
||||
{% blocktrans trimmed with action='<div class="status-tag primary">'|add:task_state.get_status_display|add:'</div>'|safe at=task_state.finished_at %}
|
||||
{% blocktrans trimmed with action=status_action|safe at=task_state.finished_at %}
|
||||
{{ action }} at <b>{{ at }}</b>
|
||||
{% endblocktrans %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<div class="status-tag primary">{{ task_state.get_status_display }}</div>
|
||||
{% status task_state.get_status_display classname="primary" %}
|
||||
{% endif %}
|
||||
{% if task_state.specific.get_comment %}
|
||||
<p>{% trans 'with comment:' %} <b>"{{ task_state.specific.get_comment }}"</b></p>
|
||||
@ -115,7 +116,7 @@
|
||||
<b>{% trans "Workflow started" %}</b>
|
||||
{% elif timeline_item.action == 'workflow_completed' %}
|
||||
<b>{% trans "Workflow completed" %}</b>
|
||||
<div class="status-tag primary">{{ timeline_item.workflow_state.get_status_display }}</div>
|
||||
{% status timeline_item.workflow_state.get_status_display classname="primary" %}
|
||||
{% elif timeline_item.action == 'edited' %}
|
||||
{% trans "Edited" as action %}
|
||||
{% if revision.user %}
|
||||
@ -129,11 +130,12 @@
|
||||
<b>{{ timeline_item.task_state.task }}</b>
|
||||
|
||||
{% if timeline_item.task_state.finished_by %}
|
||||
{% blocktrans trimmed with action='<div class="status-tag primary">'|add:timeline_item.task_state.get_status_display|add:'</div>'|safe who=timeline_item.task_state.finished_by|user_display_name %}
|
||||
{% fragment as status_action %}{% status timeline_item.task_state.get_status_display classname="primary" %}{% endfragment %}
|
||||
{% blocktrans trimmed with action=status_action|safe who=timeline_item.task_state.finished_by|user_display_name %}
|
||||
{{ action }} by <b>{{ who }}</b>
|
||||
{% endblocktrans %}
|
||||
{% else %}
|
||||
<div class="status-tag primary">{{ timeline_item.task_state.get_status_display }}</div>
|
||||
{% status timeline_item.task_state.get_status_display classname="primary" %}
|
||||
{% endif %}
|
||||
|
||||
{% if timeline_item.task_state.specific.get_comment %}
|
||||
|
@ -1,7 +1,9 @@
|
||||
{% load wagtailadmin_tags %}
|
||||
|
||||
<td {% if column.classname %}class="{{ column.classname }}"{% endif %}>
|
||||
{% if value %}
|
||||
{% if column.true_label %}<div class="status-tag primary">{{ column.true_label }}</div>{% endif %}
|
||||
{% if column.true_label %}{% status column.true_label classname="primary" %}{% endif %}
|
||||
{% else %}
|
||||
{% if column.false_label %}<div class="status-tag primary">{{ column.false_label }}</div>{% endif %}
|
||||
{% if column.false_label %}{% status column.false_label classname="primary" %}{% endif %}
|
||||
{% endif %}
|
||||
</td>
|
||||
|
@ -1,4 +1,4 @@
|
||||
{% load i18n %}
|
||||
{% load i18n wagtailadmin_tags %}
|
||||
<table class="listing">
|
||||
<col width="35%"/>
|
||||
<col width="30%"/>
|
||||
@ -36,7 +36,7 @@
|
||||
{{ redirect.link }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="type"><div class="status-tag {% if redirect.is_permanent %}primary{% endif %}">{{ redirect.get_is_permanent_display }}</div></td>
|
||||
<td class="type">{% status redirect.get_is_permanent_display classname=primary|yesno:"primary," %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
Loading…
Reference in New Issue
Block a user