<!--
This template is used to generate a list of Prototypes, at the moment only used in the 'Achievements'-View.
It has permission-checks so certain interface-elements are only visible to admins.
-->
<!-- group them alphabetically -->
{% for g in prototypes|group_by_letter %}
<h4 class="group-by-letter">{{g.0|upper}}</h4>
{% for p in g.1 %}
<div class="content-list-item content-list-item-even }}">
	{% if user.get_profile().is_admin(module_name='achievements') %}
	<div class="content-list-tick">
		<input type="checkbox" name="mass-achievement-{{ p.id }}" value="{{ p.id }}" class="group-mass-unclassified" />
	</div>
	{% endif %}
	<span class="content-list-item-name">
		<div class="contact-picture-frame">
			{% if p.badge %}
				<a href="{% url achievements_prototype_detail p.id %}">
					<img class="contact-picture" src="{{ p.badge.url|htsafe }}" alt="" align="left" />
				</a>
		{% else %}
			<a href="{% url achievements_prototype_detail p.id %}">
				<img class="contact-picture" src="/static/achievements/simple-badge.png" alt="" align="left" />
			</a>
		{% endif %}
		</div>
		<a href="{% url achievements_prototype_detail p.id %}">{{ p.title }}</a><br />
		<a href="{% url achievements_prototype_detail p.id %}" class="small lighter"><i>{{ p.summary }}</i></a>
	</span>
	<span class="content-list-item-actions">
		{% if user.get_profile().is_admin(module_name='achievements') %}
			<a href="{% url achievements_prototype_edit p.id %}" class="inline-link edit-link">
				{% trans %}Edit{% endtrans %}
			</a>
		{% endif %}
	</span>
</div>
{% endfor %}
{% endfor %}