{% 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. ``folder_names``, where given: a column with each message's folders, by id. #} {% set names = folder_names if folder_names is defined else none %} {% if messages %}
| {{ tick_all("batch", "ids", "Tick every message") }} | {% endif %} {% if emails is not none %}Account | {% endif %}From | Subject | Date | {% if names is not none %}Folder | {% endif %}|
|---|---|---|---|---|---|---|
| {% endif %} {% if emails is not none %} | {{ emails.get(m.account_id, m.account_id) }} | {% endif %}{{ m.sender | address }} | {{ m.subject | or_missing }} {% if m.snippet %}{{ m.snippet }}{% endif %} | {{ (m.date or m.received) | when }} | {% if names is not none %}{% for f in m.folder_ids %}{{ names.get(f, f) }}{% if not loop.last %}, {% endif %}{% endfor %} | {% endif %}{% if m.starred %}{{ icon("star-fill", "starred") }}{% endif %} {% if m.has_attachments %}{{ icon("paperclip", "has attachments") }}{% endif %} {% for mark in m.keywords | replied %}{{ icon(mark.icon, mark.word) }}{% endfor %} {% for keyword in m.keywords | own_keywords %}{{ keyword }}{% endfor %} |