Commit e319c6bf authored by Tomas Hlavacek's avatar Tomas Hlavacek

Add even/odd and column numbering to tables.

Add <tr class="even/odd"> line distinguisher.
Add <th class="col1,2,3,..."> and <td class="col1,2,3,..."> column
distingishers to table decorator (effectively all generated tables).
parent 4cb21834
......@@ -9,15 +9,26 @@
<table border="1">
<tr>
<py:for each="thidx,th in enumerate(table_header)">
<th>${th}</th>
<th class="col${thidx}">${th}</th>
</py:for>
</tr>
<py:for each="tridx,tr in enumerate(table)">
<tr>
<py:for each="tdidx,td in enumerate(tr)">
<td class="${td[1]}">${td[0]}</td>
</py:for>
</tr>
<py:choose>
<py:when test="(tridx % 2) == 1">
<tr class="even">
<py:for each="tdidx,td in enumerate(tr)">
<td class="col${tdidx} ${td[1]}">${td[0]}</td>
</py:for>
</tr>
</py:when>
<py:otherwise>
<tr class="odd">
<py:for each="tdidx,td in enumerate(tr)">
<td class="col${tdidx} ${td[1]}">${td[0]}</td>
</py:for>
</tr>
</py:otherwise>
</py:choose>
</py:for>
</table>
</py:if>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment