diff --git a/smash/web/api_views/appointment.py b/smash/web/api_views/appointment.py index 932ee6ee75be8fe3e54526a33a6ae73bf1da3202..227d8353e60b80d3c2bb9a51f115889c86fd78ba 100644 --- a/smash/web/api_views/appointment.py +++ b/smash/web/api_views/appointment.py @@ -105,6 +105,11 @@ def serialize_appointment(appointment): if appointment.datetime_when is not None: until = appointment.datetime_until().strftime('%Y-%m-%d %H:%M') + if appointment.flying_team is None: + location = unicode(appointment.location) + else: + location = unicode(appointment.location) + " (" + unicode(appointment.flying_team) + ")" + result = { "subject": subject_string, "title": title, @@ -118,6 +123,7 @@ def serialize_appointment(appointment): "comment": appointment.comment, "color": appointment.color(), "id": appointment.id, + "location": location, "url": reverse('web.views.appointment_edit', kwargs={'id': str(appointment.id)}) } return result diff --git a/smash/web/static/js/appointment.js b/smash/web/static/js/appointment.js index 6cb810679a794340d952801965f5163ab064eb3b..a2e1b2222be56ac369170aefb062a161b2a6ea66 100644 --- a/smash/web/static/js/appointment.js +++ b/smash/web/static/js/appointment.js @@ -232,6 +232,7 @@ function get_calendar_events_function(source, allow_url_redirection) { id: entry.id, color: entry.color, nd_number: entry.nd_number, + location: entry.location, screening_number: entry.screening_number, phone_number: entry.phone_number, appointment_types: entry.appointment_types diff --git a/smash/web/templates/appointments/index.html b/smash/web/templates/appointments/index.html index 2915da109d4e7ba085f71f7adc38394f439f9a83..ef999fa5639509de7ace34c3216a8a94d43186c3 100644 --- a/smash/web/templates/appointments/index.html +++ b/smash/web/templates/appointments/index.html @@ -129,6 +129,9 @@ if (event.appointment_types) { content += '<li>Appointment types: ' + event.appointment_types + '</li>' } + if (event.location) { + content += '<li>Location: ' + event.location + '</li>' + } content += "</ul>"; $(element).popover({ title: event.title,