{% extends "base.html" %}

{% load i18n %}

{% block title %}{% trans 'Select widgets' %} – {{ block.super }}{% endblock %}

{% block content %}
    <h1>{% trans 'Select widgets' %}
        <small class="pull-right">
            <a href="{% url 'dashboard' %}" class="btn btn-mini"><i class="icon-chevron-left"></i> {% trans "Back to overview" %}</a>
        </small>
    </h1>

    <form action="" method="post">{% csrf_token %}
        <ul class="unstyled">
            {% for widget_name, widget in widgets.items %}
                <li>
                    <label class="checkbox">
                        {{ widget.form.widget }} {{ widget }}
                    </label>
                </li>
            {% empty %}
                <li>{% trans 'No widgets available' %}</li>
            {% endfor %}
        </ul>
        <p>
            <button class="btn btn-primary" type="submit">
                {% trans 'Save' %}
            </button>
        </p>
    </form>
{% endblock %}
