Project

General

Profile

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

calebasse / calebasse / personnes / templates / personnes / group_holidays_list.html @ 5b90c12e

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">Tous les 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">{% if object.for_all_services %}<span class="icon-ok"></span>{% endif %}</li>
57
            <li class="comment">{{ object.comment }}</li>
58
            <li class="actions">
59
              <button class="icon-edit" data-action='edit' data-id='{{ object.id }}'></button>
60
              <button class="icon-remove" data-action='delete' data-id='{{ object.id }}'></button>
61
            </li>
62
          </ul>
63
        </li>
64
        {% endfor %}
65
      </ul>
66
    </div>
67
<p><a href="..">{% block back-link %}Retour à la gestion des absences{% endblock %}</a></p>
68
{% endblock %}
69
{% block dialogs %}
70
<div id="holiday-dlg"></div>
71
{% endblock %}
(6-6/16)