Make login link go to the users preferred dashboard/ticket list. Fixes #97, thanks @emperorcezar

This commit is contained in:
Ross Poulton 2012-08-07 20:38:15 +10:00
parent 776d88dbd6
commit 313f565006

View File

@ -32,7 +32,7 @@
{% endif %}
{% if helpdesk_settings.HELPDESK_KB_ENABLED %}<li><a href='{% url helpdesk_kb_index %}'>{% trans "Knowledgebase" %}</a></li>{% endif %}
{% if not request.path == '/helpdesk/login/' or user.is_authenticated %}
<li>{% if user.is_authenticated %}<a href='{% url logout %}'>{% trans "Logout" %}</a>{% else %}<a href='{% url login %}?next={% if next %}{{ next|escape }}{% else %}{% url helpdesk_dashboard %}{% endif %}'>{% trans "Log In" %}</a>{% endif %}</li>
<li>{% if user.is_authenticated %}<a href='{% url logout %}'>{% trans "Logout" %}</a>{% else %}<a href='{% url login %}?next={% if next %}{{ next|escape }}{% else %}{% url helpdesk_home %}{% endif %}'>{% trans "Log In" %}</a>{% endif %}</li>
{% endif %}
</ul>
{% endif %}