Thanks to Paul Boehm, this patch changes Admin links to use a

settings-driven URI rather than assuming /admin/. Resolves
issue #22
This commit is contained in:
Ross Poulton 2008-11-17 23:51:09 +00:00
parent f52fb79e79
commit 4a70c7bb1f
2 changed files with 13 additions and 7 deletions

View File

@ -9,11 +9,11 @@
<ul> <ul>
<li><a href='../ignore/'>{% trans "E-Mail Ignore list" %}</a></li> <li><a href='../ignore/'>{% trans "E-Mail Ignore list" %}</a></li>
<li><a href='/admin/helpdesk/queue/'>{% trans "Maintain Queues" %}</a></li> <li><a href='{{ ADMIN_URL }}helpdesk/queue/'>{% trans "Maintain Queues" %}</a></li>
<li><a href='/admin/helpdesk/presetreply/'>{% trans "Maintain Pre-Set Replies" %}</a></li> <li><a href='{{ ADMIN_URL }}helpdesk/presetreply/'>{% trans "Maintain Pre-Set Replies" %}</a></li>
<li><a href='/admin/helpdesk/kbcategory/'>{% trans "Maintain Knowledgebase Categories" %}</a></li> <li><a href='{{ ADMIN_URL }}helpdesk/kbcategory/'>{% trans "Maintain Knowledgebase Categories" %}</a></li>
<li><a href='/admin/helpdesk/kbitem/'>{% trans "Maintain Knowledgebase Items" %}</a></li> <li><a href='{{ ADMIN_URL }}helpdesk/kbitem/'>{% trans "Maintain Knowledgebase Items" %}</a></li>
<li><a href='/admin/helpdesk/emailtemplate/'>{% trans "Maintain E-Mail Templates" %}</a></li> <li><a href='{{ ADMIN_URL }}helpdesk/emailtemplate/'>{% trans "Maintain E-Mail Templates" %}</a></li>
<li><a href='/admin/auth/user/'>{% trans "Maintain Users" %}</a></li> <li><a href='{{ ADMIN_URL }}auth/user/'>{% trans "Maintain Users" %}</a></li>
</ul> </ul>
{% endblock %} {% endblock %}

View File

@ -7,6 +7,7 @@ urls.py - Mapping of URL's to our various views. Note we always used NAMED
views for simplicity in linking later on. views for simplicity in linking later on.
""" """
from django.conf import settings
from django.conf.urls.defaults import * from django.conf.urls.defaults import *
from django.contrib.auth.decorators import login_required from django.contrib.auth.decorators import login_required
from django.contrib.syndication.views import feed as django_feed from django.contrib.syndication.views import feed as django_feed
@ -144,6 +145,11 @@ urlpatterns += patterns('',
url(r'^system_settings/$', url(r'^system_settings/$',
'django.views.generic.simple.direct_to_template', 'django.views.generic.simple.direct_to_template',
{'template': 'helpdesk/system_settings.html',}, {
'template': 'helpdesk/system_settings.html',
'extra_context': {
'ADMIN_URL': getattr(settings, 'ADMIN_URL', '/admin/'),
},
},
name='helpdesk_system_settings'), name='helpdesk_system_settings'),
) )