Changeset 1373

Show
Ignore:
Timestamp:
09/29/08 15:04:59 (2 months ago)
Author:
JonNeal
Message:

Ticket #964:

  • Attempted to fix genindex.html, making my brain hurt!!
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/pysoy/docs/templates/genindex.html

    r1371 r1373  
    1919   <hr /> 
    2020 
    21    {% for key, entries in genindexentries %} 
    22 <h2 id="{{ key }}">{{ key }}</h2> 
     21   <py:for each="key, entries in genindexentries"> 
     22<h2 id="${key}">${key}</h2> 
    2323<table width="100%" class="indextable"><tr><td width="33%" valign="top"> 
     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 &lt; 2 and numitems &gt; 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"> 
    2463<dl> 
    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> 
    5176 
    52 {% endblock %} 
    53  
    54 {% block sidebarrel %} 
    55 {% if split_index %} 
    56    <h4>Index</h4> 
    57    <p>{% for key, dummy in genindexentries -%} 
    58    <a href="{{ pathto('genindex-' + key) }}"><strong>{{ key }}</strong></a> 
    59      {% if not loop.last %}| {% endif %} 
    60    {%- endfor %}</p> 
    61  
    62    <p><a href="{{ pathto('genindex-all') }}"><strong>Full index on one page</strong></a></p> 
    63 {% endif %} 
    64   </py:match> 
     77</table> 
     78</py:for> 
    6579</html>