{% extends "delegation/delegation_base.html" %}
{% load editor %}
{% load i18n %}

{% block content %}
{% editablecontent "delegation-list-header" %}
{% endeditablecontent %}
{% if delegation_list.exists %}
<table class="table table-bordered table-striped table-condensed">
  <thead>
    <th>Délégué</th>
    <th>Date de création</th>
  </thead>
  <tbody>
    {% for delegation in delegation_list %}
    <tr>
      <td>{{delegation.user_delegated}}</td>
      <td>
          {{delegation.creation_date}}
          <form action="delete-{{delegation.id}}/" method="post" class="pull-right">
            {% csrf_token %}
            <button class="btn">{% trans "Supprimer" %}</button>
          </form>
      </td>
    </tr>
    {% endfor %}
  </tbody>
</table>
{% else %}
<h2>Aucune délégation</h2>
{% endif %}
<p><a href="new/" class="btn">{% trans "Créer une nouvelle délégation" %}</a></p>
{% endblock %}
