inflection_table.html 1.19 KB
<table class='InflectionTable'>
<caption>{{ inflection_characteristic.entry }}</caption>
{% for row in table %}
  <tr>
  {% for cell in row %}
    {% if cell.type != 'span' %}
      {% if cell.type == 'empty' %}
        <td class='EmptyCell' ></td>
      {% else %}
        {% if cell.type == 'forms' %}
          <td rowspan="{{cell.rowspan}}" colspan="{{cell.colspan}}">
          <ul class='FormList'>
          {% for entry in cell.forms %}
            <li>
              {{ entry.form }}
              <span class="qualifiers">
                {% for q in entry.qualifiers %}
                  {{ q.label }}
                {% endfor %}
              </span>
            </li>
          {% endfor %}
          </ul>
          </td>
        {% else %}
          <td rowspan="{{cell.rowspan}}" colspan="{{cell.colspan}}"
              class="{{cell.row_header|yesno:"RowHeader,ColumnHeader"}}">
            <ul class="FormList">
              {% for label in cell.label %}
                <li>
                  {{ label|safe }}
                </li>
              {% endfor %}
            </ul>
          </td>
        {% endif %}
      {% endif %}
    {% endif %}
  {% endfor %}
  </tr>
{% endfor %}
</table>