{% load mini_buildd_tags %}

<table class="status table">
	<tr>
		<th>Timestamp</th>
		<th>Type</th>
		<th>Package</th>
		<th>Version</th>
		<th>Distribution</th>
		<th>Extra</th>
		<th>User</th>
		<th>Info</th>
	</tr>
	{% for e in events %}
		<tr>
			<td class="event nowrap smaller">{{ e.timestamp|date:"r" }}</td>
			<td class="event nowrap {{ e.type.name }}"><b>{{ e.type.name }}</b></td>
			<td class="event nowrap">{% mbd_api "show" name=e.package value_package=e.package %}</td>
			<td class="event nowrap">
				{% if e.extra.log %}
					<a href="/mini_buildd/log/{{ e.extra.log }}/" title="Go to log page">{{ e.version }}</a>
				{% else %}
					{{ e.version }}
				{% endif %}
			</td>
			<td class="event nowrap">{{ e.distribution }}</td>
			<td class="event nowrap">
				{% if e.extra.archs %}
					{% for arch, status in e.extra.archs.items %}
						<a href="/log/{{ status.buildlog }}" title="Go to build log">{{ arch }} [<span class="sbuild {{ status.sbuild }}">B</span><span class="lintian {{ status.lintian }}">L</span>]</a>
					{% endfor %}
				{% endif %}
				{% if e.extra.arch %}
					<b>{{ e.extra.arch }}</b> build took <em>{{ e.extra.took }}</em> seconds. Uploaded to <code>{{ e.extra.uploaded_to }}</code>
				{% endif %}
			</td>
			<td class="event nowrap">{{ e.user }}</td>
			<td class="event nowrap">{{ e.info }}</td>
		</tr>
	{% endfor %}
</table>
