mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2025-01-19 04:19:54 +01:00
Merge pull request #64 from joshuajonah/master
Added flexibility to disable the knowledgebase by using settings.HELPDESK_KB_ENABLED = False.
This commit is contained in:
commit
3b43cec5cf
@ -27,3 +27,6 @@ if type(DEFAULT_USER_SETTINGS) != type(dict()):
|
||||
'email_on_ticket_apichange': True,
|
||||
'tickets_per_page': 25
|
||||
}
|
||||
|
||||
# show knowledgebase links?
|
||||
HELPDESK_KB_ENABLED = getattr(settings, 'HELPDESK_KB_ENABLED', True)
|
||||
|
2
helpdesk/templates/helpdesk/attribution.html
Normal file
2
helpdesk/templates/helpdesk/attribution.html
Normal file
@ -0,0 +1,2 @@
|
||||
{% load i18n %}
|
||||
{% trans "Powered by <a href='https://github.com/rossp/django-helpdesk'>django-helpdesk</a>." %}
|
@ -51,7 +51,7 @@
|
||||
</div>
|
||||
|
||||
<div id='footer'>
|
||||
<p>{% trans "Powered by <a href='https://github.com/rossp/django-helpdesk'>django-helpdesk</a>." %} <a href='{% url helpdesk_rss_index %}'><img src='{{ STATIC_URL }}helpdesk/rss_icon.png' width='14' height='14' alt='{% trans "RSS Icon" %}' title='{% trans "RSS Feeds" %}' border='0' />{% trans "RSS Feeds" %}</a> <a href='{% url helpdesk_api_help %}'>{% trans "API" %}</a> <a href='{% url helpdesk_user_settings %}'>{% trans "User Settings" %}</a> {% if user.is_superuser %}<a href='{% url helpdesk_system_settings %}'>{% trans "System Settings" %}</a>{% endif %}</p>
|
||||
<p>{% include "helpdesk/attribution.html" %}<a href='{% url helpdesk_rss_index %}'><img src='{{ STATIC_URL }}helpdesk/rss_icon.png' width='14' height='14' alt='{% trans "RSS Icon" %}' title='{% trans "RSS Feeds" %}' border='0' />{% trans "RSS Feeds" %}</a> <a href='{% url helpdesk_api_help %}'>{% trans "API" %}</a> <a href='{% url helpdesk_user_settings %}'>{% trans "User Settings" %}</a> {% if user.is_superuser %}<a href='{% url helpdesk_system_settings %}'>{% trans "System Settings" %}</a>{% endif %}</p>
|
||||
</div>
|
||||
</div>
|
||||
{% include "helpdesk/debug.html" %}
|
||||
|
@ -23,7 +23,7 @@
|
||||
{% else %}
|
||||
<ul>
|
||||
<li><a href='{% url helpdesk_home %}'>{% trans "Submit A Ticket" %}</a></li>
|
||||
<li><a href='{% url helpdesk_kb_index %}'>{% trans "Knowledgebase" %}</a></li>
|
||||
{% if helpdesk_settings.HELPDESK_KB_ENABLED %}<li><a href='{% url helpdesk_kb_index %}'>{% trans "Knowledgebase" %}</a></li>{% endif %}
|
||||
<li><a href='{% url login %}?next={% url helpdesk_dashboard %}'>{% trans "Log In" %}</a></li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
@ -15,7 +15,7 @@
|
||||
{% block helpdesk_body %}{% endblock %}
|
||||
</div>
|
||||
<div id='footer'>
|
||||
<p>{% trans "Powered by <a href='http://github.com/rossp/django-helpdesk'>django-helpdesk</a>." %}</p>
|
||||
<p>{% include "helpdesk/attribution.html" %}</p>
|
||||
</div>
|
||||
</div>{% include "helpdesk/debug.html" %}
|
||||
</body>
|
||||
|
@ -12,8 +12,10 @@ from django.conf.urls.defaults import *
|
||||
from django.contrib.auth.decorators import login_required
|
||||
from django.contrib.syndication.views import feed as django_feed
|
||||
|
||||
from helpdesk import settings as helpdesk_settings
|
||||
from helpdesk.views.feeds import feed_setup
|
||||
|
||||
|
||||
urlpatterns = patterns('helpdesk.views.staff',
|
||||
url(r'^dashboard/$',
|
||||
'dashboard',
|
||||
@ -151,6 +153,7 @@ urlpatterns += patterns('',
|
||||
name='logout'),
|
||||
)
|
||||
|
||||
if helpdesk_settings.HELPDESK_KB_ENABLED:
|
||||
urlpatterns += patterns('helpdesk.views.kb',
|
||||
url(r'^kb/$',
|
||||
'index', name='helpdesk_kb_index'),
|
||||
|
@ -15,6 +15,7 @@ from django.shortcuts import render_to_response, get_object_or_404
|
||||
from django.template import loader, Context, RequestContext
|
||||
from django.utils.translation import ugettext as _
|
||||
|
||||
from helpdesk import settings as helpdesk_settings
|
||||
from helpdesk.forms import PublicTicketForm
|
||||
from helpdesk.lib import send_templated_mail, text_is_spam
|
||||
from helpdesk.models import Ticket, Queue, UserSettings
|
||||
@ -62,6 +63,7 @@ def homepage(request):
|
||||
return render_to_response('helpdesk/public_homepage.html',
|
||||
RequestContext(request, {
|
||||
'form': form,
|
||||
'helpdesk_settings': helpdesk_settings,
|
||||
}))
|
||||
|
||||
|
||||
@ -116,5 +118,6 @@ def view_ticket(request):
|
||||
'ticket': ticket,
|
||||
'email': email,
|
||||
'error_message': error_message,
|
||||
'helpdesk_settings': helpdesk_settings,
|
||||
}))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user