Project

General

Profile

« Previous | Next » 

Revision 74231c6d

Added by Mikaël Ates about 13 years ago

agenda: refine display of events.

View differences:

calebasse/agenda/appointments.py
validation_states = None
self.validation = (event.act, state, display_name, validation_states)
else:
if event.event_type.label == 'Autre' and event.title:
self.title = event.title
else:
self.title = '%s' % event.event_type.label
if event.title:
self.title += ' - %s' % event.title
self.event_type = event.event_type
self.workers = event.participants.all()
if len(self.workers) > 4 :
calebasse/agenda/templates/agenda/agendas-therapeutes.html
<tr data-event-id="{{ appointment.event_id }}">
<td class="col-time">{{ appointment.begin_hour }}</td>
<td class="col-duration">{% if appointment.length %}{{ appointment.length }}min{% endif %}</td>
<td class="col-record-id">{% if appointment.patient_record_id %}
{{ appointment.patient_record_paper_id }}<br/>
({{ appointment.patient_record_id }}){% endif %}
<td class="col-record-id">
{% if appointment.patient_record_id %}
{% if appointment.patient_record_paper_id %}
{{ appointment.patient_record_paper_id }}
{% else %}
Pas de numéro papier.
{% endif %}
{% endif %}
</td>
<td> {% if appointment.title %}{{ appointment.title }}{% endif %}</td>
<td/>
<td> {% if appointment.act_absence %}{{ appointment.act_absence }}{% endif %}</td>
<td> {% if appointment.act_type %}{{ appointment.act_type }}{% endif %}</td>
<td> {% if appointment.description %}{{ appointment.description }}{% endif %}</td>
<td> {% for worker in appointment.workers %}
<span class="lastname">{{ worker.last_name }}</span> {{ worker.first_name }}<br/>
{% endfor %}
<td>
{% if appointment.workers and appointment.workers|length > 10 %}
{{ appointment.workers|length }} intervenants
{% else %}
{% for worker in appointment.workers %}
<span class="lastname">{{ worker.last_name }}</span> {{ worker.first_name }}<br/>
{% endfor %}
{% endif %}
</td>
</tr>
{% endfor %}
calebasse/agenda/templates/agenda/ajax-worker-tab.html
<h3 class="{{ appointment.type }} {% if appointment.act_absence %}act-absence{% endif %} appointment"
{% if appointment.act_absence %}title="{{appointment.act_absence}}"{% endif %}>
<span class="hour">{{ appointment.begin_hour }}</span>
{% if appointment.event_type %} — {{ appointment.event_type }} {% endif %}
{% if appointment.title %} — {{ appointment.title }} {% endif %}
{% if appointment.patient.paper_id %} — {{ appointment.patient.paper_id }} {% endif %}
{% if appointment.length %} — {{ appointment.length }} mn {% endif %}

Also available in: Unified diff