1
|
{% extends "agenda/base.html" %}
|
2
|
{% load widget_tweaks %}
|
3
|
{% load url from future %}
|
4
|
{% load apptags %}
|
5
|
|
6
|
{% block extrascripts %}
|
7
|
{{ block.super }}
|
8
|
<script type="text/javascript" src="{{ STATIC_URL }}/js/calebasse.reset-button.js">
|
9
|
</script>
|
10
|
<script>
|
11
|
$(function () {
|
12
|
var update_periodic_event_url = "{% url 'update-periodic-event' service=service date=date pk=0 %}";
|
13
|
var update_periodic_appointment_url = "{% url 'update-periodic-rdv' service=service date=date pk=0 %}";
|
14
|
|
15
|
$('button.edit-periodic-appointment').on('click', function () {
|
16
|
var id = $(this).data('event-id');
|
17
|
var title = $(this).data('title');
|
18
|
generic_ajaxform_dialog(update_periodic_appointment_url + id,
|
19
|
title, '#event-dlg', 950, 'Modifier',
|
20
|
"{% url 'periodic-events' service=service date=date %}");
|
21
|
});
|
22
|
$('button.edit-periodic-event').on('click', function () {
|
23
|
var id = $(this).data('event-id');
|
24
|
var title = $(this).data('title');
|
25
|
generic_ajaxform_dialog(update_periodic_event_url + id,
|
26
|
title, '#event-dlg', 950, 'Modifier',
|
27
|
"{% url 'periodic-events' service=service date=date %}");
|
28
|
});
|
29
|
});
|
30
|
</script>
|
31
|
{% endblock %}
|
32
|
|
33
|
{% block appbar %}
|
34
|
<h2>Rendez-vous périodiques{% if worker %} de {{ worker }}{% endif %}</h2>
|
35
|
<a href="{% url 'agenda' service=service date=date %}">Retourner à l'agenda</a>
|
36
|
{% endblock %}
|
37
|
{% block content %}
|
38
|
<div id="sidebar">
|
39
|
<form id="periodic-events-search-form">
|
40
|
<div class="field">
|
41
|
<label for="start_date">Rendez-vous périodiques possédant une occurence dans les trois mois qui suivent le :</label>
|
42
|
{{ search_form.start_date|add_class:"datepicker-date" }}
|
43
|
</div>
|
44
|
<p>OU</p>
|
45
|
<div class="field">
|
46
|
<label for="end_date">Rendez-vous périodiques possèdant une occurence avant le :</label>
|
47
|
{{ search_form.end_date|add_class:"datepicker-date" }}
|
48
|
</div>
|
49
|
<div class="field">
|
50
|
{{ search_form.event_type }}
|
51
|
<label for="no_end_date">{{ search_form.no_end_date }} Sans date de fin</label>
|
52
|
</div>
|
53
|
<div class="field">
|
54
|
<label for="patient">avec le patient:</label>
|
55
|
{{ search_form.patient }}
|
56
|
</div>
|
57
|
<div class="field">
|
58
|
<label for="patient">avec le participant:</label>
|
59
|
{{ search_form.worker }}
|
60
|
</div>
|
61
|
{% if request.GET %}
|
62
|
<div class="search-reset">
|
63
|
<button id="search">Rechercher</button>
|
64
|
<button id="reset" class="icon-remove-sign" title="Réinitialiser"></button>
|
65
|
</div>
|
66
|
{% else %}
|
67
|
<button id="search">Rechercher</button>
|
68
|
{% endif %}
|
69
|
</form>
|
70
|
</div>
|
71
|
<script>
|
72
|
$('.datepicker-date').datepicker({dateFormat: 'd/m/yy', showOn: 'button'});
|
73
|
</script>
|
74
|
<div class="content">
|
75
|
{% if request.GET %}
|
76
|
<p>{{ object_list|length }} évènement(s) trouvé(s).</p>
|
77
|
{% endif %}
|
78
|
{% for event in object_list %}
|
79
|
<div id="events">
|
80
|
<div class="event frame" id="event-frame-{{ event.id }}">
|
81
|
<h3>
|
82
|
<span>{% if event.patient %}Rendez-vous patient{% else %}Évènement{% endif %}: {{ event.recurrence_description|lower }}</span>
|
83
|
—
|
84
|
<span class="hour">{{ event.start_datetime.time }}</span>
|
85
|
{% if event.title %} — {{ event.title }} {% endif %}
|
86
|
{% if event.patient.paper_id %} — {{ event.patient.paper_id }} {% endif %}
|
87
|
{% if event.length %} — {{ event.length }} mn {% endif %}
|
88
|
{% if event.workers_initial %} — {{ event.workers_initial }} {% endif %}
|
89
|
{% if event.room %} — {{ event.room }} {% endif %}
|
90
|
<span class="right">
|
91
|
{% for other_service in event.services.all %}
|
92
|
{% if other_service.name != service_name %}
|
93
|
<span class="box {{ other_service.slug }}" title="{{ other_service.name }}"></span>
|
94
|
{% endif %}
|
95
|
{% endfor %}
|
96
|
{% if event.description %}
|
97
|
<span title="Un commentaire existe" class="icon-comment"></span>
|
98
|
{% endif %}
|
99
|
{% if event.event_type_id == 1 %}
|
100
|
<button title="Éditer un rendez-vous" class="edit-periodic-appointment icon-edit" data-event-id="{{ event.id }}"></button>
|
101
|
{% else %}
|
102
|
<button title="Éditer un événement" class="edit-periodic-event icon-edit" data-event-id="{{ event.id }}">
|
103
|
{% endif %}
|
104
|
</span>
|
105
|
</h3>
|
106
|
{% if event.act_type %}
|
107
|
<p>Type: {{ event.act_type }}</p>
|
108
|
{% endif %}
|
109
|
<p>Avec:
|
110
|
{% for participant in event.participants.all %}
|
111
|
{{ participant }}{% if not forloop.last %}, {% endif %}
|
112
|
{% endfor %}
|
113
|
</p>
|
114
|
</div>
|
115
|
</div>
|
116
|
{% endfor %}
|
117
|
{% if not request.GET %}
|
118
|
<div class="big-msg-info">
|
119
|
Utilisez le formulaire de recherche sur la gauche de l'écran pour afficher
|
120
|
les rendez-vous périodiques correspondants.
|
121
|
</div>
|
122
|
{% elif not object_list %}
|
123
|
<div>Pas de résultat pour votre recherche</div>
|
124
|
{% endif %}
|
125
|
</div>
|
126
|
{% endblock %}
|
127
|
|
128
|
{% block dialogs %}
|
129
|
<div id="event-dlg" style="display: none">
|
130
|
</div>
|
131
|
{% endblock %}
|