{% extends 'bsct/base.html' %}

{% load bscttags %}
 
{% block BSCT_CONTENT %}

{% block BSCT_LIST_ITEMS %}
<table class = 'table table-striped'>

        <thead>
            <th> {% get_verbose_name_plural object_list.model %} </th>
            <th> Action </th>
        </thead>

        {% for object in object_list %}
        <tr>
            <td> 
                {% block BSCT_LIST_ITEMS_ITEM %}
                {{object}} 
                {% endblock %}
            </td>
            <td>
                {% block BSCT_LIST_ITEMS_ACTIONS %}
                <a
                    class = 'btn'
                    href  = '{{object.get_absolute_url}}'
                >
                    View
                </a>
                {% endblock %}
            </td>
        </tr>
        {% endfor %}

</table>
{% endblock %}

<div class = 'row'>

{% block BSCT_LIST_CREATE_LINK %}
{% if object_list.model.get_create_url %}
<div class = 'span4'>
<a
    class = 'btn btn-primary'
    href  = '{{object_list.model.get_create_url }}'
>
    Create a {% get_verbose_name object_list.model %} 
</a>
</div>
{% endif %}
{% endblock %}

{% block BSCT_LIST_PAGINATION %}
<div class = 'span4'>
{% if page_obj.has_previous %}
    <a class = 'btn btn-info' href="?page={{ page_obj.previous_page_number}}"> Previous</a>
{% endif %}
{% if page_obj.has_next %}
    <a class = 'btn btn-info' href="?page={{ page_obj.next_page_number}}"> Next</a>
{% endif %}
</div>
{% endblock %}

</div>

{% endblock %}
