table_edit_form.html 1.25 KB
{% load i18n %}
{% if export %}
    <button type="button" id="add-export-cell">{% trans 'Add a cell' %}</button>
{% else %}
    <button type="button" id="add-table-cell">{% trans 'Add a cell' %}</button>
    <button type="button" id="add-header">{% trans 'Add a header' %}</button>
{% endif %}
<table class="scheme{{ color_scheme }}">
    <thead>
        <tr>
            {% if template_type != 'export' %}
                <th>{% trans 'r.' %}</th>
                <th>{% trans 'c.' %}</th>
                <th></th>
                <th></th>
            {% endif %}
            <th></th>
            {% if template_type == 'export' %}
                <th>{% trans 'tag' %}</th>
            {% endif %}
            <th>{% trans 'pattern types' %}</th>
            {% if takes_gender %}
                <th>{% trans 'genders' %}</th>
            {% endif %}
            {% for attr in template_attrs %}
                <th>{{ attr.name }}</th>
            {% endfor %}
        </tr>
    </thead>
    {% for coord, params, cr_form, gender_form, attr_forms in form_rows %}
        {% include 'table_edit_row.html' %}
    {% endfor %}
</table>
<button type="button" id="save-template">{% trans 'Save' %}</button>
<button type="button" id="cancel">{% trans 'Cancel' %}</button>