{% load form_extras %}

{% if group_by %}
    <tr class="table_row" onclick="group_by('{{ row|query }}')">
        {% for column in columns %}
        <td>
            {{ row|report:column.label }}
        </td>
        {% endfor %}
    </tr>
{% elif edit %}
    <tr>
        <input name="row_{{row.id}}" type="hidden" value="{{ row.id }}"/>
        {% for column in columns %}
            {% include "components/grid_column.html" with field=form|field:column.label column=column %}
        {% endfor %}
    </tr>
{% else %}
    <tr class="table_row" onclick="open2('{% url update row.id %}')">
        {% for column in columns %}
            {% include "components/grid_column.html" with field=form|field:column.label column=column %}
        {% endfor %}
    </tr>
{% endif %}
