From d7ca4ee254446f6dfead599b066891d7c1555b80 Mon Sep 17 00:00:00 2001 From: Christopher Broderick Date: Wed, 14 May 2025 15:18:54 +0100 Subject: [PATCH] Allow control of the visibility of "My Tickets" for staff. --- helpdesk/settings.py | 6 ++++++ helpdesk/templates/helpdesk/navigation-sidebar.html | 2 ++ 2 files changed, 8 insertions(+) diff --git a/helpdesk/settings.py b/helpdesk/settings.py index 179267f3..4bd1d039 100644 --- a/helpdesk/settings.py +++ b/helpdesk/settings.py @@ -91,6 +91,12 @@ HELPDESK_TICKETS_TIMELINE_ENABLED = getattr( # status? HELPDESK_NAVIGATION_ENABLED = getattr(settings, "HELPDESK_NAVIGATION_ENABLED", False) +# Show the "My Tickets" navigation option for staff members - typically this is for when +# staff can create tickets to action other staff. +HELPDESK_SHOW_MY_TICKETS_IN_NAV_FOR_STAFF = getattr( + settings, "HELPDESK_SHOW_MY_TICKETS_IN_NAV_FOR_STAFF", True +) + # use public CDNs to serve jquery and other javascript by default? # otherwise, use built-in static copy HELPDESK_USE_CDN = getattr(settings, "HELPDESK_USE_CDN", False) diff --git a/helpdesk/templates/helpdesk/navigation-sidebar.html b/helpdesk/templates/helpdesk/navigation-sidebar.html index f6840bdc..36ce6ece 100644 --- a/helpdesk/templates/helpdesk/navigation-sidebar.html +++ b/helpdesk/templates/helpdesk/navigation-sidebar.html @@ -40,12 +40,14 @@ {% trans "New Ticket" %} + {% if helpdesk_settings.HELPDESK_SHOW_MY_TICKETS_IN_NAV_FOR_STAFF %} + {% endif %}