diff options
author | Pauli Virtanen <pav@iki.fi> | 2009-02-27 22:27:14 +0000 |
---|---|---|
committer | Pauli Virtanen <pav@iki.fi> | 2009-02-27 22:27:14 +0000 |
commit | 69d6473d35cb15a5832591bda424277df0a63bf3 (patch) | |
tree | d5693ade6ffda9499d4f081ab0e0516b065d6121 /doc/source/_templates | |
parent | 9e9785907dd670f44d27ecfc98464c882dc216d8 (diff) | |
download | numpy-69d6473d35cb15a5832591bda424277df0a63bf3.tar.gz |
docs: move edit link to the sidebar, and show it for all pages
Diffstat (limited to 'doc/source/_templates')
-rw-r--r-- | doc/source/_templates/layout.html | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/source/_templates/layout.html b/doc/source/_templates/layout.html index 5338fc6f6..27798878e 100644 --- a/doc/source/_templates/layout.html +++ b/doc/source/_templates/layout.html @@ -2,3 +2,16 @@ {% block rootrellink %} <li><a href="{{ pathto('index') }}">{{ shorttitle }}</a>{{ reldelim1 }}</li> {% endblock %} + +{% block sidebarsearch %} +{%- if sourcename %} +<ul class="this-page-menu"> +{%- if 'reference/generated' in sourcename %} + <li><a href="/numpy/docs/{{ sourcename.replace('reference/generated/', '').replace('.txt', '') |e }}">{{_('Edit page')}}</a></li> +{%- else %} + <li><a href="/numpy/docs/numpy-docs/{{ sourcename.replace('.txt', '.rst') |e }}">{{_('Edit page')}}</a></li> +{%- endif %} +</ul> +{%- endif %} +{{ super() }} +{% endblock %} |