inflection_table.html 1.96 KB
<table class='inflection-table'>
    {% if tables and tables|length > 1 %}
        <caption>
            {{ inflection_characteristic.symbol }}: {{ patterns|join:" / " }}
        </caption>
    {% endif %}
    {% for row in table %}
        <tr>
            {% for cell in row %}
                {% if cell.type != 'span' %}
                    {% if cell.type == 'empty' %}
                        <td class='empty'></td>
                    {% else %}
                        {% if cell.type == 'forms' %}
                            <td rowspan="{{ cell.rowspan }}"
                                colspan="{{ cell.colspan }}">
                                <ul class='form-list'>
                                    {% 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.css_class }}">
                                <ul class="form-list">
                                    {% for label in cell.label %}
                                        <li>
                                            {{ label|safe }}
                                        </li>
                                    {% endfor %}
                                </ul>
                            </td>
                        {% endif %}
                    {% endif %}
                {% endif %}
            {% endfor %}
        </tr>
    {% endfor %}
</table>