{% extends "!layout.html" %}
{ set customsidebar = 'sidebarContent.html' %}

{% block rootrellink %}
        <li><a href="{{ pathto('index') }}">PsychoPy home</a>&nbsp;|&nbsp;</li>
{% endblock %}

{% block header %}
<div id="header"  style="background-color: white">
<table width="100%" cellpadding="10">
<tr><td style="text-align:left;vertical-align:middle">
<a href='http://www.psychopy.org/home.php'><img src="{{ pathto("_static/psychopyDocBanner2.gif", 1) }}" alt="PsychoPy logo" /></a>
</td><td style="text-align:right;vertical-align:middle">
<a href='http://www.nottingham.ac.uk'><img src="{{ pathto("_static/nott_logo.gif", 1) }}" alt="University of Nottingham" /></a>
</td></table>
</div>
{% endblock %}

{% block sidebar1 %}{{ sidebar() }}{% endblock %}
{% block sidebar2 %}{% endblock %}

{% block footer %}
{{ super() }}
{% endblock %}

#this is modified from sphinx/themse/basic/layout
{%- macro sidebar() %}
      {%- if not embedded %}{% if not theme_nosidebar|tobool %}
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
          {%- block sidebarlogo %}
          {%- if logo %}
            <p class="logo"><a href="{{ pathto(master_doc) }}">
              <img class="logo" src="{{ pathto('_static/' + logo, 1) }}" alt="Logo"/>
            </a></p>
          {%- endif %}
          {%- endblock %}
          {%- block sidebartoc %}
          {%- if display_toc %}
            <h3><a href="{{ pathto(master_doc) }}">{{ _('Table Of Contents') }}</a></h3>
            {{ toc }}
          {%- endif %}
          {%- endblock %}
          {%- block sidebarrel %}
          {%- if prev %}
            <h4>{{ _('Previous topic') }}</h4>
            <p class="topless"><a href="{{ prev.link|e }}"
                                  title="{{ _('previous chapter') }}">{{ prev.title }}</a></p>
          {%- endif %}
          {%- if next %}
            <h4>{{ _('Next topic') }}</h4>
            <p class="topless"><a href="{{ next.link|e }}"
                                  title="{{ _('next chapter') }}">{{ next.title }}</a></p>
          {%- endif %}
          {%- endblock %}
          {%- block sidebarsourcelink %}
          {%- if show_source and has_source and sourcename %}
            <h3>{{ _('This Page') }}</h3>
            <ul class="this-page-menu">
              <li><a href="{{ pathto('_sources/' + sourcename, true)|e }}"
                     rel="nofollow">{{ _('Show Source') }}</a></li>
            </ul>
          {%- endif %}
          {%- endblock %}
          {%- if customsidebar %}
          {% include customsidebar %}
          {%- endif %}
      

          {%- block sidebarsearch %}
      
            <h3>Quick links</h3>
            <ul>
            <li><a href="http://code.google.com/p/psychopy/"><strong>Download</strong></a></li>
            <li><a href="http://groups.google.com/group/psychopy-users">Mailing list</a></li>
            </ul>
        
          {%- if pagename != "search" %}
      
          <div id="searchbox" style="display: none">
      
            <h3>{{ _('Searches') }}</h3>
            <form action="http://www.google.com/cse" id="cse-search-box">
                <input type="hidden" name="cx" value="partner-pub-0861691574026297:eyw5n7-ugep" />
                <input type="hidden" name="ie" value="ISO-8859-1" />
                <input type="text" name="q" size="20" />
                <input type="submit" name="sa" value="Go" />
            </form>    
              <p class="searchtip" style="font-size: 90%">
              {{ _('General') }}
              </p>
            <script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=en"></script>
              <form class="search" action="{{ pathto('search') }}" method="get">
                <input type="text" name="q" size="18" />
                <input type="submit" value="{{ _('Go') }}" />
                <input type="hidden" name="check_keywords" value="yes" />
                <input type="hidden" name="area" value="default" />
              </form>
              <p class="searchtip" style="font-size: 90%">
              {{ _('Docs only') }}
              </p>
          </div>
          <script type="text/javascript">$('#searchbox').show(0);</script>
          {%- endif %}
          {%- endblock %}
        </div>
      </div>
      {%- endif %}{% endif %}
{%- endmacro %}