|
1 {% extends "basic/layout.html" %} |
|
2 |
|
3 {%- macro secondnav() %} |
|
4 {%- if prev %} |
|
5 « <a href="{{ prev.link|e }}" title="{{ prev.title|e }}">previous</a> |
|
6 {{ reldelim2 }} |
|
7 {%- endif %} |
|
8 {%- if parents %} |
|
9 <a href="{{ parents.0.link|e }}" title="{{ parents.0.title|e }}" accesskey="U">up</a> |
|
10 {%- else %} |
|
11 <a title="{{ docstitle }}" href="{{ pathto('index') }}" accesskey="U">up</a> |
|
12 {%- endif %} |
|
13 {%- if next %} |
|
14 {{ reldelim2 }} |
|
15 <a href="{{ next.link|e }}" title="{{ next.title|e }}">next</a> » |
|
16 {%- endif %} |
|
17 {%- endmacro %} |
|
18 |
|
19 {% block extrahead %} |
|
20 {{ super() }} |
|
21 <script type="text/javascript" src="{{ pathto('templatebuiltins.js', 1) }}"></script> |
|
22 <script type="text/javascript"> |
|
23 (function($) { |
|
24 if (!django_template_builtins) { |
|
25 // templatebuiltins.js missing, do nothing. |
|
26 return; |
|
27 } |
|
28 $(document).ready(function() { |
|
29 // Hyperlink Django template tags and filters |
|
30 var base = "{{ pathto('ref/templates/builtins') }}"; |
|
31 if (base == "#") { |
|
32 // Special case for builtins.html itself |
|
33 base = ""; |
|
34 } |
|
35 // Tags are keywords, class '.k' |
|
36 $("div.highlight\\-html\\+django span.k").each(function(i, elem) { |
|
37 var tagname = $(elem).text(); |
|
38 if ($.inArray(tagname, django_template_builtins.ttags) != -1) { |
|
39 var fragment = tagname.replace(/_/, '-'); |
|
40 $(elem).html("<a href='" + base + "#" + fragment + "'>" + tagname + "</a>"); |
|
41 } |
|
42 }); |
|
43 // Filters are functions, class '.nf' |
|
44 $("div.highlight\\-html\\+django span.nf").each(function(i, elem) { |
|
45 var filtername = $(elem).text(); |
|
46 if ($.inArray(filtername, django_template_builtins.tfilters) != -1) { |
|
47 var fragment = filtername.replace(/_/, '-'); |
|
48 $(elem).html("<a href='" + base + "#" + fragment + "'>" + filtername + "</a>"); |
|
49 } |
|
50 }); |
|
51 }); |
|
52 })(jQuery); |
|
53 </script> |
|
54 {% endblock %} |
|
55 |
|
56 {% block document %} |
|
57 <div id="custom-doc" class="{% block bodyclass %}{{ 'yui-t6' if pagename != 'index' else '' }}{% endblock %}"> |
|
58 <div id="hd"> |
|
59 <h1><a href="{{ pathto('index') }}">{{ docstitle }}</a></h1> |
|
60 <div id="global-nav"> |
|
61 <a title="Home page" href="{{ pathto('index') }}">Home</a> {{ reldelim2 }} |
|
62 <a title="Table of contents" href="{{ pathto('contents') }}">Table of contents</a> {{ reldelim2 }} |
|
63 <a title="Global index" href="{{ pathto('genindex') }}">Index</a> {{ reldelim2 }} |
|
64 <a title="Module index" href="{{ pathto('py-modindex') }}">Modules</a> |
|
65 </div> |
|
66 <div class="nav">{{ secondnav() }}</div> |
|
67 </div> |
|
68 |
|
69 <div id="bd"> |
|
70 <div id="yui-main"> |
|
71 <div class="yui-b"> |
|
72 <div class="yui-g" id="{{ pagename|replace('/', '-') }}"> |
|
73 {% block body %}{% endblock %} |
|
74 </div> |
|
75 </div> |
|
76 </div> |
|
77 {% block sidebarwrapper %} |
|
78 {% if pagename != 'index' %} |
|
79 <div class="yui-b" id="sidebar"> |
|
80 {{ sidebar() }} |
|
81 {%- if last_updated %} |
|
82 <h3>Last update:</h3> |
|
83 <p class="topless">{{ last_updated }}</p> |
|
84 {%- endif %} |
|
85 </div> |
|
86 {% endif %} |
|
87 {% endblock %} |
|
88 </div> |
|
89 |
|
90 <div id="ft"> |
|
91 <div class="nav">{{ secondnav() }}</div> |
|
92 </div> |
|
93 </div> |
|
94 {% endblock %} |
|
95 |
|
96 {% block sidebarrel %} |
|
97 <h3>Browse</h3> |
|
98 <ul> |
|
99 {% if prev %} |
|
100 <li>Prev: <a href="{{ prev.link }}">{{ prev.title }}</a></li> |
|
101 {% endif %} |
|
102 {% if next %} |
|
103 <li>Next: <a href="{{ next.link }}">{{ next.title }}</a></li> |
|
104 {% endif %} |
|
105 </ul> |
|
106 <h3>You are here:</h3> |
|
107 <ul> |
|
108 <li> |
|
109 <a href="{{ pathto('index') }}">{{ docstitle }}</a> |
|
110 {% for p in parents %} |
|
111 <ul><li><a href="{{ p.link }}">{{ p.title }}</a> |
|
112 {% endfor %} |
|
113 <ul><li>{{ title }}</li></ul> |
|
114 {% for p in parents %}</li></ul>{% endfor %} |
|
115 </li> |
|
116 </ul> |
|
117 {% endblock %} |
|
118 |
|
119 {# Empty some default blocks out #} |
|
120 {% block relbar1 %}{% endblock %} |
|
121 {% block relbar2 %}{% endblock %} |
|
122 {% block sidebar1 %}{% endblock %} |
|
123 {% block sidebar2 %}{% endblock %} |
|
124 {% block footer %}{% endblock %} |