{% extends "admin/base_site.html" %}
{% load i18n %}
{% block breadcrumbs %}
<div class="breadcrumbs">
     <a href="../../../../">{% trans "Home" %}</a> &rsaquo;
     <a href="../../../">{{ app_label|capfirst|escape }}</a> &rsaquo;
     <a href="../../">{{ opts.verbose_name_plural|capfirst }}</a> &rsaquo;
     <a href="../">{{ object|truncatewords:"18" }}</a> &rsaquo;
     {% trans "statistics"|capfirst %}
</div>
{% endblock %}

{% block content %}
    <h2>{% trans "Send Newsletter" %}</h2>
    <table border="0">
        <tr><th></th><th>{% trans "email count"|capfirst %}</th><td>{{object.count_mails_total}}</td></tr>
        <tr><th></th><th>{% trans "from name"|capfirst %}</th><td>{{object.newsletter.sender.name}}</td></tr>
        <tr><th></th><th>{% trans "from email"|capfirst %}</th><td>{{object.newsletter.sender.email}}</td></tr>
        <tr><th></th><th>{% trans "subject"|capfirst %}</th><td>{{object.newsletter.subject}}</td></tr>
        <tr><th></th><th>{% trans "SPF result"|capfirst %}</th><td>{{object.newsletter.sender.check_spf}}</td></tr>
    </table>
    <iframe width="800" height="1024"
        src="{% url admin:pennyblack.views.preview object.newsletter.id %}?job={{object.id}}">
    </iframe>
        <form action="{% url admin:pennyblack_job_send object.id %}" method="post" id="pennyblack_newsletter_form">{% csrf_token %}
        <div class="submit-row">
            <input type="submit" value="Save and send" class="default" name="_send" />
        </div>
    </form>    
{% endblock %}