{% load i18n %}

<td class="center aligned"><strong><i class="hashtag icon"></i>{{order.id}}</strong></td>
<td>
  <a href="{% url 'member:client_information' pk=order.client.id %}">{{order.client.member}}</a>
  {% if order.client_planned_status_at_delivery != 'A' %}
  ({{ order.client_planned_status_at_delivery_verbose }})
  {% endif %}
</td>
<td>{{order.delivery_date}}</td>
<td>
  {% if order.client.route %}
    {{order.client.route}}
    {% if not order.client.is_geolocalized %}
    <a href="{% url 'member:member_update_address_information' pk=order.client.id %}?next={% url 'delivery:order' %}" title="{% trans 'Please fix geolocalization. Otherwise this client will be excluded in the next steps.' %}"><i class="warning sign red icon"></i></a>
    {% endif %}
  {% else %}
    <a href="{% url 'member:member_update_address_information' pk=order.client.id %}?next={% url 'delivery:order' %}" title="{% trans 'Please fix delivery route. Otherwise this client will be excluded in the next steps.' %}"><i class="warning sign red icon"></i></a>
  {% endif %}
</td>
<td class="center aligned">{{order.get_status_display}}</td>
<td class="center aligned"><i class="dollar icon"></i>{{order.price}}</td>
<td>
    <a class="ui basic icon button" title="{% trans 'Review or change the status of the order.' %}"  href="{% url 'order:view' pk=order.id %}"><i class="icon unhide"></i></a>
    {% if can_edit_data %}
      <a class="ui basic icon button" title="{% trans 'Change the details of the order.' %}" href="{% url 'order:update' pk=order.id %}"><i class="icon edit"></i></a>
      <a class="ui basic icon order cancel button" title="{% trans 'Cancel the order.' %}" data-url="{% url 'order:update_status' pk=order.id %}"><i class="icon ban"></i></a>
    {% endif %}
</td>
