{% extends "base.html" %}

{% block title %}
	&raquo; MDD Imports &raquo; {{process_id}}
{% endblock %}

{% block nav %}
	<a href="/mdd_imports">MDD Imports</a> &raquo; {{process_id}}
{% endblock %}

{% block content %}
	<div class="layer-section">
		<div class="section-header">
			<h2>MDD Import</h2>
		</div>
		<div class="section-content">
			<div class="section-data">

				{% if is_alive is defined %}
					{% if is_alive %}
							<p>Still running. Refresh the page to see latest progress.</p>
					{% else %}
							{% if error_message %}
									<p>
										The import has failed and so the whole import has been rolled back.
										The reason for the failure is:</p>
									<pre>{{error_message}}</pre>
							{% else %}
									<p>The file has been imported successfully.</p>
							{% endif %}
					{% endif %}

					<ul>
						{% for line in log %}
							<li>{{line}}</li>
						{% endfor %}
					</ul>
				{% endif %}
			</div>
		</div>
	</div>
{% endblock %}
