0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 11:41:20 +01:00

Add failure icon, and use for rejected task states when displaying workflow status (#6148)

This commit is contained in:
jacobtoppm 2020-06-18 16:07:02 +01:00 committed by Matt Westcott
parent 5d3e9d7ecd
commit 2607bf43d0
4 changed files with 11 additions and 5 deletions

View File

@ -0,0 +1,3 @@
<symbol id="icon-failure" viewBox="0 0 512 512">
<path d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm121.6 313.1c4.7 4.7 4.7 12.3 0 17L338 377.6c-4.7 4.7-12.3 4.7-17 0L256 312l-65.1 65.6c-4.7 4.7-12.3 4.7-17 0L134.4 338c-4.7-4.7-4.7-12.3 0-17l65.6-65-65.6-65.1c-4.7-4.7-4.7-12.3 0-17l39.6-39.6c4.7-4.7 12.3-4.7 17 0l65 65.7 65.1-65.6c4.7-4.7 12.3-4.7 17 0l39.6 39.6c4.7 4.7 4.7 12.3 0 17L312 256l65.6 65.1z"/>
</symbol>

View File

@ -51,14 +51,15 @@
</td>
<td>
<h2>{{ workflow_name }}</h2>
{% trans 'Approved task' as approved_title %}
{% trans 'Incomplete task' as incomplete_title %}
{% for task in workflow_state.all_tasks_with_status %}
<span data-wagtail-tooltip="{{ task.name }}: {{ task.status_display }}">
{% if task.status == 'approved' %}
{% icon "success" title=approved_title class_name="uniform" %}
{% icon "success" title=task.status_display class_name="icon uniform" %}
{% elif task.status == 'rejected' %}
{% icon "failure" title=task.status_display class_name="icon uniform" %}
{% else %}
{% icon "radio-empty" title=incomplete_title class_name="uniform" %}
{% icon "radio-empty" title=incomplete_title class_name="icon uniform" %}
{% endif %}
</span>
{% endfor %}

View File

@ -21,12 +21,13 @@
{% endif %}
<div>
{% trans 'Approved task' as approved_title %}
{% trans 'Incomplete task' as incomplete_title %}
{% for task in workflow_tasks %}
<span data-wagtail-tooltip="{{ task.name }}: {{ task.status_display }}">
{% if task.status == 'approved' %}
{% icon "success" title=approved_title class_name="icon uniform" %}
{% icon "success" title=task.status_display class_name="icon uniform" %}
{% elif task.status == 'rejected' %}
{% icon "failure" title=task.status_display class_name="icon uniform" %}
{% else %}
{% icon "radio-empty" title=incomplete_title class_name="icon uniform" %}
{% endif %}

View File

@ -704,6 +704,7 @@ def register_icons(icons):
'download.svg',
'duplicate.svg',
'edit.svg',
'failure.svg',
'folder-inverse.svg',
'folder-open-1.svg',
'folder-open-inverse.svg',