{% extends "base.html" %}

{% block title %}
	&raquo; MOP Contracts &raquo; {{rate_script.contract.name}} &raquo; 
 	Rate Script {{rate_script.start_date|hh_format}}
{% endblock %}

{% block nav %}
	<a href="/e/mop_contracts">MOP Contracts</a> &raquo; 
	<a href="/e/mop_contracts/{{rate_script.contract.id}}"
		>{{rate_script.contract.name}}</a> &raquo; 
	{{rate_script.start_date|hh_format}}
	[<a href="/e/mop_rate_scripts/{{rate_script.id}}/edit">edit</a>]
{% endblock %}

{% block content %}
	<table>
		<tr>
			<th>Start Date</th>
			<td>{{rate_script.start_date|hh_format}}</td>
		</tr>
		<tr>
			<th>Finish Date</th>
			<td>{{rate_script.finish_date|hh_format}}</td>
		</tr>
		<tr>
			<td>
				{% if previous_rate_script %}
					<a
						href="/e/mop_rate_scripts/{{previous_rate_script.id}}"
						>Previous Rate Script</a>
				{% else %}
					No Previous Rate Script
				{% endif %}
			</td>
			<td>
				{% if next_rate_script %}
					<a href="/e/mop_rate_scripts/{{next_rate_script.id}}">Next Rate Script</a>
				{% else %}
					No Next Rate Script
				{% endif %}
			</td>
		</tr>
	</table>

	<h2>Script</h2>

	<pre>{{rate_script.script}}</pre>

{% endblock %}
