{% extends "base.html" %}

{% block bread_crumbs_1 %}
	&raquo; <a href="{% url pyppi-package package=package.name %}">{{ package }}</a>
	&raquo; Manage Releases
{% endblock %}

{% block content %}
	<h1>Manage {{ package.name }} Releases</h1>
	<form action="" method="post">
		{{ formset.management_form }}
		<table>
			<thead>
				<tr>
					<th>Remove?</th>
					<th>Version</th>
					<th>Hide?</th>
					<th colspan="3">Links</th>
				</tr>
			</thead>
			<tbody>
			{% for form in formset.forms %}
				{% for field in form %}{% if field.is_hidden %}{{ field }}{% endif %}{% endfor %}
				{% with form.instance as release %}
				<tr>
					<td>{{ form.DELETE }}</td>
					<td>{{ release.version }}</td>
					<td>{{ form.hidden }}</td>
					<td><a href="{% url pyppi-release package=release.package.pk version=release.version %}">Show</a></td>
					<td><a href="{% url pyppi-release-manage-metadata package=release.package.pk version=release.version %}">Edit</a></td>
					<td><a href="{% url pyppi-release-manage-files package=release.package.pk version=release.version %}">Files</a></td>
				</tr>
				{% endwith %}
			{% endfor %}
			</tbody>
		</table>
		<div><input type="submit" value="Save" /></div>
	</form>
{% endblock content %}
