{% extends 'dashboard.html' %}
{% load static %}

{% block head_title %}Orders | {% endblock %}

{% block content %}
<article>
    <header>
        <h1><img src="{% static "images/box.png" %}"> Orders</h1>
    </header>
    <section class="panel">
        <header class="panel-header">
            <h3></h3>
        </header>
        <table>
            {% include 'dashboard/order/_table.html' with order_list=order_list %}
            <tfoot>
                <tr>
                    <td>
                        <div class="pagination">
                        {% if page_obj.has_previous %}
                            <a href="?page=1">&laquo; first</a>
                            <a href="?page={{ page_obj.previous_page_number }}">‹ previous</a>
                        {% endif %}

                            <span class="current">
                                Page {{ page_obj.number }} of {{ page_obj.paginator.num_pages }}.
                            </span>

                        {% if page_obj.has_next %}
                            <a href="?page={{ page_obj.next_page_number }}">next ›</a>
                            <a href="?page={{ page_obj.paginator.num_pages }}">last &raquo;</a>
                        {% endif %}
                        </div>
                    </td>
                </tr>
            </tfoot>
        </table>
    </section>
</article>
{% endblock content %}
