{% extends "!layout.html" %}
{% block sidebartitle %}
	<a href="{{ pathto(master_doc) }}">
	{# Not strictly valid HTML, but it's the only way to display/scale
	   it properly, without weird scripting or heaps of work
	#}
	<img src="{{ pathto('_static/ckanlogo.png', 1) }}" class="logo" alt="Logo"/>
  </a>

  {% if theme_display_version %}
	{%- set nav_version = release %}
	{% if nav_version %}
	  <div class="version">
		{{ nav_version }}
	  </div>
	{% endif %}
  {% endif %}
  {% if is_master %}
	<div class="rst-content sidebar-admonition">
	  <div class="admonition warning">
	  <p class="first admonition-title">Warning</p>
	  <p class="last">
		  This is the documentation for the latest development version of CKAN, which may be unstable.
		  For other stable releases check the selector at the bottom left corner of the page.
	  </p>
	  </div>
	</div>
  {% elif not is_supported %}
	<div class="rst-content sidebar-admonition">
	  <div class="admonition error">
	  <p class="first admonition-title">Warning</p>
	  <p class="last">
		  This version of CKAN is no longer supported, please upgrade to a more recent one.
          The latest stable release is <a href="https://docs.ckan.org/en/{{ latest_minor_version}}">{{ latest_minor_version }}</a>
	  </p>
	  </div>
	</div>
  {% elif not is_latest_version %}
	<div class="rst-content sidebar-admonition">
	  <div class="admonition note">
	  <p class="first admonition-title">Note</p>
	  <p class="last">
		  This version of CKAN is not the latest one, please consider upgrading to a more recent one.
          The latest stable release is <a href="https://docs.ckan.org/en/{{ latest_minor_version}}">{{ latest_minor_version }}</a>
	  </p>
	  </div>
	</div>
  {% endif %}

  {% include "searchbox.html" %}
{% endblock %}
