<div class="alert {% if personal_schedule %}alert-success{% else %}alert-info{% endif %}" role="alert">
	<span style="cursor:pointer" class="pull-right glyphicon glyphicon-chevron-down" data-toggle="collapse" data-target="#extended_reservation_information_{{ reservation.id }}"></span>
	<span style="cursor:pointer" data-toggle="collapse" data-target="#extended_reservation_information_{{ reservation.id }}"><strong>{% if personal_schedule %}{{ reservation.title|default:reservation.reservation_item }}{% else %}{{ reservation.title|default:reservation.user }}{% endif %}</strong></span><br>
	Starting {{ reservation.start|time }}<br>
	Ending {{ reservation.end|time }}<br>
	<div id="extended_reservation_information_{{ reservation.id }}" class="collapse">
        {% for question_name, data in reservation.question_data_json.items %}
            {{ question_name }}: {{ data.user_input }}<br>
        {% endfor %}
		<div style="height:10px">{# Vertical spacer #}</div>
		{% if reservation.project %}
			For project {{ reservation.project }}<br>
		{% endif %}
		Created by {{ reservation.creator }} {% if reservation.user != reservation.creator %} on behalf of {{ reservation.user }}{% endif %} on {{ reservation.creation_time }}<br>
		{% if reservation.self_configuration %}
			<strong>You have elected to configure this tool yourself.</strong><br>
		{% else %}
			{% if reservation.short_notice %}
				<strong>This reservation was created on short notice. Tool configuration is not guaranteed upon start time.</strong><br>
			{% endif %}
		{% endif %}
		{% if reservation.additional_information %}
			Additional information:<br>
			{{ reservation.additional_information|linebreaksbr }}
		{% endif %}
		{# Allow the user to cancel the reservation if they have that priviledge. #}
		{% if not reservation.missed and not reservation.cancelled %}
			{% if reservation.user.id == user.id and reservation.has_not_ended or user.is_staff %}
				<div style="height:10px">{# Vertical spacer #}</div>
				<form method="post" action="{% url 'cancel_reservation' reservation.id %}">
					{% csrf_token %}
					{% if user != reservation.user %}
						{# Staff must provide a reason for cancelling someone else's reservation. #}
						<div class="form-group">
							<input type="text" class="form-control" name="reason" maxlength="3000" placeholder="Cancellation reason (required)" required>
						</div>
					{% endif %}
					<button type="submit" class="btn btn-danger">Cancel this reservation</button>
				</form>
			{% endif %}
		{% endif %}
	</div>
</div>