{% load pos_filters %}
<form>
    
    {% csrf_token %}
    <input type='submit' value='Delete' name='delete' class='float-right btn btn-danger btn-sm'>
    {% if createLink %}
    <a href='{% url createLink %}' class='float-right btn btn-success btn-sm mr-2'>Create {{ name }}</a>
    {% endif %}<br><br>
<table class='table table-bordered table-striped'>
    
    <thead>
    <th>
&nbsp;
    </th>
    {% for k,v in cols.items %}
        <th>
            {{ v }}
        </th>
    {% endfor %}
    <th>Created</th>
    <th>Owner</th>
    </thead>
    <tbody>
        {% for o in objs %}
        <tr>
            <td>
                <input type='checkbox' name='ids[]' value='{{ o.id }}' class='form-control' />
            </td>
            {% for k,v in cols.items %}
            {% if forloop.first %}
            <td>
                <a href='{% url editLink oid=o.id %}'>{{ o | access:k  }}</a>
            </td>
            {% else %}
                {% if k == 'profile.role' %}
                <td>{{ o.profile.get_role_display  }}</td>
                {% else %}
                <td>{{ o | access:k  }}</td>
                {% endif %}
            {% endif %}
            {% endfor %}
            <td>{% firstof o.created_at "-" %}</td>
            <td>{% firstof o.owner "-" %}</td>
        </tr>
        {% endfor %}
    </tbody>
    
</table>
</form>
