From 5ee4335eb92f2dc35b31c208bce8d8e8aef9e5f2 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Tue, 20 Oct 2020 16:39:48 +0100 Subject: added org list hard-filtered by lead inspector --- .../templates/organisations/organisation_list.html | 14 ++++++++++++-- ctrack/organisations/tests/test_views.py | 7 +++++++ ctrack/organisations/urls.py | 5 +++-- ctrack/organisations/views.py | 13 +++++++++++++ ctrack/templates/pages/home.html | 2 +- 5 files changed, 36 insertions(+), 5 deletions(-) diff --git a/ctrack/organisations/templates/organisations/organisation_list.html b/ctrack/organisations/templates/organisations/organisation_list.html index a45cae8..8e7b72a 100644 --- a/ctrack/organisations/templates/organisations/organisation_list.html +++ b/ctrack/organisations/templates/organisations/organisation_list.html @@ -25,7 +25,11 @@ - Organisations + {% if inspector %} + Organisations (Lead inspector: {{ inspector.name }}) + {% else %} + Organisations + {% endif %} [Create new...]

Use the search box to filter the table. The table can be exported in various formats using the buttons below. These @@ -38,6 +42,7 @@ Organisation Sub-mode Lead Inspector + Deputy Lead Inspector Point of Contact @@ -45,7 +50,12 @@ {{ org.name }} {{ org.submode }} - {{ org.lead_inspector.name }} + {% if org.lead_inspector %} + {{ org.lead_inspector.name }} + {% else %} + {{ org.lead_inspector.name }} + {% endif %} + {{ org.deputy_lead_inspector.name }} {% if org.primary_contacts %}