{% from "components/ui.html" import pager %} {# A page of messages. ``emails``: the account column, for lists across accounts. Without it, one account's list. ``selectable``: a tick box per message for the form ``batch``. ``open_as="drafts"``: links open the draft editor. #} {% set opens = open_as if open_as is defined else "mail" %} {% set ticks = selectable is defined and selectable %} {% if messages %}
{% if ticks %}{% endif %} {% if emails is defined %}{% endif %} {% for m in messages %} {% if ticks %}{% endif %} {% if emails is defined %}{% endif %} {% endfor %}
SelectAccountFromSubjectDate
{{ emails.get(m.account_id, m.account_id) }}{{ m.sender | address }} {{ m.subject | or_missing }} {{ m.snippet | or_missing }} {{ m.date | when }} {% if m.starred %}★{% endif %} {% if m.has_attachments %}📎{% endif %} {% if "$answered" in m.keywords %}↩{% endif %}
{% else %}
No messages{{ " match the search" if fields else "" }}.
{% endif %} {{ pager(pages) }}