Make it so the login link redirects you back to the page you were looking at.
[htsworkflow.git] / htsworkflow / frontend / templates / base.html
index a2e3919f7cb38e9435efcf0ad217a0624593d03f..7691c58aba2861c457c7e88e04689f2fe6e4f9ec 100644 (file)
 <body>
 <!-- Container -->
     {% if not is_popup %}
-    
+
     <div id="header">
         <div id="branding">
         {% block branding %}{% endblock %}
         </div>
         <div id="user-tools">
         {% if user.is_authenticated %}
-        {% trans 'Welcome,' %} <strong>{% firstof user.first_name user.username %}</strong>. {% block userlinks %}{% url django-admindocs-docroot as docsroot %}{% if docsroot %}<a href="{{ docsroot }}">{% trans 'Documentation' %}</a> / {% endif %}<a href="/admin/password_change/">{% trans 'Change password' %}</a> / <a href="/admin/logout/">{% trans 'Log out' %}</a>{% endblock %} 
+        {% trans 'Welcome,' %}
+        <strong>{% firstof user.first_name user.username %}</strong>.
+        {% block userlinks %}
+            {% url django-admindocs-docroot as docsroot %}
+            {% if docsroot %}
+                <a href="{{ docsroot }}">{% trans 'Documentation' %}</a> /
+            {% endif %}
+            <a href="{{root_path}}/accounts/password_change/">{% trans 'Change password' %}</a> /
+            <a href="{{root_path}}/accounts/logout/">{% trans 'Log out' %}</a>
+        {% endblock %}
         {% else %}
-        <a href="/admin/login/">{% trans 'Log in' %}</a>
+            <a href="{{root_path}}/accounts/login/?next={{thispage}}">{% trans 'Log in' %}</a>
         {% endif %}
         </div>
         {% block nav-global %}{% endblock %}
@@ -46,7 +55,7 @@
     {% if messages %}
         <ul class="messagelist">{% for message in messages %}<li>{{ message }}</li>{% endfor %}</ul>
     {% endif %}
-        
+
     <!-- Content -->
     <div id="content" class="{% block coltype %}colM{% endblock %}">
         {% block pretitle %}{% endblock %}