{% extends "admin/base_site.html" %}
{% load i18n adminmedia %}

{% block breadcrumbs %}
{% include "admin/filer/breadcrumbs.html" %}
{% endblock %}

{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% admin_media_prefix %}css/forms.css" />{% endblock %}

{% block content %}
{% if perms_lacking %}
    <p>{% blocktrans %}Your account doesn't have permissions to resize all of the selected images.{% endblocktrans %}</p>
{% else %}
{% if not to_resize %}
    <p>{% blocktrans %}There are no images available to resize.{% endblocktrans %}</p>
{% else %}
    <p>{% blocktrans %}The following images will be resized:{% endblocktrans %}</p>
    <ul>{{ to_resize|unordered_list }}</ul>
    <form action="" method="post">{% csrf_token %}
    <div>
    {% for f in files_queryset %}
    <input type="hidden" name="{{ action_checkbox_name }}" value="file-{{ f.pk }}" />
    {% endfor %}
    {% for f in folders_queryset %}
    <input type="hidden" name="{{ action_checkbox_name }}" value="folder-{{ f.pk }}" />
    {% endfor %}
    <input type="hidden" name="action" value="resize_images" />
    <input type="hidden" name="post" value="yes" />
    {% if cmsplugin_enabled %}
    <p>{% blocktrans %}Choose an existing thumbnail option or enter resize parameters:{% endblocktrans %}</p>
    {% else %}
    <p>{% blocktrans %}Choose resize parameters:{% endblocktrans %}</p>
	{% endif %}
    {{ resize_form.as_p_with_help }}
    <p>{% blocktrans %}Warning: Images will be resized in-place and originals will be lost. Maybe first make a copy of them to retain the originals.{% endblocktrans %}</p>
    <p><input type="submit" value="{% trans "Resize" %}" /></p>
    </div>
    </form>
{% endif %}
{% endif %}
{% endblock %}
