{% extends "admin/base.html" %}
{% load static %}

{% block extrastyle %}
  {{ block.super }}
  <link rel="stylesheet" type="text/css" href="{% static "css/conges.css" %}"/>
{% endblock %}

{% block extrahead %}
  {{ block.super }}
  <script type="text/javascript" src="{% static "js/conges.js" %}" defer></script>
{% endblock %}

{% block content %}
  <a href="{{ view.get_previous_month_url }}">Mois précédent</span></a> -
  <a href="{{ view.get_next_month_url }}">Mois suivant</span></a>

  {% if fatal_error %}
    <p>{{ fatal_error }}</p>
  {% else %}
    {% if errors %}
      <h2>Attention, des erreurs ont été rencontrées :</h2>
      {% for error in errors %}
        <p>{{ error }}</p>
      {% endfor %}
    {% endif %}

    <h2>Rapport :</h2>
    <p><a id="copy-report" href="">Copier le rapport</a></p>
    {% for worker in workers %}
      <p class='worker'>
        <span>{{ worker.display_name }} (matricule {{ worker.number }})</span>
        <span>Tickets restaurant : 19 tickets de 8 euros</span>
        {% if worker.is_parisian %}<span>Carte transport Paris 50%</span>{% endif %}
        <span class='holidays'>Congés : {% firstof worker.holidays|join:', ' '0' %}.</span>
      </p>
    {% endfor %}
  {% endif %}
{% endblock %}
