Revision 15a79142
Added by Mikaël Ates over 12 years ago
calebasse/agenda/templates/agenda/service-activity.html | ||
---|---|---|
14 | 14 |
|
15 | 15 |
<table class="main" id="activity"> |
16 | 16 |
<thead> |
17 |
<tr> <th>Heure</th> <th>Libellé</th> <th>Type d'acte</th> <th>Intervenants</th> <th>Absence</th> </tr>
|
|
17 |
<tr> <th>Heure</th> <th>Libellé</th> <th>Absence</th> <th>Type d'acte</th> <th>Intervenants</th> </tr>
|
|
18 | 18 |
</thead> |
19 | 19 |
<tbody> |
20 | 20 |
{% for row_appointments in appointments_times %} |
... | ... | |
24 | 24 |
{% if forloop.counter != 1 %} |
25 | 25 |
<tr> |
26 | 26 |
{% endif %} |
27 |
<td {% if appointment.type == 2 %}colspan="2"{% endif %}>{{ appointment.label }}</td> |
|
27 |
<td {% if appointment.type == 2 %}colspan="2"{% endif %}>{{ appointment.label }}{% if appointment.paper_id %} - {{ appointment.paper_id }} {% endif %}</td> |
|
28 |
<td>{% if appointment.absent %}{{ appointment.state }}{% endif %}</td> |
|
28 | 29 |
{% if appointment.type != 2 %}<td>{{ appointment.act }}</td>{% endif %} |
29 | 30 |
<td> |
31 |
{% if appointment.len_participants > 10 %} |
|
32 |
{{ appointment.len_participants }} intervenants |
|
33 |
{% else %} |
|
30 | 34 |
{% for participant in appointment.participants %} |
31 | 35 |
<span class="lastname">{{ participant.last_name }}</span> {{ participant.first_name }}<br/> |
32 | 36 |
{% endfor %} |
37 |
{% endif %} |
|
33 | 38 |
</td> |
34 |
<td>{% if appointment.absent %}{{ appointment.state }}{% endif %}</td> |
|
35 | 39 |
</tr> |
36 | 40 |
{% endfor %} |
37 | 41 |
</tr> |
calebasse/agenda/views.py | ||
---|---|---|
97 | 97 |
if event.event_type_id == 1: |
98 | 98 |
appointment['type'] = 1 |
99 | 99 |
appointment['label'] = event.patient.display_name |
100 |
appointment['paper_id'] = event.patient.paper_id |
|
100 | 101 |
appointment['act'] = event.act_type.name |
101 | 102 |
appointment['state'] = event.act.get_state() |
102 | 103 |
appointment['absent'] = event.act.is_absent() |
... | ... | |
108 | 109 |
appointment['label'] = '%s - %s' % (event.event_type.label, |
109 | 110 |
event.title) |
110 | 111 |
appointment['participants'] = event.participants.all() |
112 |
appointment['len_participants'] = len(appointment['participants']) |
|
111 | 113 |
appointments_times[start_datetime]['row'] += 1 |
112 | 114 |
appointments_times[start_datetime]['appointments'].append(appointment) |
113 | 115 |
context['appointments_times'] = sorted(appointments_times.items()) |
Also available in: Unified diff
agenda: refine agenda display.