Always go back to previous page from notification

When looking at a notification you can either be coming from the page
of all notifications, or from a job. Currently the back link always
takes you to the page of all notifications.

This commit makes it a bit more sophisticated so if you’ve come from
looking at a job, you go back to the job.
This commit is contained in:
Chris Hill-Scott
2019-05-09 17:33:22 +01:00
parent b786997c6b
commit b4894e7a03
6 changed files with 73 additions and 3 deletions

View File

@@ -13,7 +13,7 @@
{{ page_header(
message_count_label(1, template.template_type, suffix='') | capitalize,
back_link=None if request.args.get('help') == '0' else url_for('main.view_notifications', service_id=current_service.id, message_type=template.template_type)
back_link=back_link
) }}
<p>