1. {% extends "basic/layout.html" %}
    
  2. 
    
  3. {%- macro secondnav() %}
    
  4.   {%- if prev %}
    
  5.     &laquo; <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> &raquo;
    
  16.   {%- endif %}
    
  17. {%- endmacro %}
    
  18. 
    
  19. {% block extrahead %}
    
  20. {# When building htmlhelp (CHM format) disable jQuery inclusion, #}
    
  21. {# as it causes problems in compiled CHM files.                  #}
    
  22. {% if builder != "htmlhelp" %}
    
  23. {{ super() }}
    
  24. <script src="{{ pathto('templatebuiltins.js', 1) }}"></script>
    
  25. <script>
    
  26. (function($) {
    
  27.     if (!django_template_builtins) {
    
  28.        // templatebuiltins.js missing, do nothing.
    
  29.        return;
    
  30.     }
    
  31.     $(document).ready(function() {
    
  32.         // Hyperlink Django template tags and filters
    
  33.         var base = "{{ pathto('ref/templates/builtins') }}";
    
  34.         if (base == "#") {
    
  35.             // Special case for builtins.html itself
    
  36.             base = "";
    
  37.         }
    
  38.         // Tags are keywords, class '.k'
    
  39.         $("div.highlight\\-html\\+django span.k").each(function(i, elem) {
    
  40.              var tagname = $(elem).text();
    
  41.              if ($.inArray(tagname, django_template_builtins.ttags) != -1) {
    
  42.                  var fragment = tagname.replace(/_/, '-');
    
  43.                  $(elem).html("<a href='" + base + "#" + fragment + "'>" + tagname + "</a>");
    
  44.              }
    
  45.         });
    
  46.         // Filters are functions, class '.nf'
    
  47.         $("div.highlight\\-html\\+django span.nf").each(function(i, elem) {
    
  48.              var filtername = $(elem).text();
    
  49.              if ($.inArray(filtername, django_template_builtins.tfilters) != -1) {
    
  50.                  var fragment = filtername.replace(/_/, '-');
    
  51.                  $(elem).html("<a href='" + base + "#" + fragment + "'>" + filtername + "</a>");
    
  52.              }
    
  53.         });
    
  54.     });
    
  55. })(jQuery);
    
  56. {%- if include_console_assets -%}
    
  57. (function($) {
    
  58.     $(document).ready(function() {
    
  59.         $(".c-tab-unix").on("click", function() {
    
  60.             $("section.c-content-unix").show();
    
  61.             $("section.c-content-win").hide();
    
  62.             $(".c-tab-unix").prop("checked", true);
    
  63.         });
    
  64.         $(".c-tab-win").on("click", function() {
    
  65.             $("section.c-content-win").show();
    
  66.             $("section.c-content-unix").hide();
    
  67.             $(".c-tab-win").prop("checked", true);
    
  68.         });
    
  69.     });
    
  70. })(jQuery);
    
  71. {%- endif -%}
    
  72. </script>
    
  73. {% endif %}
    
  74. {%- if include_console_assets -%}
    
  75. <link rel="stylesheet" href="{{ pathto('_static/console-tabs.css', 1) }}">
    
  76. {%- endif -%}
    
  77. {% endblock %}
    
  78. 
    
  79. {% block document %}
    
  80.   <div id="custom-doc" class="{% block bodyclass %}{{ 'yui-t6' if pagename != 'index' else '' }}{% endblock %}">
    
  81.     <div id="hd">
    
  82.       <h1><a href="{{ pathto('index') }}">{{ docstitle }}</a></h1>
    
  83.       <div id="global-nav">
    
  84.         <a title="Home page" href="{{ pathto('index') }}">Home</a> {{ reldelim2 }}
    
  85.         <a title="Table of contents" href="{{ pathto('contents') }}">Table of contents</a> {{ reldelim2 }}
    
  86.         <a title="Global index" href="{{ pathto('genindex') }}">Index</a> {{ reldelim2 }}
    
  87.         <a title="Module index" href="{{ pathto('py-modindex') }}">Modules</a>
    
  88.       </div>
    
  89.       <div class="nav">{{ secondnav() }}</div>
    
  90.     </div>
    
  91. 
    
  92.     <div id="bd">
    
  93.       <div id="yui-main">
    
  94.         <div class="yui-b">
    
  95.           <div class="yui-g" id="{{ pagename|replace('/', '-') }}">
    
  96.             {% block body %}{% endblock %}
    
  97.           </div>
    
  98.         </div>
    
  99.       </div>
    
  100.       {% block sidebarwrapper %}
    
  101.         {% if pagename != 'index' %}
    
  102.           <div class="yui-b" id="sidebar">
    
  103.             {{ sidebar() }}
    
  104.             {%- if last_updated %}
    
  105.               <h3>Last update:</h3>
    
  106.               <p class="topless">{{ last_updated }}</p>
    
  107.             {%- endif %}
    
  108.           </div>
    
  109.         {% endif %}
    
  110.       {% endblock %}
    
  111.     </div>
    
  112. 
    
  113.     <div id="ft">
    
  114.       <div class="nav">{{ secondnav() }}</div>
    
  115.     </div>
    
  116.   </div>
    
  117. {% endblock %}
    
  118. 
    
  119. {% block sidebarrel %}
    
  120.   <h3>Browse</h3>
    
  121.   <ul>
    
  122.     {% if prev %}
    
  123.       <li>Prev: <a href="{{ prev.link }}">{{ prev.title }}</a></li>
    
  124.     {% endif %}
    
  125.     {% if next %}
    
  126.       <li>Next: <a href="{{ next.link }}">{{ next.title }}</a></li>
    
  127.     {% endif %}
    
  128.   </ul>
    
  129.   <h3>You are here:</h3>
    
  130.   <ul>
    
  131.       <li>
    
  132.         <a href="{{ pathto('index') }}">{{ docstitle }}</a>
    
  133.         {% for p in parents %}
    
  134.           <ul><li><a href="{{ p.link }}">{{ p.title }}</a>
    
  135.         {% endfor %}
    
  136.         <ul><li>{{ title }}</li></ul>
    
  137.         {% for p in parents %}</li></ul>{% endfor %}
    
  138.       </li>
    
  139.   </ul>
    
  140. {% endblock %}
    
  141. 
    
  142. {# Empty some default blocks out #}
    
  143. {% block relbar1 %}{% endblock %}
    
  144. {% block relbar2 %}{% endblock %}
    
  145. {% block sidebar1 %}{% endblock %}
    
  146. {% block sidebar2 %}{% endblock %}
    
  147. {% block footer %}{% endblock %}