From e7e2781d65c7db2f89b3b3c48517abee8f4c4cd7 Mon Sep 17 00:00:00 2001 From: Leon Harris Date: Mon, 9 Dec 2013 16:48:11 +0000 Subject: [PATCH] added local nav extension via a specified template --- helpdesk/settings.py | 3 +++ helpdesk/templates/helpdesk/navigation.html | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/helpdesk/settings.py b/helpdesk/settings.py index aebcbd58..9b05a5b0 100644 --- a/helpdesk/settings.py +++ b/helpdesk/settings.py @@ -48,6 +48,9 @@ HELPDESK_KB_ENABLED_STAFF = getattr(settings, 'HELPDESK_KB_ENABLED_STAFF', False # show extended navigation by default, to all users, irrespective of staff status? HELPDESK_NAVIGATION_ENABLED = getattr(settings, 'HELPDESK_NAVIGATION_ENABLED', False) +# allow local customisation, add the contents of a template file to the nav bar. +HELPDESK_NAVIGATION_CUSTOM_EXTEND = getattr(settings, 'HELPDESK_NAVIGATION_CUSTOM_EXTEND', False) + # show 'stats' link in navigation bar? HELPDESK_NAVIGATION_STATS_ENABLED = getattr(settings, 'HELPDESK_NAVIGATION_STATS_ENABLED', True) diff --git a/helpdesk/templates/helpdesk/navigation.html b/helpdesk/templates/helpdesk/navigation.html index 1c9e4cbc..dc86a022 100644 --- a/helpdesk/templates/helpdesk/navigation.html +++ b/helpdesk/templates/helpdesk/navigation.html @@ -34,7 +34,10 @@ {% endif %} -
  • {% trans "Logout" %}
  • + {% if helpdesk_settings.HELPDESK_NAVIGATION_CUSTOM_EXTEND and user.is_superuser %} + {% include helpdesk_settings.HELPDESK_NAVIGATION_CUSTOM_EXTEND %} + {% endif %} +
  • {% trans "Logout" %} ({{ user.username }})
  • {% if not query %}