mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-02 17:48:50 -04:00
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:
@@ -1,5 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from functools import partial
|
||||
|
||||
from flask import (
|
||||
Response,
|
||||
abort,
|
||||
@@ -289,6 +291,11 @@ def get_notifications(service_id, message_type, status_override=None):
|
||||
status=request.args.get('status'),
|
||||
message_type=message_type,
|
||||
download_link=download_link,
|
||||
single_notification_url=partial(
|
||||
url_for,
|
||||
'.view_notification',
|
||||
service_id=current_service.id,
|
||||
)
|
||||
),
|
||||
}
|
||||
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -4,6 +4,7 @@ import json
|
||||
import urllib
|
||||
import uuid
|
||||
from datetime import datetime
|
||||
from functools import partial
|
||||
from io import BytesIO
|
||||
from zipfile import BadZipFile
|
||||
|
||||
@@ -126,6 +127,12 @@ def uploaded_letters(service_id, letter_print_day):
|
||||
letter_print_day,
|
||||
),
|
||||
letter_print_day=letter_print_day,
|
||||
single_notification_url=partial(
|
||||
url_for,
|
||||
'.view_notification',
|
||||
service_id=current_service.id,
|
||||
from_uploaded_letters=letter_print_day,
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user