{% extends 'base.html' %}
{% block title %}Safety{% endblock %}
{% block content %}
	<h1>Resolved safety issues</h1>

	<p>This page lists previously reported and resolved safety issues.</p>

	<p>You can also <a href="{% url 'safety' %}">view current safety issues</a>.</p>

	{% for ticket in tickets %}
		<div class="panel panel-default">
			<div class="panel-body">
				<div class="form-group">
					<h4>Concern</h4>
					{{ ticket.concern|linebreaksbr }}
				</div>
				<div class="form-group">
					{% if not ticket.visible %}<span class="glyphicon glyphicon-eye-close"></span> This issue is hidden from users<br>{% endif %}
					Location: {{ ticket.location }}<br>
					{% if ticket.reporter %}
						Reported on {{ ticket.creation_time }}{% if user.is_staff %} by {{ ticket.reporter }}{% endif %}<br>
					{% else %}
						Reported anonymously on {{ ticket.creation_time }}<br>
					{% endif %}
					Resolved on {{ ticket.resolution_time }} by {{ ticket.resolver }}
				</div>
				{% if ticket.progress %}
					<div class="form-group">
						<h4>Progress</h4>
						{{ ticket.progress|linebreaksbr }}
					</div>
				{% endif %}
				<div class="form-group">
					{% if ticket.resolution %}
						<h4>Resolution</h4>
						<p>{{ ticket.resolution|linebreaksbr }}</p>
					{% else %}
						<h4>This problem was resolved, but no resolution information was provided.</h4>
					{% endif %}
				</div>
			</div>
		</div>
	{% empty %}
		<strong>There are no past issues.</strong>
	{% endfor %}
{% endblock %}