{% extends "mini_buildd/base.html" %}
{% load base %}

{% block page_title %}Repository {{ object.identity }}{% endblock %}
{% block page_sub_title %}Overview{% endblock %}
{% block mbd_page_footer %} &raquo; {{ object.identity }}{% endblock %}

{% block content %}

	<div id="mbd_repository">
		(<a title="Print uploaders" href="/mini_buildd/api?command=printuploaders&amp;repository={{ object.identity }}&amp;output=referer">Print uploaders</a>)

		{% for d in object.distributions.all %}
			<div class="inner-box">
				<h1 class="inner-box-caption">
					<a href="javascript:mbdToggleElement('mbd_dist_{{ d.base_source.codename }}','mbd_dist_{{ d.base_source.codename }}_header','(hide)','(show)')"
						 style="color: white">
						{{ d }}
						<span id="mbd_dist_{{ d.base_source.codename }}_header" style="float: right">(show)</span>
					</a>
				</h1>

				<div id="mbd_dist_{{ d.base_source.codename }}" style="display: none">
					{% for s in object.layout.suiteoption_set.all %}
						<h2>
							<a href="javascript:mbdToggleElement('mbd_dist_{{ d.base_source.codename }}_{{ s.suite.name }}','mbd_dist_{{ d.base_source.codename }}_{{ s.suite.name }}_header','(hide)','(show)')">
								<span style="color: black">{{ d.base_source.codename }}-{{ object.identity }}-{{ s.suite.name }}</span>:
								<span class="emphasize-headline">{% mbd_repository_desc object d s %}</span>
								{% if s.uploadable %}
									<tt style="font-size: 0.8em; color: purple">(U='{% mbd_repository_mandatory_version object d s %}')</tt>
								{% endif %}
								{% if s.experimental %}
									<tt style="font-size: 0.8em; color: red">(E)</tt>
								{% endif %}
								<span id="mbd_dist_{{ d.base_source.codename }}_{{ s.suite.name }}_header" style="float: right">(show)</span>
								{% if s.migrates_to %}
									<tt style="font-size: 0.8em; color: green"> =&gt; {{ s.migrates_to.suite.name }}</tt>
								{% endif %}
							</a>
						</h2>
						<ul id="mbd_dist_{{ d.base_source.codename }}_{{ s.suite.name }}" style="display: none">
							<li>APT line: <pre class="pre-block">{% mbd_distribution_apt_line d object s %}</pre></li>
							{% if s.uploadable %}
								<li>Building with APT sources.list:<div class="pre-block"><pre>{% mbd_distribution_apt_sources_list d object s %}</pre></div></li>
								<li>Building with APT preferences:<div class="pre-block"><pre>{% mbd_distribution_apt_preferences d object s %}</pre></div></li>
							{% endif %}
						</ul>
					{% endfor %}
				</div>
			</div>
		{% endfor %}

	</div>

{% endblock %}
