1
|
{% extends "calebasse/base.html" %}
|
2
|
{% load url from future %}
|
3
|
{% block extrascripts %}
|
4
|
<script>
|
5
|
$(function() {
|
6
|
$('#tabs').tabs();
|
7
|
|
8
|
$('div.agenda > div').accordion({active: false, autoHeight: false});
|
9
|
|
10
|
$('.person-item').on('click', function() {
|
11
|
$(this).toggleClass('active');
|
12
|
var $target = $($(this).data('target'));
|
13
|
$target.toggle();
|
14
|
// var selected = $('#tabs').tabs('option', 'selected');
|
15
|
// var length = $('#tabs').tabs('length');
|
16
|
// alert($('.tabs').index($target.filter('.tabs')));
|
17
|
if ($target.is(':visible')) {
|
18
|
$target.click();
|
19
|
}
|
20
|
});
|
21
|
|
22
|
/* Gestion du filtre sur les utilisateurs */
|
23
|
$('#filtre input').keyup(function() {
|
24
|
var filtre = $(this).val();
|
25
|
if (filtre) {
|
26
|
$('#users li').each(function() {
|
27
|
if ($(this).text().match(filtre)) {
|
28
|
$(this).show();
|
29
|
} else {
|
30
|
$(this).hide();
|
31
|
}
|
32
|
});
|
33
|
} else {
|
34
|
$('#users li').show();
|
35
|
}
|
36
|
|
37
|
});
|
38
|
$('#agenda-date').datepicker();
|
39
|
$('.date').datepicker({showOn: 'button'});
|
40
|
$('#add-intervenant-btn').click(function() {
|
41
|
var text = $(this).prev().val();
|
42
|
$('#intervenants ul').append('<li><input type="checkbox" value="' + text + '" checked="checked">' + text + '</input></li>');
|
43
|
$(this).prev().val('').focus();
|
44
|
return false;
|
45
|
});
|
46
|
$('#newrdv').click(function() {
|
47
|
$('#rdv').dialog({title: 'Nouveau rendez-vous',
|
48
|
width: '800px',
|
49
|
buttons: [ { text: "Fermer",
|
50
|
click: function() { $(this).dialog("close"); } },
|
51
|
{ text: "Ajouter",
|
52
|
click: function() { $("#rdv form").submit(); } }]}
|
53
|
);
|
54
|
});
|
55
|
});
|
56
|
</script>
|
57
|
<style>
|
58
|
.person-item span { display: none; }
|
59
|
.person-item.active span { display: inline; }
|
60
|
#agenda-date { width: 20em; }
|
61
|
</style>
|
62
|
{% endblock %}
|
63
|
|
64
|
{% block title %}{{ block.super }} - Agenda {% endblock %}
|
65
|
|
66
|
{% block header %}
|
67
|
{{ block.super }}
|
68
|
<span>Agenda - {{ service_name }}</spam>
|
69
|
{% endblock %}
|
70
|
|
71
|
{% block appbar %}
|
72
|
<h2>Agenda</h2>
|
73
|
<a href="accueil.html">Retourner à l'accueil</a>
|
74
|
<button>Nouvel événement (autre)</button>
|
75
|
<button id="newrdv">Nouveau rendez-vous patient</button>
|
76
|
{% endblock %}
|
77
|
|
78
|
{% block beforecontent %}
|
79
|
<div id="extra-top-links">
|
80
|
<a href="activite-du-service">Activité du service</a>
|
81
|
—
|
82
|
<a href="validation-des-actes">Validation des actes</a>
|
83
|
—
|
84
|
<a href="rendez-vous-periodiques">Rendez-vous périodiques</a>
|
85
|
</div>
|
86
|
|
87
|
|
88
|
<div id="users">
|
89
|
<div id="filtre">
|
90
|
<input type="text"/>
|
91
|
</div>
|
92
|
<dl>
|
93
|
{% for workers_type in workers_types %}
|
94
|
<dt>{{ workers_type.type }}</dt>
|
95
|
<dd><ul>
|
96
|
{% for worker in workers_type.workers %}
|
97
|
<li class="person-item" data-target=".worker-{{worker.id}}.agenda">{{ worker.display_name }}</li>
|
98
|
{% endfor %}
|
99
|
</ul></dd>
|
100
|
{% endfor %}
|
101
|
</dl>
|
102
|
</div>
|
103
|
{% endblock %}
|
104
|
|
105
|
{% block content %}
|
106
|
<div class="content">
|
107
|
<div id="datesel">
|
108
|
<a href="../{{ previous_month|date:"SHORT_DATE_FORMAT"}}">««</a>
|
109
|
<a href="../{{ previous_day|date:"SHORT_DATE_FORMAT"}}">«</a>
|
110
|
<!-- <span>Jeudi 5 juillet 2012</span> -->
|
111
|
<input id="agenda-date" value="{{ date|date:"DATE_FORMAT" }}"/>
|
112
|
<a href="../{{ next_day|date:"SHORT_DATE_FORMAT"}}">»</a>
|
113
|
<a href="../{{ next_month|date:"SHORT_DATE_FORMAT"}}">»»</a>
|
114
|
</div>
|
115
|
|
116
|
<table>
|
117
|
<tbody>
|
118
|
<tr>
|
119
|
<td id="dispos">
|
120
|
Disponibilités
|
121
|
<table>
|
122
|
{% for start_time, quaters in disponibility.items %}
|
123
|
<tr class="hour-mark">
|
124
|
<td rowspan="4">{{ start_time }}:00</td>
|
125
|
{% for quater in quaters|slice:":1" %}
|
126
|
{% for value in quater %}
|
127
|
<td class="worker-{{ value.id }} agenda {{ value.dispo }}" style="display: none; "></td>
|
128
|
{% endfor %}
|
129
|
{% endfor %}
|
130
|
</tr>
|
131
|
{% for quater in quaters|slice:"1:4" %}
|
132
|
<tr>
|
133
|
{% for value in quater %}
|
134
|
<td class="worker-{{ value.id }} agenda {{ value.dispo }}" style="display: none; "></td>
|
135
|
{% endfor %}
|
136
|
</tr>
|
137
|
{% endfor %}
|
138
|
{% endfor %}
|
139
|
</table>
|
140
|
</td>
|
141
|
|
142
|
<td id="agendas">
|
143
|
<div id="tabs">
|
144
|
<ul>
|
145
|
{% for worker_agenda in workers_agenda %}
|
146
|
<li><a href="#tabs-worker-{{ worker_agenda.worker.id }}" class="worker-{{ worker_agenda.worker.id }} agenda" style="display: none;">{{ worker_agenda.worker.display_name }}</a></li>
|
147
|
{% endfor %}
|
148
|
</ul>
|
149
|
<div id="tabs-sandy-kilo" class="tabs agenda sandy-kilo agenda">
|
150
|
<a class="print" href="#">Imprimer</a>
|
151
|
<div>
|
152
|
<h3 class="info"><span class="hour">08:00</span> — Arrivée</h3>
|
153
|
<div></div>
|
154
|
<h3 class="free"><span class="hour">08:00</span> — 120m
|
155
|
</h3>
|
156
|
<div><button class='booking' data-hour="08:00">Prendre un rendez-vous</button></div>
|
157
|
<h3 class="busy-elsewhere convocation"><span class="hour">10:00</span> — 45m — John Doe — SK
|
158
|
<span class="right">
|
159
|
<span class="box camsp" title="CAMSP"></span>
|
160
|
<img title="Une convocation a été envoyée" src="{{ STATIC_URL }}images/emblem-mail.png"/>
|
161
|
<img title="Un commentaire existe" src="{{ STATIC_URL }}images/emblem-documents.png"/>
|
162
|
<button>✍</button>
|
163
|
<button>➖</button>
|
164
|
</span>
|
165
|
</h3>
|
166
|
<div>
|
167
|
<div class="textedit">
|
168
|
<textarea>bla bla bla</textarea>
|
169
|
<button>✔</button>
|
170
|
</div>
|
171
|
<a href="#">Dossier patient</a> -
|
172
|
<a href="#">Prochains rendez-vous</a> -
|
173
|
<a href="#">Convoquer patient</a>
|
174
|
</div>
|
175
|
<h3 class="busy-here"><span class="hour">10:45</span> — 45m — Jack Itchan — SK
|
176
|
<span class="right">
|
177
|
<img title="Un commentaire existe" src="{{ STATIC_URL }}images/emblem-documents.png"/>
|
178
|
<button>✍</button>
|
179
|
<button>➖</button>
|
180
|
</span>
|
181
|
</h3>
|
182
|
<div>
|
183
|
<div class="textedit">
|
184
|
<textarea>bla bla bla</textarea>
|
185
|
<button>✔</button>
|
186
|
</div>
|
187
|
<a href="#">Dossier patient</a> -
|
188
|
<a href="#">Prochains rendez-vous</a> -
|
189
|
<a href="#">Convoquer patient</a>
|
190
|
</div>
|
191
|
<h3 class="busy-elsewhere"><span class="hour">11:30</span> — 30m — Réunion — Salle S4</h3>
|
192
|
<div>
|
193
|
<div class="textedit">
|
194
|
<textarea>bla bla bla</textarea>
|
195
|
<button>✔</button>
|
196
|
</div>
|
197
|
</div>
|
198
|
<h3 class="free"><span class="hour">12:00</span> — 30m</h3>
|
199
|
<div></div>
|
200
|
<h3 class="info"><span class="hour">12:30</span> — Départ</h3>
|
201
|
<div></div>
|
202
|
</div>
|
203
|
</div>
|
204
|
|
205
|
<div id="tabs-bob-leponge" class="tabs agenda bob-leponge">
|
206
|
<a class="print" href="#">Imprimer</a>
|
207
|
<div>
|
208
|
<h3 class="info"><span class="hour">08:30</span> — Arrivée</h3>
|
209
|
<div></div>
|
210
|
<h3 class="free"><span class="hour">08:30</span> — 180m</h3>
|
211
|
<div><button>Prendre un rendez-vous</button></div>
|
212
|
<h3 class="busy-elsewhere"><span class="hour">11:30</span> — 30m — Réunion — Salle S4</h3>
|
213
|
<div>
|
214
|
<div class="textedit">
|
215
|
<textarea>bla bla bla</textarea>
|
216
|
<button>✔</button>
|
217
|
</div>
|
218
|
</div>
|
219
|
<h3 class="free"><span class="hour">12:00</span> — 30m</h3>
|
220
|
<div></div>
|
221
|
<h3 class="info"><span class="hour">12:30</span> — Départ</h3>
|
222
|
<div></div>
|
223
|
<h3 class="info"><span class="hour">13:00</span> — Arrivée</h3>
|
224
|
<div></div>
|
225
|
<h3 class="free"><span class="hour">13:00</span> — 270m</h3>
|
226
|
<div><button>Prendre un rendez-vous</button></div>
|
227
|
<h3 class="info"><span class="hour">17:30</span> — Départ</h3>
|
228
|
<div></div>
|
229
|
</div>
|
230
|
|
231
|
</div>
|
232
|
|
233
|
</div>
|
234
|
</td>
|
235
|
</tr>
|
236
|
</tbody>
|
237
|
</table>
|
238
|
</div>
|
239
|
|
240
|
{% endblock %}
|
241
|
|
242
|
{% block dialogs %}
|
243
|
<div id="rdv" style="display: none;">
|
244
|
<form method="post" action="{% url "nouveau-rdv" service=service date=date %}">
|
245
|
{% with new_appointment_form as form %}
|
246
|
<table><tr><td>
|
247
|
<p>
|
248
|
|
249
|
{{ form.date.label_tag }}
|
250
|
{{ form.date }}
|
251
|
</p>
|
252
|
</td><td>
|
253
|
<p>
|
254
|
{{ form.time.label_tag }}
|
255
|
{{ form.time }}
|
256
|
</p>
|
257
|
</td><td>
|
258
|
<p>
|
259
|
{{ form.duration.label_tag }}
|
260
|
{{ form.duration }}
|
261
|
</p>
|
262
|
</td></tr>
|
263
|
|
264
|
<tr>
|
265
|
<td>
|
266
|
<h4>{{ form.participants.label_tag }}</h4>
|
267
|
<div id="intervenants">
|
268
|
{{ form.participants }}
|
269
|
</div>
|
270
|
</td>
|
271
|
<td>
|
272
|
<h4>{{ form.patient.label_tag }}</h4>
|
273
|
{{ form.patient }}
|
274
|
</td>
|
275
|
<td>
|
276
|
|
277
|
<h4>{{ form.act_type.label_tag }}</h4>
|
278
|
{{ form.act_type }}
|
279
|
</td>
|
280
|
</tr>
|
281
|
</table>
|
282
|
|
283
|
<hr/>
|
284
|
<button>Configurer la périodicité</button>
|
285
|
{% endwith %}
|
286
|
</form>
|
287
|
</div>
|
288
|
{% endblock %}
|