{# basic/genindex.html ~~~~~~~~~~~~~~~~~~~ Template for an "all-in-one" index. :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. #} {# To fix indexentries macro. #} {% macro indexentries(firstname, links) %}
{%- if links -%} {%- if links[0] is string -%} {{ firstname|e }} {%- else -%} {%- if links[0][0] %}{% endif -%} {{ firstname|e }} {%- if links[0][0] %}{% endif -%} {%- endif -%} {%- for linkentry in links[1:] -%} {%- if linkentry is string -%} , [{{ loop.index }}] {%- else -%} , {%- if linkentry[0] -%}[{{ loop.index }}] {%- else -%}[{{ loop.index }}] {%- endif -%} {%- endif -%} {%- endfor %} {%- else -%} {{ firstname|e }} {%- endif -%}
{% endmacro %} {% extends "layout.html" %} {% set title = _('Index') %} {% block body %}

{{ _('Index') }}

{% for key, dummy in genindexentries -%} {{ key }} {% if not loop.last %}| {% endif %} {%- endfor %}
{%- for key, entries in genindexentries %}

{{ key }}

{%- for column in entries|slice(2) if column %} {%- endfor %}
{%- for entryname, (links, subitems) in column %} {{ indexentries(entryname, links) }} {%- if subitems %}
{%- for subentryname, subentrylinks in subitems %} {{ indexentries(subentryname, subentrylinks) }} {%- endfor %}
{%- endif -%} {%- endfor %}
{% endfor %} {% endblock %} {% block sidebarrel %} {% if split_index %}

{{ _('Index') }}

{% for key, dummy in genindexentries -%} {{ key }} {% if not loop.last %}| {% endif %} {%- endfor %}

{{ _('Full index on one page') }}

{% endif %} {{ super() }} {% endblock %}