{% extends "base.html" %}
{% load i18n %}

{% block content %}
<div class="ui secondary pointing fluid menu">
  <h1 class="ui header">{% trans "Delete avatars" %}</h1>
</div>
<div class="ui padded basic segment">
  <div class="ui medium header">{% trans "Please select the avatars that you would like to delete." %}</div>

  {% if not avatars %}

  {% url 'avatar_change' as avatar_change_url %}
  <p>
    {% blocktrans trimmed %}
      You have no avatars to delete. Please <a href="{{ avatar_change_url }}">upload one</a> now.
    {% endblocktrans %}
  </p>

  {% else %}

  <form method="POST" action="{% url 'avatar_delete' %}">
    <div class="list-avatars">
      <ul>
        {{ delete_avatar_form.as_ul }}
      </ul>
    </div>
    <p>{% csrf_token %}
      <a class="ui labeled icon button" href="{% url 'avatar_change' %}">
        <i class="chevron left icon"></i>
        {% trans "Back" %}
      </a>
      <button type="submit" class="ui icon red button">
        <i class="remove icon"></i>
        {% trans "Delete selected avatars" %}
      </button>
    </p>
  </form>

  {% endif %}
</div>
{% endblock %}
