{% extends "base.html" %}

{% block title %}
	&raquo; DNOs &raquo; {{dno.dno_code}}
{% endblock %}

{% block nav %}
	<a href="/e/dnos">DNOs</a> &raquo; {{dno.dno_code}}
{% endblock %}

{% block content %}
	<table>
		<tbody>
			<tr>
				<td>Code</td>
				<td>{{dno.dno_code}}</td>
			</tr>
			<tr>
				<td>Name</td>
				<td>{{dno.name}}</td>
			</tr>
			<tr>
				<td>Market Participant</td>
				<td>
					<a
						href="/e/participants/{{dno.participant.id}}"
						title="{{dno.participant.name}}">{{dno.participant.code}}</a>
				</td>
			</tr>
			<tr>
				<td>Valid From</td>
				<td>{{dno.valid_from|hh_format }}</td>
			</tr>
			<tr>
				<td>Valid To</td>
				<td>{{dno.valid_to|hh_format }}</td>
			</tr>
			<tr>
				<td>Custom Reports</td>
				<td>
					<ul>
						{% for report in custom_reports %}
							<li>
								<a
										href="/local_reports/{{report.id}}/output/?dno_id={{contract.id}}"
										>{{report.name}}</a>
							</li>
						{% endfor %}
					</ul>
				</td>
			</tr>
			<tr>
				<td>Line Loss Factor Classes</td>
				<td>
					<a href="/e/llfcs?dno_id={{dno.id}}">LLFCs</a>
				</td>
			</tr>
			<tr>
				<td>Meter Timeswitch Classes</td>
				<td>
					<a href="/e/mtc_participants?participant_id={{dno.participant.id}}">MTCs</a>
				</td>
			</tr>
			<tr>
				<td>Valid combinations of MTC and SSC</td>
				<td>
					<a href="/e/mtc_sscs?participant_id={{dno.participant.id}}">MTC SSCs </a>
				</td>
			</tr>
			<tr>
				<td>Valid combinations of MTC and LLFC</td>
				<td>
					<a href="/e/mtc_llfcs?participant_id={{dno.participant.id}}">MTC LLFCs</a>
				</td>
			</tr>
			<tr>
				<td>Valid combinations of MTC, LLFC and SSC</td>
				<td>
					<a href="/e/mtc_llfc_sscs?participant_id={{dno.participant.id}}"
						>MTC LLFC SSCs</a>
				</td>
			</tr>
			<tr>
				<td>Valid combinations of PC, LLFC, SSC and MTC for NHH supplies</td>
				<td>
					<a href="/e/mtc_llfc_ssc_pcs?dno_id={{dno.id}}">MTC LLFC SSC PCs</a>
				</td>
			</tr>
		</tbody>
	</table>
	<br>
	<table>
		<caption>
			Rate Scripts [<a href="/e/dnos/{{dno.id}}/add_rate_script">add</a>]
		</caption>
		<thead>
			<tr>
				<th></th>
				<th>From</th>
				<th>To</th>
			</tr>
		</thead>
		<tbody>
			{% for rs in rate_scripts %}
				<tr>
					<td><a href="/e/dno_rate_scripts/{{rs.id}}">View</a></td>
					<td>{{rs.start_date|hh_format}}</td>
					<td>{{rs.finish_date|hh_format}}</td>
				</tr>
			{% endfor %}
		</tbody>
	</table>
{% endblock %}
