{% extends "admin/base_site.html" %}
{% load thumbnail %}

{% block title %}Add images to gallery{% endblock %}

{% block breadcrumbs %}
<div class="breadcrumbs">
    <a href="../../">Home</a> &rsaquo;
    <a href="../">Uploader</a> &rsaquo;
    <a href=".">Images</a> &rsaquo;
    Add images to gallery
</div>
{% endblock %}

{% block content %}
<form action="." method="post">

<div class="module">
    <h2>Add these images</h2>

    {% for image in queryset.all %}
        <div style="display: inline-block; border: 2px solid grey; margin: 3px;">
            <input type="checkbox" value="{{ image.id }}" name="_selected_action" checked="checked" />
            <img src="{% thumbnail image.image 60x60 %}" />
        </div>
    {% endfor %}
    </table>
</div>

<div class="module">
    <h2>To this album</h2>
    <table>
        {{ form }}
        <tr>
            <td>
                <input type="hidden" value="{{ request.POST.action }}" name="action" />
                <input type="hidden" value="{{ request.POST.index }}" name="index" />
                <input type="hidden" value="{{ request.POST.csrfmiddlewaretoken }}" name="csrfmiddlewaretoken" />
            </td>
            <td><input type="submit" value="Save" /></td>
        </tr>
    </table>
</div>

</form>
{% endblock %}
