{% extends "mini_buildd/includes/api/base.html" %}
{% block results %}
	{% for repository, results in view.mbd_call.result.items %}
		<details open>
			<summary>{{ repository }}</summary>
			{% mbd_token as table_id %}
			<table id="{{ table_id }}">
				{% mbd_datatable table_id order='[0, "desc"]' %}
				<thead>
					<tr>
						<th>Package</th>
						<th>Type</th>
						<th>Architecture</th>
						<th>Distribution</th>
						<th>Component</th>
						<th>Version</th>
						<th>Source</th>
					</tr>
				</thead>
				<tbody>
					{% for package in results %}
						<tr>
							<td>{{ package.package }}</td>
							<td>{{ package.type }}</td>
							<td>{{ package.architecture }}</td>
							<td>{{ package.distribution }}</td>
							<td>{{ package.component }}</td>
							<td>{{ package.version }}</td>
							<td>{{ package.source|urlencode }}{% mbd_api "ls" value_source=package.source %}</td>
						</tr>
					{% endfor %}
				</tbody>
			</table>
		</details>
	{% endfor %}
{% endblock %}
