{% extends "base.html" %}

{% block inside_head %}
	<style>
		main section {
			padding: 15px;
		 	background-color: #f5f5f5;
		 	border: 1px solid #e3e3e3;
		 	border-radius: 4px;
		}
		main div {
			display: grid;
		 	grid-template-columns: 1fr 1fr;
		 	grid-template-rows: auto auto auto;
		 	grid-gap: 30px;
		}

		section.search h4 {
			margin-top: 0;
		}

		section.search > form {
			padding-left: 0;
			margin-right: 0;
		}
		section.search > form > fieldset {
			display: block;
			border: none;
			padding: 0;
			margin: 0;
		}
		section.search > form > fieldset > input[type = text] {
			width: 100%;
			margin-left: 0;
			margin-right: 0;
			padding-left: 0;
			padding-right: 0;
		}

		main li {
			color: var(--main-color);
		}

		main table.stretch {
			margin-top: 8px;
			width: 100%;
		}

		main table td.bold {
			font-weight: bold;
		}
		main table caption {
			text-align: left;
		}

		main h4.center {
			width: 100%;
			text-align: center;
			margin-top: 0;
			margin-bottom: 8px;
		}

		main div.link-grid {
			display: grid;
			grid-template-columns: auto auto;
			grid-template-rows: auto auto;
			align-items: center;
		}

		main div.link-grid ul {
			margin: 0;
			padding: 0;
		}

	</style>
{% endblock %}

{% block content %}
	<div>
		<section class="search">
			<h4>Site Search</h4>
			<form action="/sites">
				<fieldset>
					<input type="text" name="pattern">
					<input type="submit" value="Search">
				</fieldset>
			</form>
		</section>

		<section class="search">
			<h4>Supply Search</h4>

			<form action="/supplies">
				<fieldset>
					<input type="text" name="search_pattern">
					<input type="submit" value="Search">
				</fieldset>
			</form>
		</section>

		<section>
			<table class="stretch">
				<caption>
					<a href="/downloads">Downloads</a> |
					<a href="/report_runs">Runs</a>
				</caption>
				<thead>
					<tr>
						<th>Core Reports</th>
						<th>Supplies</th>
						<th>Sites</th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td class="bold">Snapshot</td>
						<td><a href="/e/csv_supplies_snapshot" title="Download">Download</a></td>
						<td></td>
					</tr>
					<tr>
						<td class="bold">HH Data</td>
						<td><a href="/e/csv_supplies_hh_data">Download</a></td>
						<td><a href="/e/csv_sites_hh_data">Download</a></td>
					</tr>
					<tr>
						<td class="bold">TRIAD</td>
						<td><a href="/e/csv_supplies_triad">Download</a></td>
						<td><a href="/e/csv_sites_triad">Displaced</a></td>
					</tr>
					<tr>
						<td class="bold">Register Reads</td>
						<td><a href="/e/csv_register_reads">Download</a></td>
						<td></td>
					</tr>
					<tr>
						<td class="bold">DNO / Supplier Contacts</td>
						<td><a href="/reports/supply_contacts">Download</a></td>
						<td>
					</tr>
					<tr>
						<td class="bold"><a href="/e/ods_monthly_duration">Monthly Duration</a></td>
						<td></td>
						<td></td>
					</tr>
					<tr>
						<td class="bold"><a href="/e/duration_report">Duration</a></td>
						<td></td>
						<td></td>
					</tr>
				</tbody>
			</table>
		</section>


		<section>
			<table class="stretch">
				<tbody>
					<tr>
						<td rowspan="4">Contracts</td>
						<td><a href="/e/dc_contracts">DC</a></td>
					</tr>
					<tr>
						<td><a href="/e/mop_contracts">MOP</a></td>
					</tr>
					<tr>
						<td><a href="/e/supplier_contracts">Supplier</a></td>
					</tr>
					<tr>
						<td><a href="/non_core_contracts">Non-Core</a></td>
					</tr>
				</tbody>
			</table>
		</section>

		<section>
			<h4 class="center">Industry Information Links</h4>
			
			<div class="link-grid">
				<ul>
					<li><a href="/e/dnos">DNOs</a></li>
					<li><a href="/industry_contracts">Industry Rates</a></li>
					<li><a href="/e/participants">Market Participants</a></li>
					<li><a href="/e/parties">Parties</a></li>
					<li><a href="/e/generator_types">Generator Types</a></li>
					<li><a href="/e/meter_payment_types">Meter Payment Types</a></li>
					<li><a href="/e/sscs">SSCs</a></li>
					<li><a href="/e/cops">CoPs</a></li>
					<li><a href="/e/comms">Comms</a></li>
					<li><a href="/e/read_types">Read Types</a></li>
				</ul>

				<ul>
					<li><a href="/e/market_roles">Market Roles</a></li>
					<li><a href="/e/pcs">Profile Classes</a></li>
					<li><a href="/e/tprs">TPRs</a></li>
					<li><a href="/e/gsp_groups">GSP Groups</a></li>
					<li><a href="/bill_types">Bill Types</a></li>
					<li><a href="/e/sources">Sources</a></li>
					<li><a href="/e/meter_types">Meter Types</a></li>
					<li><a href="/e/mtcs">Meter Timeswitch Classes</a></li>
				</ul>
			</div>
		</section>

		<section>
			<h4 class="center">For Editor Links</h4>
			
			<div class="link-grid">
				<ul>
					<li><a href="/local_reports">Edit Local Reports</a></li>
					<li><a href="/user_roles">Users Roles</a></li>
					<li><a href="/reports/ecoes_comparison" >Comparison against ECOES</a></li>
					<li><a href="/e/asset_comparison" >Comparison against asset data</a></li>
					<li><a href="/api/v1" >API</a></li>
					<li><a href="/rate_server">Rate Server Imports</a></li>
				</ul>
			
				<ul>
					<li><a href="/users">Users</a></li>
					<li><a href="/system">System</a></li>
					<li><a href="/edi_viewer">EDI Viewer</a></li>
					<li><a href="/e/scenarios">Scenarios</a></li>
					<li><a href="/reports/batches">Batches</a></li>
					<li><a href="/tester">Tester</a></li>
				</ul>
			</div>
		</section>
	</div>
{% endblock %}
