Allow control of the visibility of "My Tickets" for staff.

This commit is contained in:
Christopher Broderick 2025-05-14 15:18:54 +01:00
parent b94cb9f1cb
commit d7ca4ee254
2 changed files with 8 additions and 0 deletions

View File

@ -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)

View File

@ -40,12 +40,14 @@
<span>{% trans "New Ticket" %}</span>
</a>
</li>
{% if helpdesk_settings.HELPDESK_SHOW_MY_TICKETS_IN_NAV_FOR_STAFF %}
<li class="nav-item{% if 'my-tickets' in request.path %} active{% endif %}">
<a class="nav-link" href="{% url 'helpdesk:my-tickets' %}">
<i class="fas fa-fw fa-tasks"></i>
<span>{% trans "My Tickets" %}</span>
</a>
</li>
{% endif %}
<li class="nav-item{% if 'reports' in request.path %} active{% endif %}">
<a class="nav-link" href="{% url 'helpdesk:report_index' %}">
<i class="fas fa-fw fa-chart-area"></i>