{# djlint:off #} [ {% for x in usage_events %} { "title": "Usage of the {{ x.tool.name }}", "id": {{ x.id }}, {% if x.project and x.project.get_calendar_color %} "color": "{{ x.project.get_calendar_color }}", {% else %} "color": "{{ x.tool.get_calendar_usage_color }}", {% endif %} "start": "{{ x.start|date:"c" }}", {# Usage events that are less than the configured minimum display length are artificially lengthened for display purposes. #} "end": "{{ x.get_visual_end|date:"c" }}", "details_url": "{% url 'usage_details' x.id %}" }{% if not forloop.last %},{% elif area_access_events or reservations or missed_reservations %},{% endif %} {% endfor %} {% for x in area_access_events %} { "title": "{{ x.area }} access billed to project {{ x.project.get_display }} {% if x.staff_charge %}by {{ x.staff_charge.staff_member }}{% endif %}", "id": {{ x.id }}, {% if x.project and x.project.get_calendar_color %} "color": "{{ x.project.get_calendar_color }}", {% else %} "color": "{{ x.area.get_calendar_usage_color }}", {% endif %} "start": "{{ x.start|date:"c" }}", {# Area access events that are less than the configured minimum display length are artificially lengthened for display purposes. #} "end": "{{ x.get_visual_end|date:"c" }}", "details_url": "{% url 'area_access_details' x.id %}" }{% if not forloop.last %},{% elif reservations or missed_reservations %},{% endif %} {% endfor %} {% for x in reservations %} { "title": "Reservation for the {{ x.reservation_item.name }}{% if x.title %}, titled \"{{ x.title }}\"{% endif %}", "id": {{ x.id }}, {% if x.project and x.project.get_calendar_color %} "color": "{{ x.project.get_calendar_color }}", {% else %} "color": "{{ x.reservation_item.get_calendar_reservation_color }}", {% endif %} "start": "{{ x.start|date:"c" }}", "end": "{{ x.get_visual_end|date:"c" }}", "details_url": "{% url 'reservation_details' x.id %}" }{% if not forloop.last %},{% elif missed_reservations %},{% endif %} {% endfor %} {% for x in missed_reservations %} { "title": "Missed reservation for the {{ x.reservation_item.name }}", "id": {{ x.id }}, "color": "{{ x.reservation_item.get_calendar_missed_reservation_color }}", "start": "{{ x.start|date:"c" }}", "end": "{{ x.get_visual_end|date:"c" }}", "details_url": "{% url 'reservation_details' x.id %}" }{% if not forloop.last %},{% endif %} {% endfor %} ]