{% extends "base.html" %} {% from "components/ui.html" import empty, pager %} {% block title %}Sends · {{ APP_NAME }}{% endblock %} {% block heading %}Sends{% endblock %} {% block subheading %}
{% if account is not none %}From {{ account.email }} · all accounts {% else %}The latest of every account you may audit{% endif %} · who sent to whom, never what
{% endblock %} {% block content %} {% if account is none and accounts %}
Everything of one account: {% for a in accounts %}{{ a.email }}{% endfor %}
{% endif %}
{% if records %}
{% if account is none %}{% endif %} {% for r in records %} {% if account is none %}{% endif %} {% endfor %}
WhenAccountWhoToOutcomeHow
{{ r.created_at | when }}{{ emails.get(r.account_id, r.account_id) }} {% if r.user_id in names %}{{ names[r.user_id] }}{% else %}{{ r.user_id[:16] }}…{% endif %} {% if r.credential_id %}token {{ r.credential_id[:16] }}…{% else %}admin key{% endif %} {{ r.recipients | join(", ") }} {% if r.refused %}refused: {{ r.refused | join(", ") }}{% endif %} {% if r.outcome == "sent" %}sent {% elif r.outcome == "denied" %}denied {% else %}failed{% endif %} {% if r.error %}{{ r.error }}{% endif %} {{ "draft" if r.operation == "send_draft" else "message" }}
{% else %} {{ empty("Nothing sent yet, or no account you may audit.") }} {% endif %}
{{ pager(pages) }}
{% endblock %}