{% extends "base.html" %}

{% block title %}
	&raquo; DC Contracts &raquo; {{snag.channel.era.dc_contract.name}} &raquo;
 	Channel Snags &raquo; {{snag.id}}
{% endblock %}

{% block nav %}
	<a href="/e/dc_contracts">DC Contracts</a> &raquo; 
	<a
			href="/e/dc_contracts/{{snag.channel.era.dc_contract.id}}"
			>{{snag.channel.era.dc_contract.name}}</a> &raquo; 
	<a
			href="/e/channel_snags?dc_contract_id={{snag.channel.era.dc_contract.id}}&amp;days_hidden=5"
	 >Channel Snags</a> &gt;
	<a href="/e/channel_snags/{{snag.id}}">{{snag.id}}</a> &gt;
	Edit
{% endblock %}

{% block content %}

	<table>
		<caption>Channel Snag</caption>	
		<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 style="border: none;">
							<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>Channel</th>
				<td>
					{% if snag.channel.imp_related %}
						Import
					{% else %}
						Export
					{% endif %}
					{{snag.channel.channel_type}} channel of
					<a
							href="/e/supplies/{{snag.channel.era.supply.id}}"
							>supply {{snag.channel.era.supply.name}}</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 %}
