From 380ce651e940c977058cace141c6ed8a45b7d82a Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Sat, 27 Oct 2012 22:09:16 +0300 Subject: [PATCH] #8040: add a version switcher to the documentation. Patch by Yury Selivanov. --- Doc/tools/sphinxext/layout.html | 12 +++- Doc/tools/sphinxext/static/version_switch.js | 60 ++++++++++++++++++++ Misc/NEWS | 3 + 3 files changed, 73 insertions(+), 2 deletions(-) create mode 100644 Doc/tools/sphinxext/static/version_switch.js diff --git a/Doc/tools/sphinxext/layout.html b/Doc/tools/sphinxext/layout.html index db4a386e89f..4b16b3f741e 100644 --- a/Doc/tools/sphinxext/layout.html +++ b/Doc/tools/sphinxext/layout.html @@ -3,18 +3,26 @@
  • Python{{ reldelim1 }}
  • -
  • {{ shorttitle }}{{ reldelim1 }}
  • +
  • + {%- if versionswitcher is defined %} + {{ release }} + Documentation{{ reldelim1 }} + {%- else %} + {{ shorttitle }}{{ reldelim1 }} + {%- endif %} +
  • {% endblock %} {% block extrahead %} {% if not embedded %}{% endif %} + {% if versionswitcher is defined and not embedded %}{% endif %} {{ super() }} {% endblock %} {% block footer %}