diff --git a/helpdesk/templates/helpdesk/system_settings.html b/helpdesk/templates/helpdesk/system_settings.html index bead3bdb..311b8d96 100644 --- a/helpdesk/templates/helpdesk/system_settings.html +++ b/helpdesk/templates/helpdesk/system_settings.html @@ -1,4 +1,4 @@ -{% extends "helpdesk/base.html" %}{% load i18n %}{% load url from future %} +{% extends "helpdesk/base.html" %}{% load i18n %}{% load url from future %}{% load user_admin_url %} {% block helpdesk_title %}{% trans "Change System Settings" %}{% endblock %} @@ -14,6 +14,6 @@
  • {% trans "Maintain Knowledgebase Categories" %}
  • {% trans "Maintain Knowledgebase Items" %}
  • {% trans "Maintain E-Mail Templates" %}
  • -
  • {% trans "Maintain Users" %}
  • +
  • {% trans "Maintain Users" %}
  • {% endblock %} diff --git a/helpdesk/templatetags/user_admin_url.py b/helpdesk/templatetags/user_admin_url.py new file mode 100644 index 00000000..fb7bc95a --- /dev/null +++ b/helpdesk/templatetags/user_admin_url.py @@ -0,0 +1,22 @@ +""" +django-helpdesk - A Django powered ticket tracker for small enterprise. + +(c) Copyright 2008 Jutda. All Rights Reserved. See LICENSE for details. + +templatetags/admin_url.py - Very simple template tag allow linking to the + right auth user model urls. + +{% url 'changelist'|user_admin_url %} +""" + +from django import template +from django.contrib.auth import get_user_model + +def user_admin_url(action): + user = get_user_model() + return 'admin:%s_%s_%s' % ( + user._meta.app_label, user._meta.model_name, + action) + +register = template.Library() +register.filter(user_admin_urlname)