{% from "components/ui.html" import icon, pager, tick_all %} {# A page of messages. ``emails``: the account column, for lists across accounts, None for one account's list. ``selectable``: a tick box per message for the form ``batch``. ``open_as``: "mail", or "drafts" for links that open the draft editor. #} {% if messages %}
{% if selectable %}{% endif %} {% if emails is not none %}{% endif %} {% for m in messages %} {% if selectable %}{% endif %} {% if emails is not none %}{% endif %} {% endfor %}
{{ tick_all("batch", "ids", "Tick every message") }}AccountFromSubjectDate
{{ emails.get(m.account_id, m.account_id) }}{{ m.sender | address }} {{ m.subject | or_missing }} {% if m.snippet %}{{ m.snippet }}{% endif %} {{ m.date | when }} {% if m.starred %}{{ icon("star-fill", "starred") }}{% endif %} {% if m.has_attachments %}{{ icon("paperclip", "has attachments") }}{% endif %} {% if "$answered" in m.keywords %}{{ icon("reply", "answered") }}{% endif %} {% for keyword in m.keywords | own_keywords %}{{ keyword }}{% endfor %}
{% else %}
No messages{{ " match the search" if fields else "" }}.
{% endif %} {{ pager(pages) }}