{% extends "base.html" %}
{% from "components/ui.html" import action, breadcrumb, csrf_field, dialog_button, dialog_buttons, folder_options, form_dialog, icon, link_button with context %}
{% block title %}{{ message.subject | or_missing }} · {{ APP_NAME }}{% endblock %}
{% block heading %}{{ message.subject | or_missing }}{% endblock %}
{% block subheading %}{{ breadcrumb(trail) }}{% endblock %}
{# The header holds what can be done with the message (docs/UI.md 4.4):
Reply with its word, the rest as icons, the way back is the
breadcrumb. #}
{% block actions %}
{% set url = "/ui/accounts/" ~ account.id ~ "/mail/" ~ message.id %}
{% set compose = "/ui/accounts/" ~ account.id ~ "/compose?" %}
{% set mail = "/ui/accounts/" ~ account.id ~ "/mail" %}
{% if can.write %}
{{ link_button(compose ~ ([('original', message.id), ('action', 'reply_all')] | urlencode), "Reply to all", "reply-all", alone=True) }}
{{ link_button(compose ~ ([('original', message.id), ('action', 'forward')] | urlencode), "Forward", "forward", alone=True) }}
{% endif %}
{% if can_raw %}{{ link_button(url ~ "/raw", "Download original", "download", alone=True, word=True) }}{% endif %}
{% if can.flag %}
{{ action(url ~ "/flags", "Mark read" if message.unread else "Mark unread", fields={"unread": "0" if message.unread else "1"}, icon="envelope-open" if message.unread else "envelope", alone=True, word=True) }}
{{ action(url ~ "/flags", "Unstar" if message.starred else "Star", fields={"starred": "0" if message.starred else "1"}, icon="star-fill" if message.starred else "star", alone=True) }}
{% endif %}
{% if can.move and tree %}{{ dialog_button("move-message", "Move", "folder-symlink", danger=False) }}{% endif %}
{% if can.trash and not in_trash %}{{ action(url ~ "/delete", "Move to the trash", fields={"back": mail}, icon="trash", alone=True) }}{% endif %}
{% if can.purge %}{{ action(url ~ "/delete", "Delete for good", confirm="Delete this message for good? This cannot be undone.", cls="small danger", fields={"permanent": "1", "back": mail}, icon="x-octagon", alone=True, word=True) }}{% endif %}
{% if can.write %}{{ link_button(compose ~ ([('original', message.id), ('action', 'reply')] | urlencode), "Reply", "reply", cls="primary") }}{% endif %}
{% endblock %}
{% block content %}
{% set url = "/ui/accounts/" ~ account.id ~ "/mail/" ~ message.id %}
Keywords
| {{ a.filename | or_missing }}{{ a.content_type }}{% if a.inline %}, inline{% endif %} | {{ a.size | size }} | {% if can_attachment %}{{ link_button("/ui/accounts/" ~ account.id ~ "/mail/" ~ message.id ~ "/attachments/" ~ (a.id | segment), "Download", "download", alone=True, name="Download " ~ (a.filename or "the attachment")) }}{% endif %} |
{{ body }}{% else %}