{% load templates %}

<div class="list-cont">

    <table cellspacing="1"> 
        <thead>
            <tr>
                {% if checkbox %}
                <th>
                </th>
                {% endif %}

                {% for fieldref, fieldtext in fields %}
                <th>
                    {{ fieldtext }}
                    <button class="btn-ls-sort is-off" data-sort="html_{{ fieldref }}">
                        <i class="fa fa-chevron-circle-down"></i>
                    </button>
                </th>
                {% endfor %}
            </tr>
        </thead>

        <tbody>
            {% for object in object_list %}

            <input type="hidden"  value="{{ object.json }}" name="{{object.index}}" />

            {% if object.history_date %}
                {% include "genviews/history_row.html" %}
            {% endif %}

            <tr class="">

                {% if checkbox %}
                <td>
                    <input type="checkbox" checked="checked" name="chk_{{object.index}}" \>
                </td>
                {% endif %}

               {% for fieldref, fieldtext in fields %}
                <td data-field="html_{{ fieldref }}">
                    {% include settings.LIST_FIELDMAP %}
                </td>
                {% endfor %}
            </tr>
            {% endfor %}
        </tbody>

    </table>

</div>
