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

{% block extrahead %}{{ block.super }}
{{ media }}
{% endblock %}

{% block breadcrumbs %}
<div class="breadcrumbs">
    <a href="../../../../">{% trans 'Home' %}</a> &rsaquo;
    <a href="../../../">{{ app_label|capfirst }}</a> &rsaquo;
    <a href="../../">{{ opts.verbose_name_plural|capfirst }}</a> &rsaquo;
    <a href="../">{{ object|truncatewords:"18" }}</a> &rsaquo;
    {% trans 'Send' %}
</div>
{% endblock %}

{% block content %}
<div id="content-main">

<form action="" method="post">{% csrf_token %}
<div>
	<div class="module">
		<div class="form-row">
			{% if object.sent %}
			<div class="errornote">{% trans "This campaign has already been sent at least once. Are you sure that you want to send it again?" %}</div>
			{% endif %}
			<p>{% blocktrans with opts.verbose_name|capfirst as model_name and object|truncatewords:"18" as object_name %}
			Clicking 'Send' below will send the <a href="../">{{ object_name }}</a> {{ model_name }} to its recipients.
			{% endblocktrans %}</p>
			<h3>{% trans "Subscriber lists" %}</h3>
            <ul>
            {% for subscriber_list in object.recipients.all %}
				{% with subscriber_list.object_count as subscribercount %}
                <li><strong>{{ subscriber_list.name }}</strong> – {% blocktrans with subscribercount as subscriber_count and subscribercount|pluralize as pluralized %}{{ subscriber_count }} recipient{{ pluralized }}{% endblocktrans %}</li>
				{% endwith %}
            {% endfor %}
            </ul>
		</div>
	</div>
	<input type="hidden" value="1" name="send"/>
	<div class="submit-row" {% if is_popup %}style="overflow: auto;"{% endif %}>
		<input type="submit" value="{% trans 'Send' %}" class="default" name="_submit"/>
		<p></p>
	</div>

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