{% extends "admin/layout.html" %} {% block body %}

{% trans %}Broadcast{% endtrans %}

{% trans %}Send emails and push notifications to targeted users{% endtrans %}

{% if summary %}

{% trans %}Broadcast sent successfully{% endtrans %}

{{ summary.total }}
{% trans %}Recipients{% endtrans %}
{{ summary.emails_sent }}
{% trans %}Emails sent{% endtrans %}
{% if summary.email_failed %}
{{ summary.email_failed }}
{% trans %}Emails failed{% endtrans %}
{% endif %}
{{ summary.push_sent }}
{% trans %}Push sent{% endtrans %}
{% if summary.push_failed %}
{{ summary.push_failed }}
{% trans %}Push failed{% endtrans %}
{% endif %}
{{ summary.failures }}
{% trans %}Total failures{% endtrans %}
{% endif %}

{% trans %}Recipient Filters{% endtrans %}

{% for plan in plans %} {% endfor %}

{% trans %}Channels{% endtrans %}

{% trans %}Template Variables{% endtrans %}

{% for var, desc in [ ('{{username}}', 'Username'), ('{{email}}', 'Email address'), ('{{plan_name}}', 'Plan name'), ('{{country}}', 'Country'), ('{{joined_date}}', 'Join date (YYYY-MM-DD)'), ('{{subscription_status}}', 'Subscription status'), ('{{site_name}}', 'Site name'), ] %}
{{ var }}
{{ _(desc) }}
{% endfor %}

{% trans %}Send Time{% endtrans %}

{% trans %}Broadcast History{% endtrans %}

{% if history %} {% endif %}
{% if history %}
{% for h in history %} {% endfor %}
{% trans %}Date{% endtrans %} {% trans %}Channel{% endtrans %} {% trans %}Subject / Title{% endtrans %} {% trans %}Recipients{% endtrans %} {% trans %}Email{% endtrans %} {% trans %}Push{% endtrans %} {% trans %}Status{% endtrans %} {% trans %}Actions{% endtrans %}
{% if h.status == 'sent' and h.sent_at %} {{ h.sent_at[:16] }} {% elif h.status == 'scheduled' and h.scheduled_at %} ⏰ {{ h.scheduled_at[:16] }} {% else %} {{ h.created_at[:16] }} {% endif %} {{ h.channel }} {{ h.email_subject or h.push_title or '—' }} {{ h.total_recipients }} {% if h.status == 'scheduled' %}—{% else %}{{ h.emails_sent }}{% endif %} {% if h.status == 'scheduled' %}—{% else %}{{ h.push_sent }}{% endif %} {% if h.status == 'sent' %} {% trans %}Sent{% endtrans %} {% elif h.status == 'scheduled' %} {% trans %}Scheduled{% endtrans %} {% elif h.status == 'cancelled' %} {% trans %}Cancelled{% endtrans %} {% elif h.status == 'missed' %} {% trans %}Missed{% endtrans %} {% else %} {{ h.status }} {% endif %} {% if h.status == 'sent' %} {% trans %}Report{% endtrans %} {% elif h.status == 'scheduled' %} {% endif %}
{% else %}

{% trans %}No broadcasts sent yet.{% endtrans %}

{% endif %}
{% endblock %}