[
	{% for x in events %}
	{
		{% if personal_schedule and x.tool %}
			"title": "{{ x.title|default:x.reservation_item.name|escapejs }}",
			"color": "#33ad33",
		{% elif personal_schedule and x.area %}
			"title": "{{ x.title|default:x.reservation_item.name|escapejs }}",
			"color": "#84CD84",
		{% elif all_tools or all_areastools and x.tool %}
			"title": "{{ x.reservation_item.name|escapejs }}\n{{ x.title|escapejs }}",
			"color": "{{ x.reservation_item.tool_calendar_color|default:'#33ad33'|escapejs }}",
		{% elif all_areas or all_areastools and x.area %}
			"title": "{{ x.reservation_item.name|escapejs }}\n{{ x.title|escapejs }}",
			"color": "{{ x.reservation_item.area_calendar_color|default:'#84CD84'|escapejs }}",
		{% else %}
			"title": "{{ x.title|default:x.user|escapejs }}",
			"color": {% if x.user.id == user.id %}"#3a87ad"{% else %}"#88B7CD"{% endif %},
		{% endif %}
		{% if x.creator.id == x.user.id %}
			"tooltip": "{{ x.reservation_item.name }} reservation for {{ x.user }}",
		{% else %}
			"tooltip": "{{ x.reservation_item.name }} reservation for {{ x.user }}, created by {{ x.creator }}",
		{% endif %}
		"id": "Reservation {{ x.id }}",
		{# The reservation creator or staff may edit the event: #}
		{% if user.id == x.user.id or user.is_staff %}"editable": true,{% 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 outages %},{% endif %}
	{% endfor %}
	{% for x in outages %}
	{
		"title": "{{ x.title|escapejs }}",
		"id": "Outage {{ x.id }}",
		{% if user.is_staff %}"editable": true,{% endif %}
		"color": "#ff0000",
		"start": "{{ x.start|date:"c" }}",
		"end": "{{ x.end|date:"c" }}",
		"details_url": "{% url 'outage_details' x.id %}"
	}{% if not forloop.last %},{% endif %}
	{% endfor %}
]