Project

General

Profile

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

calebasse / calebasse / personnes / templates / personnes / group_holidays_list.html @ 9090c9dd

1
{% extends "personnes/simple-form.html" %}
2

    
3
{% block extrascripts %}
4
{{ block.super }}
5
    <script>
6
        $(function() {
7

    
8
            $('button[data-action=delete]').click(function() {
9
                delete_group_holiday($(this).data('id'));
10
            });
11

    
12
            $('button[data-action=edit]').click(function() {
13
                edit_group_holiday($(this).data('id'));
14
            });
15

    
16
            $('button[data-action=new]').click(function() {
17
                add_group_holiday();
18
            });
19

    
20
        });
21
    </script>
22
{% endblock %}
23

    
24

    
25
{% block appbar %}
26
<h2>&nbsp;</h2>
27
  <a href="..">Retour à la gestion des absences</a>
28
{% endblock %}
29

    
30

    
31
{% block content %}
32
    <div class="group_holidays frame">
33
      <h3>Absences de groupe</h3>
34
      <button class="save icon-plus" data-action='new'></button>
35
      <ul id="holidays" class="group">
36
        <li>
37
          <ul class="caption">
38
            <li class="start_date">Date de début</li>
39
            <li class="end_date">Date de fin</li>
40
            <li class="start_time">Heure de début</li>
41
            <li class="end_time">Heure de fin</li>
42
            <li class="type">Type</li>
43
            <li class="all">Services</li>
44
            <li class="comment">Commentaire</li>
45
            <li class="actions">Actions</li>
46
          </ul>
47
        </li>
48
        {% for object in object_list %}
49
        <li id="{{ object.id }}">
50
          <ul style="background: {% cycle '#fff' '#eee' %}">
51
            <li class="start_date">{{ object.start_date }}</li>
52
            <li class="end_date">{{ object.end_date }}</li>
53
            <li class="start_time">{% if object.start_time %}{{ object.start_time }}{% else %}---{% endif %}</li>
54
            <li class="end_time">{% if object.end_time %}{{ object.end_time }}{% else %} --- {% endif %}</li>
55
            <li class="type">{{ object.holiday_type }}</li>
56
            <li class="all">
57
              {% if object.for_all_services %}Tous{% else %}
58
              {% for service in object.services.all %}
59
              <p>{{ service }}</p>
60
              {% endfor %}
61
              {% endif %}
62
            </li>
63
            <li class="comment">{{ object.comment }}</li>
64
            <li class="actions">
65
              <button class="icon-edit" data-action='edit' data-id='{{ object.id }}'></button>
66
              <button class="icon-remove" data-action='delete' data-id='{{ object.id }}'></button>
67
            </li>
68
          </ul>
69
        </li>
70
        {% endfor %}
71
      </ul>
72
    </div>
73
<p><a href="..">{% block back-link %}Retour à la gestion des absences{% endblock %}</a></p>
74
{% endblock %}
75
{% block dialogs %}
76
<div id="holiday-dlg"></div>
77
{% endblock %}
(6-6/16)