From 938b38d082402196b5cadb6f4ed0f1c9a3bf192f Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Wed, 9 Oct 2019 10:58:15 +0100 Subject: [PATCH] Let caseworkers see uploads page At the moment they can only see it if there are existing jobs. This commit lets them also see it if their service can upload letters, because caseworkers might be the ones uploading some letters. --- app/navigation.py | 8 ++++---- app/templates/main_nav.html | 13 +++++++------ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/app/navigation.py b/app/navigation.py index c7eafb68b..f0d30ffbd 100644 --- a/app/navigation.py +++ b/app/navigation.py @@ -633,9 +633,12 @@ class CaseworkNavigation(Navigation): 'view_notifications', 'view_notification', }, - 'uploaded-files': { + 'uploads': { 'view_jobs', 'view_job', + 'upload_letter', + 'uploaded_letter_preview', + 'uploads', }, } @@ -868,9 +871,6 @@ class CaseworkNavigation(Navigation): 'two_factor_email_sent', 'update_email_branding', 'update_letter_branding', - 'upload_letter', - 'uploaded_letter_preview', - 'uploads', 'usage', 'usage_for_all_services', 'user_information', diff --git a/app/templates/main_nav.html b/app/templates/main_nav.html index b81503ad8..884a78441 100644 --- a/app/templates/main_nav.html +++ b/app/templates/main_nav.html @@ -8,15 +8,16 @@ {% endif %} {% if current_user.has_permissions() %}
  • Templates
  • - {% if not current_user.has_permissions('view_activity') %} + {% if current_user.has_permissions('view_activity') %} + {% if current_service.can_upload_letters %} +
  • Uploads
  • + {% endif %} + {% else %}
  • Sent messages
  • - {% if current_service.has_jobs %} -
  • Uploads
  • + {% if current_service.has_jobs or current_service.can_upload_letters %} +
  • Uploads
  • {% endif %} {% endif %} - {% endif %} - {% if current_service.can_upload_letters %} -
  • Uploads
  • {% endif %}
  • Team members
  • {% if current_user.has_permissions('manage_service', allow_org_user=True) %}