{% load mini_buildd_tags %}

<table class="status table">
	<tr>
		<th>Started</th>
		<th>Package</th>
		<th>Distribution</th>
		<th>Version</th>
		<th>Architectures</th>
		<th colspan="2">Status</th>
	</tr>
	{% for p in packages %}
		<tr>
			<td class="packager nowrap smaller">{{ p.started|date:"r" }}</td>
			<td class="packager nowrap">{% mbd_api "show" name=p.changes.source value_package=p.changes.source %}</td>
			<td class="packager nowrap">{{ p.changes.distribution }}</td>
			<td class="packager nowrap">
				{% if p.log %}
					<a href="{{ p.log }}/" title="Go to log page">{{ p.changes.version }}</a>
				{% else %}
					{{ p.changes.version }}
				{% endif %}
			</td>
			<td class="packager nowrap">
				{% for arch, breq in p.requests.items %}
					<a class="packager hover-underline"
						 href="{{ breq.live_buildlog_url }}"
						 title="{{ arch }} build: Live buildlog on builder host">
						 {{ arch }}
					</a>
					{% if breq.remote_http_url %}
						<a class="packager hover-underline" href="{{ breq.remote_http_url }}" title="Jump to builder host">➚</a>
					{% endif %}
				{% endfor %}
			</td>
			<td class="packager nowrap {{ p.status }}">{{ p.status }}</td>
			<td class="packager DESCRIPTION smaller">{{ p.status_desc }}</td>
		</tr>
	{% endfor %}
</table>
