mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-19 14:09:20 -04:00
Fix navigation around uploads and jobs
The uploads and jobs page should start showing in the _Uploads_ menu on the left hand side. If you’ve navigated to a job from the uploads page (ie you haven’t got to that page because you’ve just sent the job) then you should see a link back to the uploads page.
This commit is contained in:
@@ -90,10 +90,7 @@ def view_job(service_id, job_id):
|
||||
status=request.args.get('status', ''),
|
||||
),
|
||||
partials=get_job_partials(job),
|
||||
just_sent=bool(
|
||||
request.args.get('just_sent') == 'yes'
|
||||
and job.template_type == 'letter'
|
||||
),
|
||||
just_sent=request.args.get('just_sent') == 'yes',
|
||||
just_sent_message=just_sent_message,
|
||||
)
|
||||
|
||||
|
||||
@@ -355,8 +355,6 @@ class MainNavigation(Navigation):
|
||||
'returned_letters',
|
||||
'service_dashboard',
|
||||
'template_usage',
|
||||
'view_job',
|
||||
'view_jobs',
|
||||
'view_notification',
|
||||
'view_notifications',
|
||||
},
|
||||
@@ -390,6 +388,8 @@ class MainNavigation(Navigation):
|
||||
'upload_letter',
|
||||
'uploaded_letter_preview',
|
||||
'uploads',
|
||||
'view_job',
|
||||
'view_jobs',
|
||||
},
|
||||
'team-members': {
|
||||
'confirm_edit_user_email',
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
{% from "components/banner.html" import banner %}
|
||||
{% from "components/ajax-block.html" import ajax_block %}
|
||||
{% from "components/page-footer.html" import page_footer %}
|
||||
{% from "components/page-header.html" import page_header %}
|
||||
|
||||
{% block service_page_title %}
|
||||
{{ job.original_file_name }}
|
||||
@@ -9,11 +10,12 @@
|
||||
|
||||
{% block maincolumn_content %}
|
||||
|
||||
<h1 class="heading-large">
|
||||
{{ job.original_file_name }}
|
||||
</h1>
|
||||
{{ page_header(
|
||||
job.original_file_name,
|
||||
back_link=None if just_sent else url_for('main.uploads', service_id=current_service.id)
|
||||
) }}
|
||||
|
||||
{% if just_sent %}
|
||||
{% if just_sent and job.template_type == 'letter' %}
|
||||
{{ banner(just_sent_message, type='default', with_tick=True) }}
|
||||
{% else %}
|
||||
{{ ajax_block(partials, updates_url, 'status', finished=job.processing_finished) }}
|
||||
|
||||
Reference in New Issue
Block a user