From e3402808698141fbca25a3b13d9f3622bc73da25 Mon Sep 17 00:00:00 2001 From: Serghei MIHAI Date: Fri, 29 Aug 2014 15:48:46 +0200 Subject: [PATCH] agenda: graying the arrival and departure only for other services Closes #2532 --- calebasse/agenda/appointments.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/calebasse/agenda/appointments.py b/calebasse/agenda/appointments.py index bc92288..2067668 100644 --- a/calebasse/agenda/appointments.py +++ b/calebasse/agenda/appointments.py @@ -202,13 +202,14 @@ def get_daily_appointments(date, worker, service, time_tables, events, holidays) continue start_time = interval_set.lower_bound() end_time = interval_set.upper_bound() - services = [s.slug for s in time_table.services.all() if s != service] - if services: - appointment_type = 'busy-elsewhere' - else: + services = time_table.services.all() + common_service = service in services + services = [s.slug for s in services if s != service] + if common_service: appointment_type = 'info' - + else: + appointment_type = 'busy-elsewhere' appointment = Appointment() appointment.other_services_names = services appointment.init_start_stop(u"Arrivée", start_time, appointment_type) -- 2.1.0