Project

General

Profile

Download (2.2 KB) Statistics
| Branch: | Tag: | Revision:

calebasse / calebasse / personnes / templates / personnes / holidays.html @ a69db8e6

1
{% extends "personnes/base.html" %}
2

    
3
{% load url from future %}
4

    
5
{% block appbar %}
6
    <h2>Gestion des personnes — Absences</h2>
7
    <a href="..">Retourner à la gestion des personnes</a>
8
{% endblock %}
9

    
10
{% block content %}
11
<h3>Absences de groupe</h3>
12
<p>
13
  <a href="groupe/">Gestion des absences de groupe</a>
14
</p>
15
{% if group_holidays %}
16
<ul>
17
  {% for holiday in group_holidays %}
18
    <li>{{ holiday|capfirst }}</li>
19
  {% endfor %}
20
</ul>
21
{% endif %}
22

    
23
<h3>Affichage interactif</h3>
24

    
25
  <form>
26
    {{ search_form.non_field_errors }}
27
    {{ search_form.start_date.errors }}
28
    {{ search_form.end_date.errors }}
29
    <p>Afficher la liste des absences pris entre
30
      <span id="start-date-datepicker" data-number-of-months="3" data-before-selector="#end-date-datepicker" class="datepicker">{{ search_form.start_date }}</span>
31
      et
32
      <span id="end-date-datepicker" class="datepicker" data-number-of-months="3" data-after-selector="#start-date-datepicker">{{ search_form.end_date }}</span>
33
      <button class="enable-on-change">Valider</button>
34
      <button class="reset">Effacer</button>
35
    </p>
36
  </form>
37

    
38
<h3>Absences en cours et à venir</h3>
39

    
40
{% if current_holidays %}
41
  <h4>En cours</h4>
42

    
43
  <ul>
44
    {% for holiday in current_holidays|dictsort:"worker" %}
45
      <li><a href="{{ holiday.url }}">{{ holiday.worker }} {{ holiday.holiday }}</a></li>
46
    {% endfor %}
47
  </ul>
48
{% endif %}
49

    
50
{% if future_holidays %}
51
  <h4>À venir (jusqu'au {{ end_date|date:"d/m/Y" }})</h4>
52

    
53
  <table id="conges-a-venir">
54
    {% for months in future_holidays %}
55
      <thead>
56
        <tr>
57
          {% for future in months %}
58
            <th>{{ future.month|capfirst }}</th>
59
          {% endfor %}
60
        </tr>
61
      </thead>
62
      <tbody>
63
        <tr>
64
          {% for future in months %}
65
            <td>
66
              <ul>
67
                {% for holiday in future.holidays|dictsort:"worker" %}
68
                  <li>
69
                    <a href="{{ holiday.url }}">
70
                      {{ holiday.worker }} {{ holiday.holiday }}
71
                    </a>
72
                  </li>
73
                {% endfor %}
74
              </ul>
75
            </td>
76
          {% endfor %}
77
        </tr>
78
      </tbody>
79
   {% endfor %}
80
  </table>
81
{% endif %}
82

    
83
{% endblock %}
(10-10/16)