~ubuntu-branches/ubuntu/quantal/python-django/quantal-security

« back to all changes in this revision

Viewing changes to docs/_templates/layout.html

  • Committer: Bazaar Package Importer
  • Author(s): Chris Lamb
  • Date: 2010-05-21 07:52:55 UTC
  • mfrom: (1.3.6 upstream)
  • mto: This revision was merged to the branch mainline in revision 28.
  • Revision ID: james.westby@ubuntu.com-20100521075255-ii78v1dyfmyu3uzx
Tags: upstream-1.2
ImportĀ upstreamĀ versionĀ 1.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
  {%- endif %}
17
17
{%- endmacro %}
18
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
 
19
56
{% block document %}
20
57
  <div id="custom-doc" class="{% block bodyclass %}{{ 'yui-t6' if pagename != 'index' else '' }}{% endblock %}">
21
58
    <div id="hd">
24
61
        <a title="Home page" href="{{ pathto('index') }}">Home</a> {{ reldelim2 }}
25
62
        <a title="Table of contents" href="{{ pathto('contents') }}">Table of contents</a> {{ reldelim2 }}
26
63
        <a title="Global index" href="{{ pathto('genindex') }}">Index</a> {{ reldelim2 }}
27
 
        <a title="Search" href="{{ pathto('modindex') }}">Modules</a>
 
64
        <a title="Module index" href="{{ pathto('modindex') }}">Modules</a>
28
65
      </div>
29
66
      <div class="nav">{{ secondnav() }}</div>
30
67
    </div>