diff --git a/smash/web/templates/appointments/index.html b/smash/web/templates/appointments/index.html index 23c2de5cfad7e9d41157d7bb75fd0af7ed225bb6..4d6116dac7f1312975587a4cf88d8f0019ce18bc 100644 --- a/smash/web/templates/appointments/index.html +++ b/smash/web/templates/appointments/index.html @@ -135,14 +135,14 @@ }, editable: false, events: [ - {% for approach in approaching_list %} + {% for appointment in full_list %} { - title: '{{ approach.title }}', - start: '{{ approach.datetime_when | date:"c" }}', - end: '{{ approach.datetime_until | date:"c" }}', - color: '{{ approach.color }}', - subject_id: '{{ approach.visit.subject.id }}', - id: '{{ approach.id }}' + title: '{{ appointment.title }}', + start: '{{ appointment.datetime_when | date:"c" }}', + end: '{{ appointment.datetime_until | date:"c" }}', + color: '{{ appointment.color }}', + subject_id: '{{ appointment.visit.subject.id }}', + id: '{{ appointment.id }}' }, {% endfor %} ], diff --git a/smash/web/views.py b/smash/web/views.py index d48eade117e0ec66c7fda1a861920c1b4da14b7a..56792a160a5143aa3d0b49b8a4d85d012bc5194f 100644 --- a/smash/web/views.py +++ b/smash/web/views.py @@ -302,6 +302,7 @@ def appointments(request): futureDate = datetime.datetime.now()+datetime.timedelta(days=93) planning_list = Appointment.objects.filter(datetime_when__isnull=True, visit__datetime_begin__lt = futureDate) approaching_list = Appointment.objects.filter(datetime_when__gt = datetime.datetime.now()) + full_list = Appointment.objects.all() for plan in planning_list: @@ -309,7 +310,8 @@ def appointments(request): context = { 'planning_list': planning_list, - 'approaching_list': approaching_list + 'approaching_list': approaching_list, + 'full_list': full_list } return wrap_response(request, "appointments/index.html",context)