Revision b306fcbb
Added by Frédéric Péters over 11 years ago
calebasse/agenda/templates/agenda/index.html | ||
---|---|---|
57 | 57 |
<td id="dispos"> |
58 | 58 |
Disponibilités |
59 | 59 |
<table> |
60 |
{% for start_time, quarters in disponibility.items %}
|
|
60 |
{% for start_time in disponibility_start_times %}
|
|
61 | 61 |
<tr class="hour-mark"> |
62 | 62 |
<td rowspan="4">{{ start_time }}:00</td> |
63 |
{% for quarter in quarters %} |
|
64 |
{% if forloop.counter != 1 %} |
|
65 |
<tr> |
|
66 |
{% endif %} |
|
67 |
{% for value in quarter %} |
|
68 |
<td class="worker-{{ value.id }} agenda {{ value.dispo }}" style="display: none; "></td> |
|
69 |
{% endfor %} |
|
70 |
{% endfor %} |
|
71 | 63 |
</tr> |
64 |
<tr></tr> |
|
65 |
<tr></tr> |
|
66 |
<tr></tr> |
|
72 | 67 |
{% endfor %} |
73 | 68 |
</table> |
74 | 69 |
</td> |
... | ... | |
76 | 71 |
<td id="agendas"> |
77 | 72 |
<div id="tabs"> |
78 | 73 |
<ul> |
79 |
{% for worker_agenda in workers_agenda %}
|
|
80 |
<li style="display: none" class="worker-{{ worker_agenda.worker.id }} agenda">
|
|
81 |
<a id="link-tab-worker-{{ worker_agenda.worker.id }}" href="#tabs-worker-{{ worker_agenda.worker.id }}" class="tab" data-id="{{ worker_agenda.worker.id }}">{{ worker_agenda.worker.first_name }} <span class="lastname">{{ worker_agenda.worker.last_name }}</span></a>
|
|
82 |
<a href="#" style="padding: 3px;cursor: auto;" class="close-tab" data-target="selector-worker-{{ worker_agenda.worker.id }}"><span class="ui-icon ui-icon-circle-close"></span></a>
|
|
74 |
{% for worker in workers %}
|
|
75 |
<li style="display: none" class="worker-{{ worker.id }} agenda"> |
|
76 |
<a id="link-tab-worker-{{ worker.id }}" href="#tabs-worker-{{ worker.id }}" class="tab" data-id="{{ worker.id }}">{{ worker.first_name }} <span class="lastname">{{ worker.last_name }}</span></a>
|
|
77 |
<a href="#" style="padding: 3px;cursor: auto;" class="close-tab" data-target="selector-worker-{{ worker.id }}"><span class="ui-icon ui-icon-circle-close"></span></a> |
|
83 | 78 |
</li> |
84 | 79 |
{% endfor %} |
85 | 80 |
</ul> |
86 |
{% for worker_agenda in workers_agenda %} |
|
87 |
<div id="tabs-worker-{{ worker_agenda.worker.id }}" class="tabs agenda worker-{{ worker_agenda.worker.id }}" style="display: none;"> |
|
88 |
<a class="print" href="#">Imprimer</a> |
|
89 |
<div> |
|
90 |
{% for appointment in worker_agenda.appointments %} |
|
91 |
<h3 class="{{ appointment.type }} {% if appointment.act_absence %}act-absence{% endif %} appointment" |
|
92 |
{% if appointment.act_absence %}title="{{appointment.act_absence}}"{% endif %}> |
|
93 |
<span class="hour">{{ appointment.begin_hour }}</span> |
|
94 |
{% if appointment.event_type %} — {{ appointment.event_type }} {% endif %} |
|
95 |
{% if appointment.title %} — {{ appointment.title }} {% endif %} |
|
96 |
{% if appointment.length %} — {{ appointment.length }}m {% endif %} |
|
97 |
{% if appointment.workers_initial %} —{{ appointment.workers_initial }} {% endif %} |
|
98 |
{% if appointment.act_type %} — {{ appointment.act_type }} {% endif %} |
|
99 |
{% if appointment.room %} — {{ appointment.room }} {% endif %} |
|
100 |
<span class="right"> |
|
101 |
{% for service_name in appointment.other_services_names %} |
|
102 |
<span class="box {{ service_name }}" title="{{ service_name }}"></span> |
|
103 |
{% endfor %} |
|
104 |
{% if appointment.convocation_sent %} |
|
105 |
<span title="Une convocation a été envoyée" class="icon-envelope"></span> |
|
106 |
{% endif %} |
|
107 |
{% if appointment.description %} |
|
108 |
<span title="Un commentaire existe" class="icon-comment"></span> |
|
109 |
{% endif %} |
|
110 |
{% if appointment.event_id %} |
|
111 |
{% if appointment.patient_record_id %} |
|
112 |
<button title="Éditer un rendez-vous" class="edit-appointment icon-edit" data-occurrence-id="{{ appointment.occurrence_id }}"></button> |
|
113 |
{% else %} |
|
114 |
<button title="Éditer un événement" class="edit-event icon-edit" data-occurrence-id="{{ appointment.occurrence_id }}"> |
|
115 |
{% endif %} |
|
116 |
<button class="remove-appointment icon-remove-sign" title="Supprimer un rendez-vous" data-occurrence-id="{{ appointment.occurrence_id }}" data-rdv="{{ appointment.title }}"></button> |
|
117 |
{% endif %} |
|
118 |
</span> |
|
119 |
</h3> |
|
120 |
|
|
121 |
<div> |
|
122 |
{% if appointment.type == 'free' %} |
|
123 |
<button class='newrdv' data-url="{% url 'nouveau-rdv' service=service date=date %}" data-hour="{{ appointment.begin_hour }}">Nouveau rendez-vous patient</button> |
|
124 |
<button class='newevent' data-url="{% url 'new-event' service=service date=date %}" data-hour="{{ appointment.begin_hour }}">Nouvel événement</button> |
|
125 |
{% endif %} |
|
126 |
{% if appointment.event_id %} |
|
127 |
{% if appointment.workers %} |
|
128 |
<p class="workers"> |
|
129 |
Intervenants : |
|
130 |
{% for worker in appointment.workers %} |
|
131 |
{{ worker.first_name }} <span class="lastname">{{ worker.last_name }}</span>{% if forloop.last %}.{% else %}, {% endif %} |
|
132 |
{% endfor %} |
|
133 |
</p> |
|
134 |
{% endif %} |
|
135 |
<div class="tabs-worker-{{ worker_agenda.worker.id }} textedit"> |
|
136 |
<span></span> |
|
137 |
<textarea>{{ appointment.description }}</textarea> |
|
138 |
<button disabled="disabled" data-event-id="{{ appointment.event_id }}">✔</button> |
|
139 |
</div> |
|
140 |
{% endif %} |
|
141 |
{% if appointment.patient_record_id %} |
|
142 |
<p class="phones"> |
|
143 |
{% for address in appointment.patient.addresses.all %} |
|
144 |
{% if address.place_of_life %} |
|
145 |
<span title="{{ address.number }} {{ address.street }} {{ address.zip_code }} {{ address.city }}" class="icon-home-space">{{ address.phone }}</span> |
|
146 |
{% for contact in address.patientcontact_set.all %} |
|
147 |
<span title="{{ contact.first_name }} {{ contact.last_name|upper }}" class="icon-user-space">{{ contact.mobile }}</span> |
|
148 |
{% endfor %} |
|
149 |
{% endif %} |
|
150 |
{% endfor %} |
|
151 |
</p> |
|
152 |
<a href="/{{ service }}/dossiers/{{ appointment.patient_record_id }}/view" target="_blank">Dossier patient</a> - |
|
153 |
<a href="/{{ service }}/dossiers/{{ appointment.patient_record_id }}/view#tab=5" target="_blank">Prochains rendez-vous</a> - |
|
154 |
<a href="#">Courrier</a> |
|
155 |
{% endif %} |
|
156 |
{% if appointment.validation %} |
|
157 |
<div><span>{% if appointment.validation.1 %}<strong>{{ appointment.validation.2 }}</strong>, le {{ appointment.validation.1.created }} par {{ appointment.validation.1.author }} |
|
158 |
{% if appointment.validation.1.auto %}(par validation automatique){% endif %}. {% if appointment.validation.0.is_billed %}<strong>Acte facturé</strong>{% endif %} |
|
159 |
{% else %} |
|
160 |
Non pointé. |
|
161 |
{% endif %} |
|
162 |
</span> |
|
163 |
{% if not appointment.validation.0.validation_locked and appointment.validation.3 %} |
|
164 |
<form method="post" class="inline-form"> |
|
165 |
{% csrf_token %} |
|
166 |
<input type="hidden" value="{{appointment.validation.0.id}}" name="acte-id"> |
|
167 |
<select data-previous="{{ last_status.state_name }}" name="act_state"> |
|
168 |
{% for state_name, display_state_name in appointment.validation.3.items %} |
|
169 |
<option value="{{ state_name }}" {% if state_name == appointment.validation.1.state_name %}selected{% endif %}>{{ display_state_name }}</option> |
|
170 |
{% endfor %} |
|
171 |
</select> |
|
172 |
<button {% if appointment.validation.1 %}disabled{% endif %}>Modifier</button> |
|
173 |
</form> |
|
174 |
{% endif %} |
|
175 |
</div> |
|
176 |
{% endif %} |
|
177 |
</div> |
|
178 |
{% endfor %} |
|
81 |
{% for worker in workers %} |
|
82 |
<div id="tabs-worker-{{ worker.id }}" class="tabs agenda worker-{{ worker.id }}" style="display: none;"> |
|
83 |
<div class="worker-tab-content-placeholder"> |
|
84 |
<!-- placeholder --> |
|
179 | 85 |
</div> |
180 | 86 |
</div> |
181 | 87 |
{% endfor %} |
Also available in: Unified diff
agenda: make tabs load on demand