{% extends "base.html" %}

{% block title %}
	&raquo; MTCs
{% endblock %}

{% block nav %}
	MTCs
{% endblock %}

{% block content %}
	<!-- Layer Section -->
	<div class="layer-section">
		<!-- Section Header -->
		<div class="section-header">
			<h2>Meter Timeswitch Classes</h2>	
		</div>
		<!-- End Section Header -->
		<!-- Section Content -->
		<div class="section-content">
			<div class="section-data">
				<table class="DataTable widthAuto">
					<thead>
						<tr>
							<th>Code</th>
							<th>Dno</th>
							<th>Description</th>
							<th>Meter Type</th>
							<th>TPR Count</th>
							<th>Valid From</th>
							<th>Valid To</th>
						</tr>
					</thead>
					<tbody>
						{% for mtc in mtcs %}
							<tr>
								<td>
									<a href="/mtcs/{{mtc.id}}">{{mtc.code}}</a>
								</td>
								<td>
									{% if mtc.dno %}
										<a href="/dnos/{{mtc.dno.id}}">
											{{mtc.dno.dno_code}}
										</a>
									{% else %}
										All
									{% endif %}
								</td>
								<td>{{mtc.description}}</td>
								<td>
									<a href="/meter_types/{{mtc.meter_type.id}}">
										{{mtc.meter_type.code}}
									</a>
								</td>
								<td>{{mtc.tpr_count}}</td>
								<td>{{mtc.valid_from|hh_format}}</td>
								<td>{{mtc.valid_to|hh_format}}</td>
							</tr>
						{% endfor %}
					</tbody>
				</table>
			</div>
		</div>
		<!-- End Section Content -->
	</div>
	<!-- End Layer Section -->
{% endblock %}
