{% extends "lfs/customer/base.html" %}
{% load i18n %}
{% load lfs_tags %}

{% block breadcrumbs %}
    {% breadcrumbs _("Your orders") %}
{% endblock %}

{% block content %}
    <h1>{% trans 'Your orders' %}</h1>

    {% if orders %}
        <div class="site-actions">
            <form action="{% url lfs_my_orders %}"
                  method="post">
                <select>
                    <option>{% trans 'Recent orders' %}</option>
                    <option>{% trans '2009' %}</option>
                </select>
                <input type="submit"
                       value="{% trans 'Filter' %}">
            </form>
        </div>

        <table class="order lfs-default">
            <tr>
                <th>
                    {% trans 'Date' %}
                </th>
                <th class="number">
                    {% trans 'Price' %}
                </th>
                <th class="right">
                    {% trans 'State' %}
                </th>
            </tr>
            {% for order in orders %}
                <tr>
                    <td>
                        <a href="{% url lfs_my_order order.id %}">
                            {{order.created|date:_("DATETIME_FORMAT")}}
                        </a>

                    </td>
                    <td class="number">
                        {{order.price|currency}}
                    </td>
                    <td class="right">
                        {{order.get_state_display}}
                    </td>
                </tr>
            {% endfor %}
        </table>
    {% else %}
        <p>
            {% trans "You haven't any orders yet." %}
        </p>
    {% endif %}
{% endblock %}