[Numpy-svn] r6519 - in trunk/doc/source: . _templates

numpy-svn@scip... numpy-svn@scip...
Fri Feb 27 16:27:33 CST 2009


Author: ptvirtan
Date: 2009-02-27 16:27:14 -0600 (Fri, 27 Feb 2009)
New Revision: 6519

Modified:
   trunk/doc/source/_templates/layout.html
   trunk/doc/source/conf.py
Log:
docs: move edit link to the sidebar, and show it for all pages

Modified: trunk/doc/source/_templates/layout.html
===================================================================
--- trunk/doc/source/_templates/layout.html	2009-02-27 18:34:42 UTC (rev 6518)
+++ trunk/doc/source/_templates/layout.html	2009-02-27 22:27:14 UTC (rev 6519)
@@ -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 %}

Modified: trunk/doc/source/conf.py
===================================================================
--- trunk/doc/source/conf.py	2009-02-27 18:34:42 UTC (rev 6518)
+++ trunk/doc/source/conf.py	2009-02-27 22:27:14 UTC (rev 6519)
@@ -207,9 +207,6 @@
 # If we want to do a phantom import from an XML file for all autodocs
 phantom_import_file = 'dump.xml'
 
-# Edit links
-numpydoc_edit_link = '`Edit </numpy/docs/%(full_name)s/>`__'
-
 # -----------------------------------------------------------------------------
 # Coverage checker
 # -----------------------------------------------------------------------------



More information about the Numpy-svn mailing list