mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-06 17:38:30 -04:00
Fix back links when viewing a broadcast
Where you go back to from a broadcast can now depend on whether it’s a current or previous broadcast.
This commit is contained in:
@@ -295,6 +295,14 @@ def view_broadcast(service_id, broadcast_message_id):
|
||||
return render_template(
|
||||
'views/broadcast/view-message.html',
|
||||
broadcast_message=broadcast_message,
|
||||
back_link={
|
||||
'main.view_current_broadcast': url_for(
|
||||
'.broadcast_dashboard', service_id=current_service.id
|
||||
),
|
||||
'main.view_previous_broadcast': url_for(
|
||||
'.broadcast_dashboard_previous', service_id=current_service.id
|
||||
),
|
||||
}[request.endpoint],
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
{% block maincolumn_content %}
|
||||
|
||||
{{ govukBackLink({ "href": url_for('.broadcast_dashboard', service_id=current_service.id) }) }}
|
||||
{{ govukBackLink({ "href": back_link }) }}
|
||||
|
||||
{% if broadcast_message.status == 'pending-approval' %}
|
||||
{% if broadcast_message.created_by == current_user and current_user.has_permissions('send_messages') %}
|
||||
|
||||
Reference in New Issue
Block a user