1
|
{% extends "personnes/base.html" %}
|
2
|
|
3
|
{% block extrascripts %}
|
4
|
{{ block.super }}
|
5
|
<script>
|
6
|
$(function() {
|
7
|
$('#lundi').click(function() {
|
8
|
$('#lundi-dlg').dialog({title: 'Plages du lundi',
|
9
|
width: '950px',
|
10
|
buttons: [ { text: "Annuler",
|
11
|
click: function() { $(this).dialog("close"); } },
|
12
|
{ text: "Valider",
|
13
|
click: function() { $(this).dialog("close"); } }]}
|
14
|
);
|
15
|
});
|
16
|
|
17
|
$('button[data-action=delete]').click(function() {
|
18
|
delete_holiday({{ object.id }}, $(this).data('id'));
|
19
|
});
|
20
|
|
21
|
$('button[data-action=edit]').click(function() {
|
22
|
edit_holiday({{ object.id }}, $(this).data('id'));
|
23
|
});
|
24
|
|
25
|
$('button[data-action=new]').click(function() {
|
26
|
add_holiday({{ object.id }});
|
27
|
});
|
28
|
|
29
|
});
|
30
|
</script>
|
31
|
{% endblock %}
|
32
|
|
33
|
{% block appbar %}
|
34
|
<h2>Personnel - <span class="lastname">{{ object.last_name }}</span> {{ object.first_name }}
|
35
|
{% if holiday %}<span class="en-conge">(absent jusqu'au {{ holiday.end_date|date:"j F" }})</span>{% endif %}
|
36
|
</h2>
|
37
|
<a href="..">Retourner à l'administration du personnel</a>
|
38
|
<form action="delete/" method="post" data-confirmation-msg="Êtes-vous sûr de vouloir supprimer le personnel {{object.last_name}} {{object.first_name}} ?" class="form-with-confirmation">
|
39
|
{% csrf_token %}
|
40
|
<button>Supprimer</button>
|
41
|
</form>
|
42
|
{% endblock %}
|
43
|
|
44
|
{% block content %}
|
45
|
<div id="info-membre">
|
46
|
<form method="post" class="ajax" id="id-form">
|
47
|
{% csrf_token %}
|
48
|
<div class="frame inline">
|
49
|
<h3>État civil</h3>
|
50
|
<button class="save enable-on-change">✔</button>
|
51
|
<p>
|
52
|
{% for field in forms.id %}
|
53
|
{{ field.label_tag }} : {{ field }}
|
54
|
{% if field.name == 'gender' %}
|
55
|
</p><p>
|
56
|
{% endif %}
|
57
|
{% endfor %}
|
58
|
</p>
|
59
|
</div>
|
60
|
</form>
|
61
|
|
62
|
<form method="post" class="ajax" id="services-form">
|
63
|
{% csrf_token %}
|
64
|
<div class="inline frame">
|
65
|
<h3>Services</h3>
|
66
|
<button class="save enable-on-change">✔</button>
|
67
|
|
68
|
<p class="services">
|
69
|
{{ forms.services.services }}
|
70
|
</p>
|
71
|
</div>
|
72
|
</form>
|
73
|
|
74
|
<div class="frame" id="schedule">
|
75
|
<h3>Horaires de travail</h3>
|
76
|
|
77
|
<table>
|
78
|
<thead>
|
79
|
<tr>
|
80
|
{% for weekday, name in weekdays %}
|
81
|
<td><a href="{{weekday}}/">{{ name|capfirst }}</a></td>
|
82
|
{% endfor %}
|
83
|
</tr>
|
84
|
</thead>
|
85
|
<tbody>
|
86
|
<tr>
|
87
|
{% for timetable in timetables %}
|
88
|
<td>
|
89
|
{% for schedule in timetable.schedules %}
|
90
|
De {{ schedule.start_time }} à {{ schedule.end_time }}
|
91
|
{% if not forloop.last %}
|
92
|
<br/>
|
93
|
{% endif %}
|
94
|
{% empty %}
|
95
|
-
|
96
|
{% endfor %}
|
97
|
</td>
|
98
|
{% endfor %}
|
99
|
</tr>
|
100
|
</tbody>
|
101
|
</table>
|
102
|
</div>
|
103
|
<div class="frame">
|
104
|
<h3>Absences</h3>
|
105
|
<!-- <button class="save icon-edit"></button> -->
|
106
|
<button class="save icon-plus" data-action='new'></button>
|
107
|
{% if holidays %}
|
108
|
<ul id="holidays">
|
109
|
<li>
|
110
|
<ul class="caption">
|
111
|
<li class="period">Période</li>
|
112
|
<li class="status">Statut</li>
|
113
|
<li class="type">Type</li>
|
114
|
<li class="comment">Commentaire</li>
|
115
|
<li class="groupe">Groupe</li>
|
116
|
<li class="actions">Actions</li>
|
117
|
</ul>
|
118
|
</li>
|
119
|
{% for holiday in holidays %}
|
120
|
<li id='{{ holiday.id }}'>
|
121
|
<ul style="background: {% cycle '#fff' '#eee' %}">
|
122
|
<li class="period">{{ holiday }}</li>
|
123
|
<li class="status">
|
124
|
{% if holiday.is_current and holiday.service %}
|
125
|
congés annuels, en cours
|
126
|
{% elif holiday.is_current %}
|
127
|
en cours
|
128
|
{% elif holiday.service %}
|
129
|
congés annuels
|
130
|
{% endif %}</li>
|
131
|
<li class="type">
|
132
|
{{ holiday.holiday_type }}
|
133
|
</li>
|
134
|
<li class="comment">
|
135
|
{% if holiday.comment %}
|
136
|
{{ holiday.comment }}
|
137
|
{% endif %}
|
138
|
</li>
|
139
|
<li class="groupe">
|
140
|
{% if holiday.holiday_type.for_group %}
|
141
|
<span class="icon-ok"></span>
|
142
|
</li>
|
143
|
<li class="actions"></li>
|
144
|
{% else %}
|
145
|
</li>
|
146
|
<li class="actions">
|
147
|
<button class="icon-edit" data-action='edit' data-id='{{ holiday.id }}'></button>
|
148
|
<button class="icon-remove" data-action='delete' data-id='{{ holiday.id }}'></button>
|
149
|
{% endif %}
|
150
|
</li>
|
151
|
</ul>
|
152
|
</li>
|
153
|
{% endfor %}
|
154
|
</ul>
|
155
|
{% endif %}
|
156
|
</div>
|
157
|
</div>
|
158
|
{% endblock %}
|
159
|
|
160
|
{% block dialogs %}
|
161
|
<div id="holiday-dlg" style="display: none;">
|
162
|
</div>
|
163
|
{% endblock %}
|