Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #3491 -- Fixed links in `user-tools` section of admin's `base.h…

…tml` template to use the `url` template tag. This also removes the need for child templates to override the block just to adjust the relative path. Thanks, saintsjd@gmail.com.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@6391 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 04a110836d5949aadbb7809264ecc60e7051ee98 1 parent 0dbd71a
Gary Wilson Jr. authored September 20, 2007
1  django/contrib/admin/templates/admin/auth/user/change_password.html
@@ -6,7 +6,6 @@
6 6
 {% endblock %}
7 7
 {% block stylesheet %}{% admin_media_prefix %}css/forms.css{% endblock %}
8 8
 {% block bodyclass %}{{ opts.app_label }}-{{ opts.object_name.lower }} change-form{% endblock %}
9  
-{% block userlinks %}<a href="../../../../doc/">{% trans 'Documentation' %}</a> / <a href="../../../../password_change/">{% trans 'Change password' %}</a> / <a href="../../../../logout/">{% trans 'Log out' %}</a>{% endblock %}
10 9
 {% block breadcrumbs %}{% if not is_popup %}
11 10
 <div class="breadcrumbs">
12 11
      <a href="../../../../">{% trans "Home" %}</a> &rsaquo;
9  django/contrib/admin/templates/admin/base.html
@@ -22,7 +22,14 @@
22 22
         {% block branding %}{% endblock %}
23 23
         </div>
24 24
         {% if user.is_authenticated and user.is_staff %}
25  
-        <div id="user-tools">{% trans 'Welcome,' %} <strong>{% if user.first_name %}{{ user.first_name|escape }}{% else %}{{ user.username }}{% endif %}</strong>. {% block userlinks %}<a href="doc/">{% trans 'Documentation' %}</a> / <a href="password_change/">{% trans 'Change password' %}</a> / <a href="logout/">{% trans 'Log out' %}</a>{% endblock %}</div>
  25
+        <div id="user-tools">
  26
+        {% trans 'Welcome,' %} <strong>{% if user.first_name %}{{ user.first_name|escape }}{% else %}{{ user.username }}{% endif %}</strong>.
  27
+        {% block userlinks %}
  28
+        <a href="{% url django.contrib.admin.views.doc.doc_index %}">{% trans 'Documentation' %}</a>
  29
+        / <a href="{% url django.contrib.auth.views.password_change %}">{% trans 'Change password' %}</a>
  30
+        / <a href="{% url django.contrib.auth.views.logout %}">{% trans 'Log out' %}</a>
  31
+        {% endblock %}
  32
+        </div>
26 33
         {% endif %}
27 34
         {% block nav-global %}{% endblock %}
28 35
     </div>
1  django/contrib/admin/templates/admin/change_form.html
@@ -7,7 +7,6 @@
7 7
 {% block stylesheet %}{% admin_media_prefix %}css/forms.css{% endblock %}
8 8
 {% block coltype %}{% if ordered_objects %}colMS{% else %}colM{% endif %}{% endblock %}
9 9
 {% block bodyclass %}{{ opts.app_label }}-{{ opts.object_name.lower }} change-form{% endblock %}
10  
-{% block userlinks %}<a href="../../../doc/">{% trans 'Documentation' %}</a> / <a href="../../../password_change/">{% trans 'Change password' %}</a> / <a href="../../../logout/">{% trans 'Log out' %}</a>{% endblock %}
11 10
 {% block breadcrumbs %}{% if not is_popup %}
12 11
 <div class="breadcrumbs">
13 12
      <a href="../../../">{% trans "Home" %}</a> &rsaquo;
1  django/contrib/admin/templates/admin/change_list.html
@@ -2,7 +2,6 @@
2 2
 {% load adminmedia admin_list i18n %}
3 3
 {% block stylesheet %}{% admin_media_prefix %}css/changelists.css{% endblock %}
4 4
 {% block bodyclass %}change-list{% endblock %}
5  
-{% block userlinks %}<a href="../../doc/">{% trans 'Documentation' %}</a> / <a href="../../password_change/">{% trans 'Change password' %}</a> / <a href="../../logout/">{% trans 'Log out' %}</a>{% endblock %}
6 5
 {% if not is_popup %}{% block breadcrumbs %}<div class="breadcrumbs"><a href="../../">{% trans "Home" %}</a> &rsaquo; {{ cl.opts.verbose_name_plural|capfirst|escape }}</div>{% endblock %}{% endif %}
7 6
 {% block coltype %}flex{% endblock %}
8 7
 {% block content %}
1  django/contrib/admin/templates/admin/delete_confirmation.html
... ...
@@ -1,6 +1,5 @@
1 1
 {% extends "admin/base_site.html" %}
2 2
 {% load i18n %}
3  
-{% block userlinks %}<a href="../../../../doc/">{% trans 'Documentation' %}</a> / <a href="../../../../password_change/">{% trans 'Change password' %}</a> / <a href="../../../../logout/">{% trans 'Log out' %}</a>{% endblock %}
4 3
 {% block breadcrumbs %}
5 4
 <div class="breadcrumbs">
6 5
      <a href="../../../../">{% trans "Home" %}</a> &rsaquo;
1  django/contrib/admin/templates/admin/object_history.html
... ...
@@ -1,6 +1,5 @@
1 1
 {% extends "admin/base_site.html" %}
2 2
 {% load i18n %}
3  
-{% block userlinks %}<a href="../../../../doc/">{% trans 'Documentation' %}</a> / <a href="../../../../password_change/">{% trans 'Change password' %}</a> / <a href="../../../../logout/">{% trans 'Log out' %}</a>{% endblock %}
4 3
 {% block breadcrumbs %}
5 4
 <div class="breadcrumbs"><a href="../../../../">{% trans 'Home' %}</a> &rsaquo; <a href="../../">{{ module_name|escape }}</a> &rsaquo; <a href="../">{{ object|escape|truncatewords:"18" }}</a> &rsaquo; {% trans 'History' %}</div>
6 5
 {% endblock %}
1  django/contrib/admin/templates/admin_doc/bookmarklets.html
... ...
@@ -1,7 +1,6 @@
1 1
 {% extends "admin/base_site.html" %}
2 2
 
3 3
 {% block breadcrumbs %}{% load i18n %}<div class="breadcrumbs"><a href="../../">{% trans "Home" %}</a> &rsaquo; <a href="../">{% trans "Documentation" %}</a> &rsaquo; {% trans "Bookmarklets" %}</div>{% endblock %}
4  
-{% block userlinks %}<a href="../../password_change/">{% trans 'Change password' %}</a> / <a href="../../logout/">{% trans 'Log out' %}</a>{% endblock %}
5 4
 {% block title %}{% trans "Documentation bookmarklets" %}{% endblock %}
6 5
 
7 6
 {% block content %}
1  django/contrib/admin/templates/admin_doc/index.html
... ...
@@ -1,7 +1,6 @@
1 1
 {% extends "admin/base_site.html" %}
2 2
 {% load i18n %}
3 3
 {% block breadcrumbs %}<div class="breadcrumbs"><a href="../">Home</a> &rsaquo; Documentation</div>{% endblock %}
4  
-{% block userlinks %}<a href="../password_change/">{% trans 'Change password' %}</a> / <a href="../logout/">{% trans 'Log out' %}</a>{% endblock %}
5 4
 {% block title %}Documentation{% endblock %}
6 5
 
7 6
 {% block content %}
1  django/contrib/admin/templates/admin_doc/missing_docutils.html
... ...
@@ -1,7 +1,6 @@
1 1
 {% extends "admin/base_site.html" %}
2 2
 {% load i18n %}
3 3
 {% block breadcrumbs %}<div class="breadcrumbs"><a href="../">Home</a> &rsaquo; Documentation</div>{% endblock %}
4  
-{% block userlinks %}<a href="../password_change/">{% trans 'Change password' %}</a> / <a href="../logout/">{% trans 'Log out' %}</a>{% endblock %}
5 4
 {% block title %}Please install docutils{% endblock %}
6 5
 
7 6
 {% block content %}
1  django/contrib/admin/templates/admin_doc/model_detail.html
... ...
@@ -1,6 +1,5 @@
1 1
 {% extends "admin/base_site.html" %}
2 2
 {% load i18n %}
3  
-{% block userlinks %}<a href="../../../password_change/">{% trans 'Change password' %}</a> / <a href="../../../logout/">{% trans 'Log out' %}</a>{% endblock %}
4 3
 {% block extrahead %}
5 4
 {{ block.super }}
6 5
 <style type="text/css">
1  django/contrib/admin/templates/admin_doc/model_index.html
@@ -2,7 +2,6 @@
2 2
 {% load i18n %}
3 3
 {% block coltype %}colSM{% endblock %}
4 4
 {% block breadcrumbs %}<div class="breadcrumbs"><a href="../../">Home</a> &rsaquo; <a href="../">Documentation</a> &rsaquo; Models</div>{% endblock %}
5  
-{% block userlinks %}<a href="../../password_change/">{% trans 'Change password' %}</a> / <a href="../../logout/">{% trans 'Log out' %}</a>{% endblock %}
6 5
 
7 6
 {% block title %}Models{% endblock %}
8 7
 
1  django/contrib/admin/templates/admin_doc/template_detail.html
... ...
@@ -1,7 +1,6 @@
1 1
 {% extends "admin/base_site.html" %}
2 2
 {% load i18n %}
3 3
 {% block breadcrumbs %}<div class="breadcrumbs"><a href="../../../">Home</a> &rsaquo; <a href="../../">Documentation</a> &rsaquo; Templates &rsaquo; {{ name|escape }}</div>{% endblock %}
4  
-{% block userlinks %}<a href="../../../password_change/">{% trans 'Change password' %}</a> / <a href="../../../logout/">{% trans 'Log out' %}</a>{% endblock %}
5 4
 
6 5
 {% block title %}Template: {{ name|escape }}{% endblock %}
7 6
 
1  django/contrib/admin/templates/admin_doc/template_filter_index.html
@@ -2,7 +2,6 @@
2 2
 {% load i18n %}
3 3
 {% block coltype %}colSM{% endblock %}
4 4
 {% block breadcrumbs %}<div class="breadcrumbs"><a href="../../">Home</a> &rsaquo; <a href="../">Documentation</a> &rsaquo; filters</div>{% endblock %}
5  
-{% block userlinks %}<a href="../../password_change/">{% trans 'Change password' %}</a> / <a href="../../logout/">{% trans 'Log out' %}</a>{% endblock %}
6 5
 {% block title %}Template filters{% endblock %}
7 6
 
8 7
 {% block content %}
1  django/contrib/admin/templates/admin_doc/template_tag_index.html
@@ -2,7 +2,6 @@
2 2
 {% load i18n %}
3 3
 {% block coltype %}colSM{% endblock %}
4 4
 {% block breadcrumbs %}<div class="breadcrumbs"><a href="../../">Home</a> &rsaquo; <a href="../">Documentation</a> &rsaquo; Tags</div>{% endblock %}
5  
-{% block userlinks %}<a href="../../password_change/">{% trans 'Change password' %}</a> / <a href="../../logout/">{% trans 'Log out' %}</a>{% endblock %}
6 5
 {% block title %}Template tags{% endblock %}
7 6
 
8 7
 {% block content %}
1  django/contrib/admin/templates/admin_doc/view_detail.html
... ...
@@ -1,7 +1,6 @@
1 1
 {% extends "admin/base_site.html" %}
2 2
 {% load i18n %}
3 3
 {% block breadcrumbs %}<div class="breadcrumbs"><a href="../../../">Home</a> &rsaquo; <a href="../../">Documentation</a> &rsaquo; <a href="../">Views</a> &rsaquo; {{ name }}</div>{% endblock %}
4  
-{% block userlinks %}<a href="../../../password_change/">{% trans 'Change password' %}</a> / <a href="../../../logout/">{% trans 'Log out' %}</a>{% endblock %}
5 4
 {% block title %}View: {{ name }}{% endblock %}
6 5
 
7 6
 {% block content %}
1  django/contrib/admin/templates/admin_doc/view_index.html
@@ -2,7 +2,6 @@
2 2
 {% load i18n %}
3 3
 {% block coltype %}colSM{% endblock %}
4 4
 {% block breadcrumbs %}<div class="breadcrumbs"><a href="../../">Home</a> &rsaquo; <a href="../">Documentation</a> &rsaquo; Views</div>{% endblock %}
5  
-{% block userlinks %}<a href="../../password_change/">{% trans 'Change password' %}</a> / <a href="../../logout/">{% trans 'Log out' %}</a>{% endblock %}
6 5
 {% block title %}Views{% endblock %}
7 6
 
8 7
 {% block content %}
1  django/contrib/admin/templates/registration/password_change_done.html
... ...
@@ -1,6 +1,5 @@
1 1
 {% extends "admin/base_site.html" %}
2 2
 {% load i18n %}
3  
-{% block userlinks %}<a href="../../doc/">{% trans 'Documentation' %}</a> / {% trans 'Change password' %} / <a href="../../logout/">{% trans 'Log out' %}</a>{% endblock %}
4 3
 {% block breadcrumbs %}<div class="breadcrumbs"><a href="../../">{% trans 'Home' %}</a> &rsaquo; {% trans 'Password change' %}</div>{% endblock %}
5 4
 
6 5
 {% block title %}{% trans 'Password change successful' %}{% endblock %}
1  django/contrib/admin/templates/registration/password_change_form.html
... ...
@@ -1,6 +1,5 @@
1 1
 {% extends "admin/base_site.html" %}
2 2
 {% load i18n %}
3  
-{% block userlinks %}<a href="../doc/">{% trans 'Documentation' %}</a> / {% trans 'Change password' %} / <a href="../logout/">{% trans 'Log out' %}</a>{% endblock %}
4 3
 {% block breadcrumbs %}<div class="breadcrumbs"><a href="../">{% trans 'Home' %}</a> &rsaquo; {% trans 'Password change' %}</div>{% endblock %}
5 4
 
6 5
 {% block title %}{% trans 'Password change' %}{% endblock %}

0 notes on commit 04a1108

Please sign in to comment.
Something went wrong with that request. Please try again.