{% load i18n %}

<table class="ui very basic stripped celled table">
    <thead>
        <th class="sorted descending">{% trans 'Order' %}
                <i class="help-text question grey icon link" data-content="{% trans 'A unique identifier for the order.' %}"></i>
        </th>
        <th class="">{% trans 'Delivery Date' %}
            <i class="help-text question grey icon link" data-content="{% trans 'The delivery date planned for the order.' %}"></i>
        </th>
        <th class="center aligned">{% trans 'Status' %}
            <i class="help-text question grey icon link" data-content="{% trans 'The order status' %}"></i>
        </th>
        <th class="">{% trans 'Amount' %}
            <i class="help-text question grey icon link" data-content="{% trans 'Total amount in $CAD.' %}"></i>
        </th>
        {% if show_actions_column %}
        <th class="">{% trans 'Actions' %}</th>
        {% endif %}
      </thead>
    </thead>
    <tbody>
        {% for order in orders %}
            <tr>
                <td><strong><i class="hashtag icon"></i>{{order.id}}</strong></td>
                <td>{{order.delivery_date}}</td>
                <td class="center aligned">{{order.get_status_display}}</td>
                <td><i class="dollar icon"></i>{{order.price}}</td>
                {% if show_actions_column %}
                <td>
                    <a class="ui basic icon button"  href="{% url 'order:view' pk=order.id %}"><i class="icon unhide"></i></a>
                    {% if can_edit_data %}<a class="ui basic icon button"  href="{% url 'order:update' pk=order.id %}"><i class="icon edit"></i></a>{% endif %}
                    {% if can_edit_data %}<a class="ui basic icon button order-delete" href="#" data-order-id="{{order.id}}"><i class="icon trash"></i></a>{% endif %}
                </td>
                {% endif %}
            </tr>
            {% if can_edit_data %}{% include "order_confirm_delete.html" %}{% endif %}
        {% endfor %}
    </tbody>

</table>
