Link back to uploaded letters page

If you’ve come to look at a notification via the uploaded letters page
then the ‘< back’ link should take you back there, not to the usual
activity page.
This commit is contained in:
Chris Hill-Scott
2020-05-11 14:20:53 +01:00
parent 34f5417844
commit a9998958b7
7 changed files with 47 additions and 2 deletions

View File

@@ -120,6 +120,12 @@ def view_notification(service_id, notification_id):
service_id=current_service.id,
job_id=request.args.get('from_job'),
)
elif request.args.get('from_uploaded_letters'):
back_link = url_for(
'main.uploaded_letters',
service_id=current_service.id,
letter_print_day=request.args.get('from_uploaded_letters'),
)
else:
back_link = url_for(
'main.view_notifications',