1
|
{% extends "agenda/base.html" %}
|
2
|
{% load url from future %}
|
3
|
{% load apptags %}
|
4
|
|
5
|
{% block appbar %}
|
6
|
<h2>Agenda</h2>
|
7
|
<a href="../">Retourner à l'agenda</a>
|
8
|
<button class="newevent" data-hour="" data-url="{% url 'new-event' service=service date=date %}">Nouvel événement</button>
|
9
|
<button class="newrdv" data-hour="" data-url="{% url 'nouveau-rdv' service=service date=date %}">Nouveau rendez-vous patient</button>
|
10
|
{% endblock %}
|
11
|
|
12
|
{% block beforecontent %}
|
13
|
<div id="users">
|
14
|
<div id="filtre">
|
15
|
<input type="text"/>
|
16
|
</div>
|
17
|
<dl>
|
18
|
{% for ressources_type in ressources_types %}
|
19
|
<dt>{{ ressources_type.type }}</dt>
|
20
|
<dd><ul>
|
21
|
{% for ressource in ressources_type.ressources %}
|
22
|
<li id="selector-ressource-{{ressource.id}}" class="ressource-item" data-ressource-id="{{ressource.id}}" data-target=".ressource-{{ressource.id}}.agenda">{{ ressource.name }} <span class="toggle" title="cliquer pour déselectionner">(-)</span></li>
|
23
|
{% endfor %}
|
24
|
</ul></dd>
|
25
|
{% endfor %}
|
26
|
</dl>
|
27
|
</div>
|
28
|
{% endblock %}
|
29
|
|
30
|
{% block agenda-content %}
|
31
|
<table>
|
32
|
<tbody>
|
33
|
<tr>
|
34
|
<td id="dispos">
|
35
|
</td>
|
36
|
|
37
|
<td id="agendas">
|
38
|
<div id="tabs">
|
39
|
<ul>
|
40
|
{% for ressource_agenda in ressources_agenda %}
|
41
|
<li style="display: none" class="ressource-{{ ressource_agenda.ressource.id }} agenda">
|
42
|
<a id="link-tab-ressource-{{ ressource_agenda.ressource.id }}" href="#tabs-ressource-{{ ressource_agenda.ressource.id }}" class="tab" data-id="{{ ressource_agenda.ressource.id }}">{{ ressource_agenda.ressource.name }}</a>
|
43
|
<a href="#" style="padding: 3px;cursor: auto;" class="close-tab" data-target="selector-ressource-{{ ressource_agenda.ressource.id }}"><span class="ui-icon ui-icon-circle-close"></span></a>
|
44
|
</li>
|
45
|
{% endfor %}
|
46
|
</ul>
|
47
|
{% for ressource_agenda in ressources_agenda %}
|
48
|
<div id="tabs-ressource-{{ ressource_agenda.ressource.id }}" class="tabs agenda ressource-{{ ressource_agenda.ressource.id }}" style="display: none;">
|
49
|
<a class="print" href="#">Imprimer</a>
|
50
|
<div>
|
51
|
{% for appointment in ressource_agenda.appointments %}
|
52
|
<h3 class="{{ appointment.type }} {% if appointment.act_absence %}act-absence{% endif %} appointment"
|
53
|
{% if appointment.act_absence %}title="{{appointment.act_absence}}"{% endif %}>
|
54
|
<span class="hour">{{ appointment.begin_hour }}</span>
|
55
|
{% if appointment.event_type %} — {{ appointment.event_type }} {% endif %}
|
56
|
{% if appointment.title %} — {{ appointment.title }} {% endif %}
|
57
|
{% if appointment.length %} — {{ appointment.length }}m {% endif %}
|
58
|
{% if appointment.ressources_initial %} —{{ appointment.ressources_initial }} {% endif %}
|
59
|
{% if appointment.act_type %} — {{ appointment.act_type }} {% endif %}
|
60
|
{% if appointment.room %} — {{ appointment.room }} {% endif %}
|
61
|
<span class="right">
|
62
|
{% for service_name in appointment.other_services_names %}
|
63
|
<span class="box {{ service_name }}" title="{{ service_name }}"></span>
|
64
|
{% endfor %}
|
65
|
{% if appointment.convocation_sent %}
|
66
|
<span title="Une convocation a été envoyée" class="icon-envelope"></span>
|
67
|
{% endif %}
|
68
|
{% if appointment.description %}
|
69
|
<span title="Un commentaire existe" class="icon-comment"></span>
|
70
|
{% endif %}
|
71
|
{% if appointment.event_id %}
|
72
|
{% if appointment.patient_record_id %}
|
73
|
<button title="Éditer un rendez-vous" class="edit-appointment icon-edit" data-event-id="{{ appointment.event_id }}"></button>
|
74
|
{% else %}
|
75
|
<button title="Éditer un événement" class="edit-event icon-edit" data-event-id="{{ appointment.event_id }}">
|
76
|
{% endif %}
|
77
|
<button class="remove-appointment icon-remove-sign" title="Supprimer un rendez-vous" data-event-id="{{ appointment.event_id }}" data-rdv="{{ appointment.title }}"></button>
|
78
|
{% endif %}
|
79
|
</span>
|
80
|
</h3>
|
81
|
|
82
|
<div>
|
83
|
{% if appointment.type == 'free' %}
|
84
|
<button class='newrdv' data-url="{% url 'nouveau-rdv' service=service date=date %}" data-hour="{{ appointment.begin_hour }}">Nouveau rendez-vous patient</button>
|
85
|
<button class='newevent' data-url="{% url 'new-event' service=service date=date %}" data-hour="{{ appointment.begin_hour }}">Nouvel événement</button>
|
86
|
{% endif %}
|
87
|
{% if appointment.event_id %}
|
88
|
{% if appointment.workers %}
|
89
|
<p class="workers">
|
90
|
Intervenants :
|
91
|
{% for worker in appointment.workers %}
|
92
|
{{ worker.first_name }} <span class="lastname">{{ worker.last_name }}</span>{% if forloop.last %}.{% else %}, {% endif %}
|
93
|
{% endfor %}
|
94
|
</p>
|
95
|
{% endif %}
|
96
|
<div class="tabs-ressource-{{ ressource_agenda.ressource.id }} textedit">
|
97
|
<span></span>
|
98
|
<textarea>{{ appointment.description }}</textarea>
|
99
|
<button disabled="disabled" data-event-id="{{ appointment.event_id }}">✔</button>
|
100
|
</div>
|
101
|
{% endif %}
|
102
|
{% if appointment.patient_record_id %}
|
103
|
<p class="phones">
|
104
|
{% for address in appointment.patient.addresses.all %}
|
105
|
{% if address.place_of_life and address.phone %}
|
106
|
<span title="{{ address.number }} {{ address.street }} {{ address.zip_code }} {{ address.city }}" class="icon-home-space">{{ address.phone }}</span>
|
107
|
{% for contact in address.patientcontact_set.all %}
|
108
|
<span title="{{ contact.first_name }} {{ contact.last_name|upper }}" class="icon-user-space">{{ contact.mobile }}</span>
|
109
|
{% endfor %}
|
110
|
{% endif %}
|
111
|
{% endfor %}
|
112
|
</p>
|
113
|
<a href="/{{ service }}/dossiers/{{ appointment.patient_record_id }}/view" target="_blank">Dossier patient</a> -
|
114
|
<a href="/{{ service }}/dossiers/{{ appointment.patient_record_id }}/view#tab=5" target="_blank">Prochains rendez-vous</a> -
|
115
|
<a href="#" class="generate-mail-btn" data-dossier-id="{{ appointment.patient_record_id }}" data-date="{{date}}" data-occurence-id="{{ appointment.occurrence_id }}" data-next-url="{{ request.get_full_path }}">Courrier</a>
|
116
|
{% endif %}
|
117
|
{% if appointment.validation %}
|
118
|
<div><span>{% if appointment.validation.1 %}<strong>{{ appointment.validation.2 }}</strong>, le {{ appointment.validation.1.created }} par {{ appointment.validation.1.author }}
|
119
|
{% if appointment.validation.1.auto %}(par validation automatique){% endif %}. {% if appointment.validation.0.is_billed %}<strong>Acte facturé</strong>{% endif %}
|
120
|
{% else %}
|
121
|
Non pointé.
|
122
|
{% endif %}
|
123
|
</span>
|
124
|
{% if not appointment.validation.0.validation_locked and appointment.validation.3 %}
|
125
|
<form method="post" class="inline-form">
|
126
|
{% csrf_token %}
|
127
|
<input type="hidden" value="{{appointment.validation.0.id}}" name="acte-id">
|
128
|
<select data-previous="{{ last_status.state_name }}" name="act_state">
|
129
|
{% for state_name, display_state_name in appointment.validation.3.items %}
|
130
|
<option value="{{ state_name }}" {% if state_name == appointment.validation.1.state_name %}selected{% endif %}>{{ display_state_name }}</option>
|
131
|
{% endfor %}
|
132
|
</select>
|
133
|
<button>Modifier</button>
|
134
|
</form>
|
135
|
{% endif %}
|
136
|
</div>
|
137
|
{% endif %}
|
138
|
</div>
|
139
|
{% endfor %}
|
140
|
</div>
|
141
|
</div>
|
142
|
{% endfor %}
|
143
|
|
144
|
</div>
|
145
|
|
146
|
</div>
|
147
|
</td>
|
148
|
</tr>
|
149
|
</tbody>
|
150
|
</table>
|
151
|
|
152
|
{% endblock %}
|
153
|
|
154
|
{% block dialogs %}
|
155
|
<div id="rdv" style="display: none;">
|
156
|
</div>
|
157
|
{% endblock %}
|