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 |
|
<button id="close-all-ressource-agendas" style="display: none">Fermer tous les agendas</button>
|
36 |
|
Disponibilités
|
37 |
|
<table>
|
38 |
|
<tr class="initials"><td></td></tr>
|
39 |
|
{% for start_time in disponibility_start_times %}
|
40 |
|
<tr class="hour-mark">
|
41 |
|
<td rowspan="4">{{ start_time }}:00</td>
|
42 |
|
</tr>
|
43 |
|
<tr></tr>
|
44 |
|
<tr></tr>
|
45 |
|
<tr></tr>
|
46 |
|
{% endfor %}
|
47 |
|
</table>
|
48 |
|
</td>
|
49 |
|
|
50 |
|
<td id="agendas">
|
51 |
|
<div id="tabs">
|
52 |
|
<ul>
|
53 |
|
{% for ressource_agenda in ressources_agenda %}
|
54 |
|
<li style="display: none" class="ressource-{{ ressource_agenda.ressource.id }} agenda">
|
55 |
|
<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>
|
56 |
|
<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>
|
57 |
|
</li>
|
58 |
|
{% endfor %}
|
59 |
|
</ul>
|
60 |
|
{% for ressource_agenda in ressources_agenda %}
|
61 |
|
<div id="tabs-ressource-{{ ressource_agenda.ressource.id }}" class="tabs agenda ressource-{{ ressource_agenda.ressource.id }}" style="display: none;">
|
62 |
|
<a class="print" href="#">Imprimer</a>
|
63 |
|
<div>
|
64 |
|
{% for appointment in ressource_agenda.appointments %}
|
65 |
|
<h3 class="{{ appointment.type }} {% if appointment.act_absence %}act-absence{% endif %} appointment"
|
66 |
|
{% if appointment.act_absence %}title="{{appointment.act_absence}}"{% endif %}>
|
67 |
|
<span class="hour">{{ appointment.begin_hour }}</span>
|
68 |
|
{% if appointment.event_type %} — {{ appointment.event_type }} {% endif %}
|
69 |
|
{% if appointment.title %} — {{ appointment.title }} {% endif %}
|
70 |
|
{% if appointment.length %} — {{ appointment.length }}m {% endif %}
|
71 |
|
{% if appointment.ressources_initial %} —{{ appointment.ressources_initial }} {% endif %}
|
72 |
|
{% if appointment.act_type %} — {{ appointment.act_type }} {% endif %}
|
73 |
|
{% if appointment.ressource %} — {{ appointment.ressource }} {% endif %}
|
74 |
|
<span class="right">
|
75 |
|
{% for service_name in appointment.other_services_names %}
|
76 |
|
<span class="box {{ service_name }}" title="{{ service_name }}"></span>
|
77 |
|
{% endfor %}
|
78 |
|
{% if appointment.description %}
|
79 |
|
<span title="Un commentaire existe" class="icon-comment"></span>
|
80 |
|
{% endif %}
|
81 |
|
{% if appointment.event_id %}
|
82 |
|
{% if appointment.is_recurrent %} R {% endif %}
|
83 |
|
{% if appointment.patient_record_id %}
|
84 |
|
<button title="Éditer un rendez-vous" class="edit-appointment icon-edit" data-event-id="{{ appointment.event_id }}"></button>
|
85 |
|
{% else %}
|
86 |
|
<button title="Éditer un événement" class="edit-event icon-edit" data-event-id="{{ appointment.event_id }}">
|
87 |
|
{% endif %}
|
88 |
|
<button class="remove-appointment icon-remove-sign" title="Supprimer un rendez-vous" data-url="{% url 'delete-occurrence' date=date service=service pk=appointment.event_id %}" data-rdv="{{ appointment.title }}"></button>
|
89 |
|
{% endif %}
|
90 |
|
</span>
|
91 |
|
</h3>
|
92 |
|
|
93 |
|
<div>
|
94 |
|
{% if appointment.type == 'free' %}
|
95 |
|
<button class='newrdv' data-url="{% url 'nouveau-rdv' service=service date=date %}" data-hour="{{ appointment.begin_hour }}">Nouveau rendez-vous patient</button>
|
96 |
|
<button class='newevent' data-url="{% url 'new-event' service=service date=date %}" data-hour="{{ appointment.begin_hour }}">Nouvel événement</button>
|
97 |
|
{% endif %}
|
98 |
|
{% if appointment.event_id %}
|
99 |
|
{% if appointment.workers %}
|
100 |
|
<p class="workers">
|
101 |
|
Intervenants :
|
102 |
|
{% for worker in appointment.workers %}
|
103 |
|
{{ worker.first_name }} <span class="lastname">{{ worker.last_name }}</span>{% if forloop.last %}.{% else %}, {% endif %}
|
104 |
|
{% endfor %}
|
105 |
|
</p>
|
106 |
|
{% endif %}
|
107 |
|
<div class="tabs-ressource-{{ ressource_agenda.ressource.id }} textedit">
|
108 |
|
<span></span>
|
109 |
|
<textarea>{{ appointment.description }}</textarea>
|
110 |
|
<button disabled="disabled" data-event-id="{{ appointment.event_id }}">✔</button>
|
111 |
|
</div>
|
112 |
|
{% endif %}
|
113 |
|
{% if appointment.patient_record_id %}
|
114 |
|
<p class="phones">
|
115 |
|
{% for address in appointment.patient.addresses.all %}
|
116 |
|
{% if address.place_of_life and address.phone %}
|
117 |
|
<span title="{{ address.number }} {{ address.street }} {{ address.zip_code }} {{ address.city }}" class="icon-home-space">{{ address.phone }}</span>
|
118 |
|
{% for contact in address.patientcontact_set.all %}
|
119 |
|
<span title="{{ contact.first_name }} {{ contact.last_name|upper }}" class="icon-user-space">{{ contact.mobile }}</span>
|
120 |
|
{% endfor %}
|
121 |
|
{% endif %}
|
122 |
|
{% endfor %}
|
123 |
|
</p>
|
124 |
|
<a href="/{{ service }}/dossiers/{{ appointment.patient_record_id }}/view" target="_blank">Dossier patient</a> -
|
125 |
|
<a href="/{{ service }}/dossiers/{{ appointment.patient_record_id }}/view#tab=5" target="_blank">Prochains rendez-vous</a> -
|
126 |
|
<a href="#" class="generate-mail-btn" data-dossier-id="{{ appointment.patient_record_id }}" data-date="{{date|date:"Y-m-d"}}" data-event-id="{{ appointment.event_id }}" data-next-url="{{ request.get_full_path }}">Courrier</a>
|
127 |
|
{% endif %}
|
128 |
|
{% if appointment.validation %}
|
129 |
|
<div><span>{% if appointment.validation.1 %}<strong>{{ appointment.validation.2 }}</strong>, le {{ appointment.validation.1.created }} par {{ appointment.validation.1.author }}
|
130 |
|
{% if appointment.validation.1.auto %}(par validation automatique){% endif %}. {% if appointment.validation.0.is_billed %}<strong>Acte facturé</strong>{% endif %}
|
131 |
|
{% else %}
|
132 |
|
Non pointé.
|
133 |
|
{% endif %}
|
134 |
|
</span>
|
135 |
|
{% if not appointment.validation.0.validation_locked and appointment.validation.3 %}
|
136 |
|
<form method="post" class="inline-form">
|
137 |
|
{% csrf_token %}
|
138 |
|
<input type="hidden" value="{{appointment.validation.0.id}}" name="acte-id">
|
139 |
|
<select data-previous="{{ last_status.state_name }}" name="act_state">
|
140 |
|
{% for state_name, display_state_name in appointment.validation.3.items %}
|
141 |
|
<option value="{{ state_name }}" {% if state_name == appointment.validation.1.state_name %}selected{% endif %}>{{ display_state_name }}</option>
|
142 |
|
{% endfor %}
|
143 |
|
</select>
|
144 |
|
<button>Modifier</button>
|
145 |
|
</form>
|
146 |
|
{% endif %}
|
147 |
|
</div>
|
148 |
|
{% endif %}
|
149 |
|
</div>
|
150 |
|
{% endfor %}
|
151 |
|
</div>
|
152 |
|
</div>
|
153 |
|
{% endfor %}
|
154 |
|
|
155 |
|
</div>
|
156 |
|
|
157 |
|
</div>
|
158 |
|
</td>
|
159 |
|
</tr>
|
160 |
|
</tbody>
|
161 |
|
</table>
|
162 |
|
|
163 |
|
{% endblock %}
|
164 |
|
|
165 |
|
{% block dialogs %}
|
166 |
|
<div id="rdv" style="display: none;"></div>
|
167 |
|
<div id="ajax-dlg" style="display: none;"></div>
|
168 |
|
{% endblock %}
|
agenda: resources title bars informations updated: workers names displayed, each element place in appropriate container
old resources template removed
Closes #4232