{% 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="/dc_contracts">DC Contracts</a> &raquo; 
	<a
			href="/dc_contracts/{{snag.channel.era.dc_contract.id}}"
			>{{snag.channel.era.dc_contract.name}}</a> &raquo; 
	<a
			href="/channel_snags?dc_contract_id={{snag.channel.era.dc_contract.id}}&amp;days_hidden=5"
	 >Channel Snags</a> &gt;
	<a href="/channel_snags/{{snag.id}}">{{snag.id}}</a> &gt;
	Edit
{% endblock %}

{% block content %}
	<!-- Layer Section -->
	<div class="layer-section">
		<!-- Section Header -->
		<div class="section-header">
			<h2>Channel Snag</h2>	
		</div>
		<!-- End Section Header -->
		<!-- Section Content -->
		<div class="section-content">
			<div class="section-data">
				<table class="DataTable widthAuto">
					<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="/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>
			</div>
		</div>
		<!-- End Section Content -->
	</div>
	<!-- End Layer Section -->


		
{% endblock %}
