| | 24 | <tr><td> |
| | 25 | <dl> |
| | 26 | <?python |
| | 27 | breakat = genindexcounts[loop.index0] // 2 |
| | 28 | numcols = 1 |
| | 29 | numitems = 0 |
| | 30 | ?> |
| | 31 | <py:for each="entryname, (links, subitems) in entries"> |
| | 32 | <dt> |
| | 33 | <py:choose links=""> |
| | 34 | <py:when links="True"> |
| | 35 | <a href="${links[0]}">${entryname}</a> |
| | 36 | <a href="${link}" py:for="link in links[1:]">, [Link]</a> |
| | 37 | </py:when> |
| | 38 | <py:otherwise>${entryname}</py:otherwise> |
| | 39 | </py:choose> |
| | 40 | </dt> |
| | 41 | <dd py:if="subitems"> |
| | 42 | <dl> |
| | 43 | <py:for each="subentryname, subentrylinks in subitems"> |
| | 44 | <dt> |
| | 45 | <a href="${subentrylinks[0]}">${subentryname|e}</a> |
| | 46 | <py:for each="link in subentrylinks[1:]">, <a href="${link}">[Link]</a></py:for> |
| | 47 | </dt> |
| | 48 | </py:for> |
| | 49 | </dl> |
| | 50 | </dd> |
| | 51 | <?python |
| | 52 | numitems = numitems + 1 + len(subitems) |
| | 53 | ?> |
| | 54 | <py:if test="numcols < 2 and numitems > breakat"> |
| | 55 | <?python |
| | 56 | numcols = numcols+1 |
| | 57 | ?> |
| | 58 | </py:if> |
| | 59 | </py:for> |
| | 60 | </dl> |
| | 61 | </td></tr> |
| | 62 | <tr><td width="33%" valign="top"> |
| 25 | | {%- set breakat = genindexcounts[loop.index0] // 2 %} |
| 26 | | {%- set numcols = 1 %} |
| 27 | | {%- set numitems = 0 %} |
| 28 | | {% for entryname, (links, subitems) in entries %} |
| 29 | | <dt>{%- if links -%}<a href="{{ links[0] }}">{{ entryname|e }}</a> |
| 30 | | {%- for link in links[1:] %}, <a href="{{ link }}">[Link]</a>{% endfor -%} |
| 31 | | {%- else -%} |
| 32 | | {{ entryname|e }} |
| 33 | | {%- endif -%}</dt> |
| 34 | | {%- if subitems %} |
| 35 | | <dd><dl> |
| 36 | | {%- for subentryname, subentrylinks in subitems %} |
| 37 | | <dt><a href="{{ subentrylinks[0] }}">{{ subentryname|e }}</a> |
| 38 | | {%- for link in subentrylinks[1:] %}, <a href="{{ link }}">[Link]</a>{% endfor -%} |
| 39 | | </dt> |
| 40 | | {%- endfor %} |
| 41 | | </dl></dd> |
| 42 | | {%- endif -%} |
| 43 | | {%- set numitems = numitems + 1 + len(subitems) -%} |
| 44 | | {%- if numcols < 2 and numitems > breakat -%} |
| 45 | | {%- set numcols = numcols+1 -%} |
| 46 | | </dl></td><td width="33%" valign="top"><dl> |
| 47 | | {%- endif -%} |
| 48 | | {%- endfor %} |
| 49 | | </dl></td></tr></table> |
| 50 | | {% endfor %} |
| | 64 | <py:if test="split_index"> |
| | 65 | <h4>Index</h4> |
| | 66 | <p> |
| | 67 | <py:for each="key, dummy in genindexentries"> |
| | 68 | <a href="${pathto('genindex-' + key)}"><strong>${key}</strong></a> |
| | 69 | <py:if test="not loop.last">| </py:if> |
| | 70 | </py:for> |
| | 71 | </p> |
| | 72 | <p><a href="${pathto('genindex-all')}"><strong>Full index on one page</strong></a></p> |
| | 73 | </py:if> |
| | 74 | </dl> |
| | 75 | </td></tr> |