<!--
Here the list of all Prototypes is rendered. Most of it actually happens in tags/prototypes_list.html
It has permission-checks so certain interface-elements are only visible to admins.
-->
{% extends "html/achievements/page.html" %}

{% block title %}{% trans %}Achievements{% endtrans %}{% endblock %}
{% block module_subtitle %}Prototypes{% endblock %}

{% block module_topmenu %}
<a href="{% url achievements_prototype_add %}" class="top-menu add-link">{% trans %}New Achievement{% endtrans %}</a>
{% endblock %}

{% block module_content %}
{% if protos %}
<form action="" method="post">
	{% csrf_token %}
	<ul class="mass-form">
		<input type="hidden" name="massform" value="massform"/>
		{% if user.get_profile().is_admin(module_name='achievements') %}
			<!-- 'select all' checkbox -->
			<input type="checkbox" name="mass-unclassified" value="unclassified" class="group-control"/>
		{% endif %}
		{{ massform.as_ul()|htsafe }}
		<li>
			<input type="submit" value="{% trans %}Save{% endtrans %}"/>
		</li>
		{{ achievements_prototypes_list(paginate(protos)) }}
		{{ pager(protos) }}
	</ul>
</form>
{% endif %}
{% endblock %}