diff --git a/helpdesk/templates/helpdesk/navigation.html b/helpdesk/templates/helpdesk/navigation.html
index 6fc52b0d..4cc2ea89 100644
--- a/helpdesk/templates/helpdesk/navigation.html
+++ b/helpdesk/templates/helpdesk/navigation.html
@@ -28,8 +28,8 @@
{% trans "Submit A Ticket" %}
{% endif %}
{% if helpdesk_settings.HELPDESK_KB_ENABLED %}{% trans "Knowledgebase" %}{% endif %}
-{% if not helpdesk_settings.HELPDESK_REDIRECT_TO_LOGIN_BY_DEFAULT or user.is_authenticated %}
-{% if user.is_authenticated %}{% trans "Logout" %}{% else %}{% trans "Log In" %}{% endif %}
+{% if not request.path == '/helpdesk/login/' or user.is_authenticated %}
+{% if user.is_authenticated %}{% trans "Logout" %}{% else %}{% trans "Log In" %}{% endif %}
{% endif %}
{% endif %}
diff --git a/helpdesk/views/public.py b/helpdesk/views/public.py
index e7ee1682..d3506e9e 100644
--- a/helpdesk/views/public.py
+++ b/helpdesk/views/public.py
@@ -111,10 +111,16 @@ def view_ticket(request):
return update_ticket(request, ticket_id, public=True)
+ # redirect user back to this ticket if possible.
+ redirect_url = ''
+ if helpdesk_settings.HELPDESK_NAVIGATION_ENABLED:
+ redirect_url = reverse('helpdesk_view', args=[ticket_id])
+
return render_to_response('helpdesk/public_view_ticket.html',
RequestContext(request, {
'ticket': ticket,
'helpdesk_settings': helpdesk_settings,
+ 'next': redirect_url,
}))
return render_to_response('helpdesk/public_view_form.html',