Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #223 -- Changed breadcrumbs in admin doc templates to use relat…

…ive, not absolute, URLs. Thanks, Drew Amato

git-svn-id: http://code.djangoproject.com/svn/django/trunk@337 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit d4a9a4f83a4e4d94b7357666ee99eec0d3ef5486 1 parent daf8467
Adrian Holovaty authored July 29, 2005
8  django/conf/admin_templates/doc/bookmarklets.html
... ...
@@ -1,6 +1,6 @@
1 1
 {% extends "base_site" %}
2 2
 
3  
-{% block breadcrumbs %}<div class="breadcrumbs"><a href="/">Home</a> &rsaquo; <a href="/doc/">Documentation</a> &rsaquo; Bookmarklets</div>{% endblock %}
  3
+{% block breadcrumbs %}<div class="breadcrumbs"><a href="../../">Home</a> &rsaquo; <a href="../">Documentation</a> &rsaquo; Bookmarklets</div>{% endblock %}
4 4
 
5 5
 {% block title %}Documentation bookmarklets{% endblock %}
6 6
 
@@ -10,19 +10,19 @@
10 10
 toolbar, or right-click the link and add it to your bookmarks. Now you can
11 11
 select the bookmarklet from any page in the site.  Note that some of these
12 12
 bookmarklets require you to be viewing the site from a computer designated
13  
-as "internal" (talk to your system administrator if you aren't sure if 
  13
+as "internal" (talk to your system administrator if you aren't sure if
14 14
 your computer is "internal").</p>
15 15
 
16 16
 <div id="content-main">
17 17
     <h3><a href="javascript:(function(){if(typeof ActiveXObject!='undefined'){x=new ActiveXObject('Microsoft.XMLHTTP')}else if(typeof XMLHttpRequest!='undefined'){x=new XMLHttpRequest()}else{return;}x.open('HEAD',location.href,false);x.send(null);try{view=x.getResponseHeader('x-view');}catch(e){alert('No view found for this page');return;}if(view=="undefined"){alert("No view found for this page");}document.location='{{ admin_url }}/doc/views/'+view+'/';})()">Documentation for this page</a></h3>
18 18
     <p>Jumps you from any page to the documentation for the view that generates that page.</p>
19  
-    
  19
+
20 20
     <h3><a href="javascript:(function(){if(typeof ActiveXObject!='undefined'){x=new ActiveXObject('Microsoft.XMLHTTP')}else if(typeof XMLHttpRequest!='undefined'){x=new XMLHttpRequest()}else{return;}x.open('GET',location.href,false);x.send(null);try{type=x.getResponseHeader('x-object-type');id=x.getResponseHeader('x-object-id');}catch(e){type='(none)';id='(none)';}d=document;b=d.body;e=d.createElement('div');e.id='xxxhhh';s=e.style;s.position='absolute';s.left='10px';s.top='10px';s.font='10px monospace';s.border='1px black solid';s.padding='4px';s.backgroundColor='#eee';e.appendChild(d.createTextNode('Type: '+type));e.appendChild(d.createElement('br'));e.appendChild(d.createTextNode('ID: '+id));e.appendChild(d.createElement('br'));l=d.createElement('a');l.href='#';l.onclick=function(){b.removeChild(e);};l.appendChild(d.createTextNode('[close]'));l.style.textDecoration='none';e.appendChild(l);b.appendChild(e);})();">Show object ID</a></h3>
21 21
     <p>Shows the content-type and unique ID for pages that represent a single object.</p>
22 22
 
23 23
     <h3><a href="javascript:(function(){if(typeof ActiveXObject!='undefined'){var x=new ActiveXObject('Microsoft.XMLHTTP')}else if(typeof XMLHttpRequest!='undefined'){var x=new XMLHttpRequest()}else{return;}x.open('GET',location.href,false);x.send(null);try{var type=x.getResponseHeader('x-object-type');var id=x.getResponseHeader('x-object-id');}catch(e){return;}document.location='{{ admun_url }}/'+type.split('.').join('/')+'/'+id+'/';})()">Edit this object (current window)</a></h3>
24 24
     <p>Jumps to the admin page for pages that represent a single object.</p>
25  
-    
  25
+
26 26
     <h3><a href="javascript:(function(){if(typeof ActiveXObject!='undefined'){var x=new ActiveXObject('Microsoft.XMLHTTP')}else if(typeof XMLHttpRequest!='undefined'){var x=new XMLHttpRequest()}else{return;}x.open('GET',location.href,false);x.send(null);try{var type=x.getResponseHeader('x-object-type');var id=x.getResponseHeader('x-object-id');}catch(e){return;}window.open('{{ admun_url }}/'+type.split('.').join('/')+'/'+id+'/');})()">Edit this object (new window)</a></h3>
27 27
     <p>As above, but opens the admin page in a new window.</p>
28 28
 </div>
12  django/conf/admin_templates/doc/index.html
... ...
@@ -1,6 +1,6 @@
1 1
 {% extends "base_site" %}
2 2
 
3  
-{% block breadcrumbs %}<div class="breadcrumbs"><a href="/">Home</a> &rsaquo; Documentation</div>{% endblock %}
  3
+{% block breadcrumbs %}<div class="breadcrumbs"><a href="../">Home</a> &rsaquo; Documentation</div>{% endblock %}
4 4
 
5 5
 {% block title %}Documentation{% endblock %}
6 6
 
@@ -11,19 +11,19 @@
11 11
 <div id="content-main">
12 12
 	<h3><a href="tags/">Tags</a></h3>
13 13
 	<p>List of all the template tags and their functions.</p>
14  
-	
  14
+
15 15
 	<h3><a href="filters/">Filters</a></h3>
16 16
 	<p>Filters are actions which can be applied to variables in a template to alter the output.</p>
17  
-	
  17
+
18 18
 	<h3><a href="models/">Models</a></h3>
19 19
 	<p>Models are descriptions of all the objects in the system and their associated fields. Each model has a list of fields which can be accessed as template variables.</p>
20  
-	
  20
+
21 21
 	<h3><a href="views/">Views</a></h3>
22 22
 	<p>Each page on the public site is generated by a view. The view defines which template is used to generate the page and which objects are available to that template.</p>
23  
-	
  23
+
24 24
 	<h3><a href="views/">Views</a></h3>
25 25
 	<p>Each page on the public site is generated by a view. The view defines which template is used to generate the page and which objects are available to that template.</p>
26  
-    
  26
+
27 27
     <h3><a href="bookmarklets/">Bookmarklets</a></h3>
28 28
     <p>Tools for your browser to quickly access admin functionality.</p>
29 29
 </div>
4  django/conf/admin_templates/doc/missing_docutils.html
... ...
@@ -1,6 +1,6 @@
1 1
 {% extends "base_site" %}
2 2
 
3  
-{% block breadcrumbs %}<div class="breadcrumbs"><a href="/">Home</a> &rsaquo; Documentation</div>{% endblock %}
  3
+{% block breadcrumbs %}<div class="breadcrumbs"><a href="../">Home</a> &rsaquo; Documentation</div>{% endblock %}
4 4
 
5 5
 {% block title %}Please install docutils{% endblock %}
6 6
 
@@ -10,7 +10,7 @@
10 10
 
11 11
 <div id="content-main">
12 12
 	<h3>The admin documentation system requires Python's <a href="http://docutils.sf.net/">docutils</a> library.</h3>
13  
-	
  13
+
14 14
 	<p>Please ask your administrators to install <a href="http://docutils.sf.net/">docutils</a>.</p>
15 15
 </div>
16 16
 
2  django/conf/admin_templates/doc/model_detail.html
@@ -12,7 +12,7 @@
12 12
 
13 13
 {% endblock %}
14 14
 
15  
-{% block breadcrumbs %}<div class="breadcrumbs"><a href="/">Home</a> &rsaquo; <a href="/doc/">Documentation</a> &rsaquo; <a href="/doc/models/">Models</a> &rsaquo; {{ name }}</div>{% endblock %}
  15
+{% block breadcrumbs %}<div class="breadcrumbs"><a href="../../../">Home</a> &rsaquo; <a href="../../">Documentation</a> &rsaquo; <a href="../">Models</a> &rsaquo; {{ name }}</div>{% endblock %}
16 16
 
17 17
 {% block title %}Model: {{ name }}{% endblock %}
18 18
 
44  django/conf/admin_templates/doc/model_index.html
... ...
@@ -1,44 +1,44 @@
1 1
 {% extends "base_site" %}
2  
-
3  
-{% block coltype %}colSM{% endblock %}
4  
-
5  
-{% block breadcrumbs %}<div class="breadcrumbs"><a href="/">Home</a> &rsaquo; <a href="/doc/">Documentation</a> &rsaquo; Models</div>{% endblock %}
  2
+
  3
+{% block coltype %}colSM{% endblock %}
  4
+
  5
+{% block breadcrumbs %}<div class="breadcrumbs"><a href="../../">Home</a> &rsaquo; <a href="../">Documentation</a> &rsaquo; Models</div>{% endblock %}
6 6
 
7 7
 {% block title %}Models{% endblock %}
8 8
 
9 9
 {% block content %}
10 10
 
11 11
 <h1>Models Documentation</h1>
12  
-
  12
+
13 13
 <div id="content-main">
14 14
 {% regroup models|dictsort:"module" by module as grouped_models %}
15  
-{% for group in grouped_models %}
  15
+{% for group in grouped_models %}
16 16
 <div class="module">
17 17
 <h2 id='{{ group.grouper }}'>{{ group.grouper }}</h2>
18 18
 
19 19
 <table class="xfull">
20 20
 {% for model in group.list %}
21  
-<tr>
22  
-<th><a href="{{ model.name }}/">{{ model.class }}</a></th>
  21
+<tr>
  22
+<th><a href="{{ model.name }}/">{{ model.class }}</a></th>
23 23
 </tr>
24 24
 {% endfor %}
25 25
 </table>
26 26
 </div>
27 27
 {% endfor %}
28  
-
  28
+
29 29
 </div>
30  
-{% endblock %}
31  
-
32  
-{% block sidebar %}
33  
-<div id="content-related" class="sidebar">
34  
-<div class="module">
35  
-<h2>Model Groups Quick List</h2>
36  
-<ul>
  30
+{% endblock %}
  31
+
  32
+{% block sidebar %}
  33
+<div id="content-related" class="sidebar">
  34
+<div class="module">
  35
+<h2>Model Groups Quick List</h2>
  36
+<ul>
37 37
 {% regroup models|dictsort:"module" by module as grouped_models %}
38  
-{% for group in grouped_models %}
39  
-    <li><a href="#{{ group.grouper }}">{{ group.grouper }}</a></li>
40  
-{% endfor %}
41  
-</ul>
42  
-</div>
43  
-</div>
  38
+{% for group in grouped_models %}
  39
+    <li><a href="#{{ group.grouper }}">{{ group.grouper }}</a></li>
  40
+{% endfor %}
  41
+</ul>
  42
+</div>
  43
+</div>
44 44
 {% endblock %}
6  django/conf/admin_templates/doc/template_filter_index.html
... ...
@@ -1,12 +1,8 @@
1 1
 {% extends "base_site" %}
2 2
 
3  
-
4 3
 {% block coltype %}colSM{% endblock %}
5 4
 
6  
-
7  
-
8  
-{% block breadcrumbs %}<div class="breadcrumbs"><a href="/">Home</a> &rsaquo; <a href="/doc/">Documentation</a> &rsaquo; filters</div>{% endblock %}
9  
-
  5
+{% block breadcrumbs %}<div class="breadcrumbs"><a href="../../">Home</a> &rsaquo; <a href="../">Documentation</a> &rsaquo; filters</div>{% endblock %}
10 6
 
11 7
 {% block title %}Template filters{% endblock %}
12 8
 
6  django/conf/admin_templates/doc/template_tag_index.html
... ...
@@ -1,12 +1,8 @@
1 1
 {% extends "base_site" %}
2 2
 
3  
-
4 3
 {% block coltype %}colSM{% endblock %}
5 4
 
6  
-
7  
-
8  
-{% block breadcrumbs %}<div class="breadcrumbs"><a href="/">Home</a> &rsaquo; <a href="/doc/">Documentation</a> &rsaquo; Tags</div>{% endblock %}
9  
-
  5
+{% block breadcrumbs %}<div class="breadcrumbs"><a href="../../">Home</a> &rsaquo; <a href="../">Documentation</a> &rsaquo; Tags</div>{% endblock %}
10 6
 
11 7
 {% block title %}Template tags{% endblock %}
12 8
 
18  django/conf/admin_templates/doc/view_detail.html
... ...
@@ -1,8 +1,8 @@
1 1
 {% extends "base_site" %}
2  
-
3  
-{% block breadcrumbs %}<div class="breadcrumbs"><a href="/">Home</a> &rsaquo; <a href="/doc/">Documentation</a> &rsaquo; <a href="/doc/views/">Views</a> &rsaquo; {{ name }}</div>{% endblock %}
4 2
 
5  
-{% block title %}View: {{ name }}{% endblock %}
  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
+
  5
+{% block title %}View: {{ name }}{% endblock %}
6 6
 
7 7
 {% block content %}
8 8
 
@@ -11,16 +11,16 @@
11 11
 <h2 class="subhead">{{ summary }}</h2>
12 12
 
13 13
 <p>{{ body }}</p>
14  
-
  14
+
15 15
 {% if meta.Context %}
16  
-<h3>Context:</h3>
17  
-<p>{{ meta.Context }}</p>
  16
+<h3>Context:</h3>
  17
+<p>{{ meta.Context }}</p>
18 18
 {% endif %}
19  
-
  19
+
20 20
 {% if meta.Templates %}
21 21
 <h3>Templates:</h3>
22  
-<p>{{ meta.Templates }}</p>
  22
+<p>{{ meta.Templates }}</p>
23 23
 {% endif %}
24  
-
  24
+
25 25
 <p class="small"><a href="../">&lsaquo; Back to Views Documentation</a></p>
26 26
 {% endblock %}
18  django/conf/admin_templates/doc/view_index.html
@@ -2,20 +2,15 @@
2 2
 
3 3
 {% block coltype %}colSM{% endblock %}
4 4
 
5  
-{% block breadcrumbs %}<div class="breadcrumbs"><a href="/">Home</a> &rsaquo; <a href="/doc/">Documentation</a> &rsaquo; Views</div>{% endblock %}
6  
-
  5
+{% block breadcrumbs %}<div class="breadcrumbs"><a href="../../">Home</a> &rsaquo; <a href="../">Documentation</a> &rsaquo; Views</div>{% endblock %}
  6
+
7 7
 {% block title %}Views{% endblock %}
8  
-
9  
-
  8
+
10 9
 {% block content %}
11 10
 
12  
-
13  
-
14 11
 <h1>View documentation</h1>
15 12
 
16  
-
17  
-<div id="content-main">
18  
-
  13
+<div id="content-main">
19 14
 
20 15
 {% regroup views|dictsort:"site_id" by site as views_by_site %}
21 16
 {% for site_views in views_by_site %}
@@ -32,8 +27,7 @@ <h2 id="site{{ site_views.grouper.id }}">Views by URL on {{ site_views.grouper.n
32 27
 </div>
33 28
 {% endfor %}
34 29
 
35  
-</div>
36  
-
  30
+</div>
37 31
 
38 32
 {% endblock %}
39 33
 
@@ -49,4 +43,4 @@ <h2 id="site{{ site_views.grouper.id }}">Views by URL on {{ site_views.grouper.n
49 43
 </ul>
50 44
 </div>
51 45
 </div>
52  
-{% endblock %}
  46
+{% endblock %}

0 notes on commit d4a9a4f

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