Changes for messages added.
This commit is contained in:
33
packetserver/http/templates/message_list.html
Normal file
33
packetserver/http/templates/message_list.html
Normal file
@@ -0,0 +1,33 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Messages - PacketServer{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Messages</h1>
|
||||
|
||||
<div class="mb-3">
|
||||
<a href="?msg_type=received" class="btn btn-sm {% if msg_type == 'received' %}btn-primary{% else %}btn-outline-primary{% endif %}">Received</a>
|
||||
<a href="?msg_type=sent" class="btn btn-sm {% if msg_type == 'sent' %}btn-primary{% else %}btn-outline-primary{% endif %}">Sent</a>
|
||||
<a href="?msg_type=all" class="btn btn-sm {% if msg_type == 'all' %}btn-primary{% else %}btn-outline-primary{% endif %}">All</a>
|
||||
</div>
|
||||
|
||||
{% if messages %}
|
||||
<ul class="message-list">
|
||||
{% for msg in messages %}
|
||||
<li>
|
||||
<strong><a href="/dashboard/message/{{ msg.id }}">{{ msg.subject }}</a></strong>
|
||||
<span class="meta">
|
||||
From: {{ msg.from }} | To: {{ msg.to }} | {{ msg.sent_at[:10] }} {{ msg.sent_at[11:19] }}
|
||||
{% if not msg.retrieved %}<span class="text-warning"> (Unread)</span>{% endif %}
|
||||
{% if msg.has_attachments %}<span class="text-info"> (Attachments)</span>{% endif %}
|
||||
</span>
|
||||
<div class="preview">{{ msg.text_preview }}</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<p>No messages found.</p>
|
||||
{% endif %}
|
||||
|
||||
<p><a href="/dashboard">← Back to Dashboard</a></p>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user