Révision 1f163e44
Ajouté par Mikaël Ates il y a presque 10 ans
calebasse/agenda/templates/agenda/agendas-therapeutes.html | ||
---|---|---|
18 | 18 |
<div class="worker-agenda"> |
19 | 19 |
<h2> |
20 | 20 |
<strong>{{ service_name }}</strong> - Planning de {{ worker_agenda.worker.first_name }} <span class="lastname">{{ worker_agenda.worker.last_name }}</span> |
21 |
<input type="checkbox" class="printable" checked>
|
|
21 |
<input type="checkbox" class="printable" {% if worker_agenda.has_events %}checked{% endif %}>
|
|
22 | 22 |
</h2> |
23 | 23 |
<h3>{{ date|date:"DATE_FORMAT"|title }}</h3> |
24 | 24 |
|
calebasse/agenda/views.py | ||
---|---|---|
24 | 24 |
from calebasse import cbv |
25 | 25 |
|
26 | 26 |
from calebasse.agenda.forms import (NewAppointmentForm, NewEventForm, UpdatePeriodicAppointmentForm, |
27 |
DisablePatientAppointmentForm, UpdateAppointmentForm, UpdatePeriodicEventForm,
|
|
27 |
DisablePatientAppointmentForm, UpdateAppointmentForm, UpdatePeriodicEventForm, |
|
28 | 28 |
UpdateEventForm, PeriodicEventsSearchForm) |
29 | 29 |
|
30 | 30 |
logger = logging.getLogger(__name__) |
... | ... | |
505 | 505 |
if all(map(lambda x: x.holiday, daily_appointments)): |
506 | 506 |
continue |
507 | 507 |
context['workers_agenda'].append({'worker': worker, |
508 |
'appointments': daily_appointments}) |
|
508 |
'appointments': daily_appointments, |
|
509 |
'has_events': True if events_worker else False}) |
|
509 | 510 |
|
510 | 511 |
for worker_agenda in context.get('workers_agenda', []): |
511 | 512 |
patient_appointments = [x for x in worker_agenda['appointments'] if x.patient_record_id] |
Formats disponibles : Unified diff
agenda: uncheck by default agenda with no events on all agendas page (fixes #2611)