mirror of
https://gitverse.ru/kpa39l/email-assistant.git
synced 2026-11-27 18:33:08 +00:00
42 lines
2.1 KiB
HTML
42 lines
2.1 KiB
HTML
{% if current %}
|
|
<div style="display:flex;flex-direction:column;height:100%">
|
|
<div class="ph">
|
|
<div style="flex:1;min-width:0">
|
|
<div class="ps">{{ current.meta.get('subject') or '(без темы)' }}</div>
|
|
<div class="pm">
|
|
<span><span class="pl">От:</span> {{ current.meta.get('from') or '?' }}</span>
|
|
{% for r in current.meta.get('to', '').split(';') %}
|
|
<span><span class="pl">Кому:</span> {{ r.strip() }}</span>
|
|
{% endfor %}
|
|
<span><span class="pl">Дата:</span> {{ current.meta.get('date') or '?' }}</span>
|
|
</div>
|
|
{% if current.attachments %}
|
|
<div class="patts">
|
|
{% for a in current.attachments %}
|
|
<a class="pa" href="/attachments/{{ current.dir|replace('/opt/hermes/email/', '') }}/attachments/{{ a.name|urlencode }}">📄 {{ a.name }} ({{ a.size_hr }})</a>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
<div style="display:flex;gap:6px;align-items:center">
|
|
<button class="pb-btn" title="Создать задачу в Radicale"
|
|
hx-post="/api/tasks/create"
|
|
hx-vals='{"subject":{{ (current.meta.get('subject') or '(без темы)')|tojson|safe }},"from":{{ (current.meta.get('from') or '')|tojson|safe }},"body":{{ (current.body or '')[:300]|tojson|safe }},"path":{{ (current.path or '')|tojson|safe }},"email":"{{ (current.meta.get('from') or '')|e }}"}'
|
|
hx-swap="outerHTML">📋</button>
|
|
<button class="pchev" onclick="this.classList.toggle('open');document.getElementById('phdrs').classList.toggle('open')">⌄</button>
|
|
</div>
|
|
<div class="phdrs" id="phdrs" style="flex-basis:100%">
|
|
{% for k in current.meta %}
|
|
<div><b>{{ k }}:</b> {{ current.meta[k] }}</div>
|
|
{% endfor %}
|
|
<div><b>Файл:</b> /opt/hermes/email/{{ current.path }}</div>
|
|
{% if current.attachments %}<div><b>Вложений:</b> {{ current.attachments|length }}</div>{% endif %}
|
|
</div>
|
|
</div>
|
|
<div class="pb" style="white-space:pre-wrap;font-family:inherit">
|
|
{{ current.body }}
|
|
</div>
|
|
</div>
|
|
{% else %}
|
|
<div class="empty">Выберите письмо</div>
|
|
{% endif %} |