{% load i18n %}
{% if regies %}
<h2>{% trans "Basket" %}</h2>
{% for regie_info in regies %}
{% if regies|length != 1 %}<h3 class="regie-name">{{regie_info.regie.label}}</h3>{% endif %}
<form action="{% url 'lingo-pay' %}" method="POST">
{% csrf_token %}
<input type="hidden" name="next_url" value="{{ cell.page.get_online_url }}" />
{% if regies|length != 1 %}<input type="hidden" name="regie" value="{{regie_info.regie.id}}" />{% endif %}
<table>
  {% for item in regie_info.items %}
  <tr><td class="item"><label><input style="display: none;" type="checkbox" name="item" value="{{ item.id }}" checked/>
          <a href="{{ item.source_url }}">{{ item.subject }}</a>
          </label></td>
          <td class="amount">{{ item.amount }} &euro;</td>
          {% if item.user_cancellable %}
          <td class="remove">
          <a class="remove-item" rel="popup" href="{% url 'lingo-cancel-item' pk=item.id %}">{% trans 'remove' %}</a>
          </td>
          {% endif %}
  </tr>
  {% endfor %}
  <tfoot><tr><td colspan="2"><strong>{% trans "Total:" %}</strong> {{ regie_info.total }} &euro;</td></tr></tfoot>
</table>
<div class="buttons">
<a href="/" class="pk-button" id="new-command">Commander un autre document</a>
<button>Payer votre commande</button>
</div>
</form>
{% endfor %}
{% endif %}
