Only link to message status if message has failed

This retores the behaviour to as it was before
https://github.com/alphagov/notifications-admin/pull/2962
which inadvertently started linking to the guidance for messages that
were delivered or in sending.
This commit is contained in:
Chris Hill-Scott
2019-05-13 13:25:39 +01:00
parent 1d7ce85443
commit 3c6598cbc2
4 changed files with 47 additions and 7 deletions

View File

@@ -154,11 +154,11 @@
align='right'
) %}
{% if displayed_on_single_line %}<span class="align-with-message-body">{% endif %}
{% if notification.notification_type|format_notification_status_as_url %}
<a href="{{ notification.notification_type|format_notification_status_as_url }}">
{% if notification.status|format_notification_status_as_url(notification.notification_type) %}
<a href="{{ notification.status|format_notification_status_as_url(notification.notification_type) }}">
{% endif %}
{{ notification.status|format_notification_status(notification.template.template_type) }}
{% if notification.notification_type|format_notification_status_as_url %}
{% if notification.status|format_notification_status_as_url(notification.notification_type) %}
</a>
{% endif %}
<span class="status-hint">