Project

General

Profile

« Previous | Next » 

Revision 84614733

Added by Benjamin Dauvergne over 12 years ago

personnes: rewrite holidays view (fixes #2308)

View differences:

calebasse/personnes/templates/personnes/holidays.html
14 14
  <h4>En cours</h4>
15 15

  
16 16
  <ul>
17
    {% for holiday in current_holidays %}
18
    <li><a href="{% url 'worker_update' service=service pk=holiday.worker.pk %}">
19
        <span class="lastname">{{ holiday.worker.last_name }}</span> {{holiday.worker.first_name }}</a>,
20
        {{ holiday }}</li>
17
    {% for holiday in current_holidays|dictsort:"worker" %}
18
      <li><a href="{{ holiday.url }}">{{ holiday.worker }} {{ holiday.holiday }}</a></li>
21 19
    {% endfor %}
22 20
  </ul>
23 21
{% endif %}
......
26 24
  <h4>À venir (jusqu'au {{ end_date|date:"d/m/Y" }})</h4>
27 25

  
28 26
  <table id="conges-a-venir">
29
    <thead>
30
      <tr>
31
        {% for month in future_holidays %}
32
          <th>{{ month.date|date:"F"|capfirst }}</th>
33
        {% endfor %}
34
      </tr>
35
    </thead>
36
    <tbody>
37
      <tr>
38
        {% for month in future_holidays %}
39
          <td>
40
            <ul>
41
              {% for holiday in month.holidays %}
42
              <li><a href="{% url 'worker_update' service=service pk=holiday.worker.pk %}">
43
                  <span class="lastname">{{ holiday.worker.last_name }}</span> {{holiday.worker.first_name }}</a>,
44
                  {{ holiday }}</li>
45
              {% endfor %}
46
            </ul>
47
          </td>
48
        {% endfor %}
49
      </tr>
50
    </tbody>
27
    {% for months in future_holidays %}
28
      <thead>
29
        <tr>
30
          {% for future in months %}
31
            <th>{{ future.month|capfirst }}</th>
32
          {% endfor %}
33
        </tr>
34
      </thead>
35
      <tbody>
36
        <tr>
37
          {% for future in months %}
38
            <td>
39
              <ul>
40
                {% for holiday in future.holidays|dictsort:"worker" %}
41
                  <li>
42
                    <a href="{{ holiday.url }}">
43
                      {{ holiday.worker }} {{ holiday.holiday }}
44
                    </a>
45
                  </li>
46
                {% endfor %}
47
              </ul>
48
            </td>
49
          {% endfor %}
50
        </tr>
51
      </tbody>
52
   {% endfor %}
51 53
  </table>
52 54
{% endif %}
53 55

  
......
68 70
  <form>
69 71
    {{ search_form.non_field_errors }}
70 72
    {{ search_form.start_date.errors }}
73
    {{ search_form.end_date.errors }}
71 74
    <p>Afficher la liste des congés pris entre
72 75
      <span id="start-date-datepicker" data-number-of-months="3" data-before-selector="#end-date-datepicker" class="datepicker">{{ search_form.start_date }}</span>
73 76
      et

Also available in: Unified diff