{% extends "base.html" %}

{% block title %}
	&raquo; Site Snags &raquo; {{snag.id}} &raquo; Edit
{% endblock %}

{% block nav %}
	<a href="/e/site_snags">Site Snags</a> &raquo; 
	<a href="/e/site_snags/{{snag.id}}">{{snag.id}}</a> &raquo; Edit
{% endblock %}

{% block content %}
	<table class="DataTable widthAuto noMarginBottom">
		<tbody>
			<tr>
				<th>Date Created</th>
				<td>{{snag.date_created|hh_format}}</td>
			</tr>
			<tr>
				<th>Ignored?</th>
				<td>
					{% if snag.is_ignored %}
						Ignored
					{% else %}
						Not ignored
					{% endif %}
					<form method="post">
						<fieldset>
						<input type="hidden" name="site_snag_id" value="{{snag.id}}">
						<input type="hidden" name="ignore" value="
							{%- if snag.is_ignored -%}
								false
							{%- else -%}
								true
							{%- endif -%}
						">
						<input type="submit" value="
							{%- if snag.is_ignored -%}
								Un-ignore
							{%- else -%}
								Ignore
							{%- endif -%}
						">
						</fieldset>
					</form>
				</td>
			</tr>
			<tr>
				<th>Description</th>
				<td>{{snag.description}}</td>
			</tr>
			<tr>
				<th>Site</th>
				<td>
					<a href="/sites/{{snag.site.id}}">{{snag.site.code}}</a>
				</td>
			</tr>
			<tr>
				<th>Start Date</th>
				<td>{{snag.start_date|hh_format}}</td>
			</tr>
			<tr>
				<th>Finish Date</th>
				<td>{{snag.finish_date|hh_format}}</td>
			</tr>
		</tbody>
	</table>
{% endblock %}
