lexeme_history_table.html 1.44 KB
<table class="transaction-table">
    <tr>
        <th>atrybut</th>
        <th>przed</th>
        <th>po</th>
    </tr>
    {% for header, values in table.rows %}
        <tr>
            <td>{{ header }}</td>
            <td>
                {% if values.0 == None %}
                    <em>dodano</em>
                {% else %}
                    {{ values.0 }}
                {% endif %}
            </td>
            <td>
                {% if values.1 == None %}
                    <em>usunięto</em>
                {% else %}
                    {{ values.1 }}
                {% endif %}
            </td>
        </tr>
    {% endfor %}
    {% for header, lip_rows in table.lip_tables %}
        <tr>
            <th colspan="3" class="lip-header">odmiana {{ header }}:</th>
        </tr>
        {% for header, values in lip_rows %}
            <tr>
                {# fuj, copypasta #}
                <td>{{ header }}</td>
                <td>
                    {% if values.0 == None %}
                        <em>dodano</em>
                    {% else %}
                        {{ values.0 }}
                    {% endif %}
                </td>
                <td>
                    {% if values.1 == None %}
                        <em>usunięto</em>
                    {% else %}
                        {{ values.1 }}
                    {% endif %}
                </td>
            </tr>
        {% endfor %}
    {% endfor %}
</table>