--- /dev/null
+{%load pgfilters%}
+
+<table class="table table-sm table-responsive">
+ <tr>
+ <th scope="row">From:</th>
+ <td>{{msg.mailfrom|hidemail}}</td>
+ </tr>
+ <tr>
+ <th scope="row">To:</th>
+ <td>{{msg.to|hidemail}}</td>
+ </tr>
+{%if msg.cc%}
+ <tr>
+ <th scope="row">Cc:</th>
+ <td>{{msg.cc|hidemail}}</td>
+ </tr>
+{%endif%}
+ <tr>
+ <th scope="row">Subject:</th>
+ <td>{%if not msg.hiddenstatus%}{{msg.subject}}{%endif%}</td>
+ </tr>
+ <tr>
+ <th scope="row">Date:</th>
+ <td>{{msg.printdate}}</td>
+ </tr>
+ <tr>
+ <th scope="row">Message-ID:</th>
+ <td><a href="/message-id/{{msg.messageid|urlencode}}">{{msg.messageid}}</a></td>
+ </tr>
+ <tr>
+ <th class="align-middle" scope="row">Views:</th>
+ <td>
+ <a class="btn btn-sm btn-secondary" href="/message-id/raw/{{msg.messageid|urlencode}}">Raw Message</a>
+ <a class="btn btn-sm btn-secondary" href="/message-id/flat/{{msg.messageid|urlencode}}">Whole Thread</a>
+ <a class="btn btn-sm btn-secondary" href="/message-id/mbox/{{msg.messageid|urlencode}}">Download mbox</a>
+ </td>
+ </tr>
+ {% if not show_all %}
+ <tr>
+ <th class="align-middle" scope="row">Thread:</th>
+ <td>
+ <select id="thread_select" class="custom-select" onchange="onThreadSelect()">
+ {%for m in threadstruct%}{%if m.id%}<option value="{{m.messageid|urlencode}}"{%if m.id == msg.id%} selected="selected"{%endif%}{%if m.hasattachment%} class="hasatt"{%endif%}>{{m.indent|safe}}{{m.printdate}} from {{m.mailfrom|hidemail}}</option>{%endif%}
+ {%endfor%}
+ </select>
+ </td>
+ </tr>
+ {% endif %}
+ {% if lists %}
+ <tr>
+ <th scope="row">Lists:</th>
+ <td>{%for l in lists %}<span class="listname"><a href="/list/{{l.listname}}/since/{{msg.shortdate}}">{{l.listname}}</a></span>{%endfor%}</td>
+ </tr>
+ {% endif %}
+</table>
+{%if msg.hiddenstatus%}
+<pre style="font-size: 0.85rem; line-height: 1.1rem;">{{msg.hiddenreason}}</pre>
+{%else%}
+<pre style="font-size: 0.85rem; line-height: 1.1rem;">{{msg.bodytxt|hideallemail|urlize}}</pre>
+
+{%if msg.has_attachment%}
+ <h5>Attachments</h5>
+ <table class="table table-sm table-responsive">
+ <thead>
+ <tr>
+ <th scope="col">Attachment</th>
+ <th scope="col">Content-Type</th>
+ <th scope="col">Size</th>
+ </tr>
+ </thead>
+ <tbody>
+ {%for a in msg.attachments%}
+ <tr>
+ <th scope="row">
+ {% if a.inlineable %}
+ <a href="/message-id/attachment/{{a.id}}/{{a.filename}}">
+ <img class="attachedimage" src="/message-id/attachment/{{a.id}}/{{a.filename}}" />
+ </a>
+ {% else %}
+ <a href="/message-id/attachment/{{a.id}}/{{a.filename}}">{{a.filename}}</a>
+ {% endif %}
+ </th>
+ <td>{{ a.contenttype }}</td>
+ <td>{{a.len|filesizeformat}}</td>
+ </tr>
+ {%endfor%}
+ </tbody>
+ </table>
+{%endif%}
+
+{%if parent%}
+ <h3>In response to</h3>
+ <ul>
+ <li><a href="/message-id/{{parent.messageid|urlencode}}">{{parent.subject}}</a> at {{parent.printdate}} from {{parent.mailfrom|nameonly}}</li>
+ </ul>
+{%endif%}
+
+{%if responses%}
+ <h3>Responses</h3>
+ <ul>
+ {%for m in responses%}
+ <li>
+ <a href="/message-id/{{m.messageid|urlencode}}">{{m.subject}}</a> at {{m.printdate}} from {{m.mailfrom|nameonly}}
+ </li>
+ {%endfor%}
+ </ul>
+{%endif%}
+
+{%if nextprev%}
+ {%for list, info in nextprev.items %}
+ <h3>Browse {{list}} by date</h3>
+ <table class="table table-sm table-responsive">
+ <thead>
+ <tr>
+ <th scope="col"> </th>
+ <th scope="col">From</th>
+ <th scope="col">Date</th>
+ <th scope="col">Subject</th>
+ </tr>
+ </thead>
+ <tbody>
+ {%if info.next%}
+ <tr>
+ <th scope="row"><a href="/message-id/{{info.next.msgid|urlencode}}">Next Message</a></th>
+ <td>{{info.next.from|nameonly}}</td>
+ <td>{{info.next.date}}</td>
+ <td><a href="/message-id/{{info.next.msgid|urlencode}}">{{info.next.subject}}</a></td>
+ </tr>
+ {%endif%}
+ {%if info.prev%}
+ <tr>
+ <th scope="row"><a href="/message-id/{{info.prev.msgid|urlencode}}">Previous Message</a></th>
+ <td>{{info.prev.from|nameonly}}</td>
+ <td>{{info.prev.date}}</td>
+ <td><a href="/message-id/{{info.prev.msgid|urlencode}}">{{info.prev.subject}}</a></td>
+ </tr>
+ {%endif%}
+ </tbody>
+ </table>
+ {%endfor%}
+{%endif%}
+
+{%endif%}{%comment%}hidden{%endcomment%}
{%extends "page.html"%}
{%block title%}{%if not msg.hiddenstatus%}{{msg.subject}}{%endif%}{%endblock%}
-{%load pgfilters%}
{%block extrahead%}
<script type="text/javascript">
{%endblock%}
{%block contents%}
-{%if not msg.hiddenstatus%}
-<h1 class="subject">{{msg.subject}}</h1>
-{%endif%}
-<table class="table table-sm table-responsive">
- <tr>
- <th scope="row">From:</th>
- <td>{{msg.mailfrom|hidemail}}</td>
- </tr>
- <tr>
- <th scope="row">To:</th>
- <td>{{msg.to|hidemail}}</td>
- </tr>
-{%if msg.cc%}
- <tr>
- <th scope="row">Cc:</th>
- <td>{{msg.cc|hidemail}}</td>
- </tr>
-{%endif%}
- <tr>
- <th scope="row">Subject:</th>
- <td>{%if not msg.hiddenstatus%}{{msg.subject}}{%endif%}</td>
- </tr>
- <tr>
- <th scope="row">Date:</th>
- <td>{{msg.printdate}}</td>
- </tr>
- <tr>
- <th scope="row">Message-ID:</th>
- <td><a href="/message-id/{{msg.messageid|urlencode}}">{{msg.messageid}}</a></td>
- </tr>
- <tr>
- <th class="align-middle" scope="row">Views:</th>
- <td>
- <a class="btn btn-sm btn-secondary" href="/message-id/raw/{{msg.messageid|urlencode}}">Raw Message</a>
- <a class="btn btn-sm btn-secondary" href="/message-id/flat/{{msg.messageid|urlencode}}">Whole Thread</a>
- <a class="btn btn-sm btn-secondary" href="/message-id/mbox/{{msg.messageid|urlencode}}">Download mbox</a>
- </td>
- </tr>
- <tr>
- <th class="align-middle" scope="row">Thread:</th>
- <td>
- <select id="thread_select" class="custom-select" onchange="onThreadSelect()">
-{%for m in threadstruct%}{%if m.id%}<option value="{{m.messageid|urlencode}}"{%if m.id == msg.id%} selected="selected"{%endif%}{%if m.hasattachment%} class="hasatt"{%endif%}>{{m.indent|safe}}{{m.printdate}} from {{m.mailfrom|hidemail}}</option>{%endif%}
-{%endfor%}
- </select>
- </td>
- </tr>
- <tr>
- <th scope="row">Lists:</th>
- <td>{%for l in lists %}<span class="listname"><a href="/list/{{l.listname}}/since/{{msg.shortdate}}">{{l.listname}}</a></span>{%endfor%}</td>
- </tr>
-</table>
-{%if msg.hiddenstatus%}
-<pre style="font-size: 0.85rem; line-height: 1.1rem;">{{msg.hiddenreason}}</pre>
-{%else%}
-<pre style="font-size: 0.85rem; line-height: 1.1rem;">{{msg.bodytxt|hideallemail|urlize}}</pre>
-
-{%if msg.has_attachment%}
- <h5>Attachments</h5>
- <table class="table table-sm table-responsive">
- <thead>
- <tr>
- <th scope="col">Attachment</th>
- <th scope="col">Content-Type</th>
- <th scope="col">Size</th>
- </tr>
- </thead>
- <tbody>
- {%for a in msg.attachments%}
- <tr>
- <th scope="row">
- {% if a.inlineable %}
- <a href="/message-id/attachment/{{a.id}}/{{a.filename}}">
- <img class="attachedimage" src="/message-id/attachment/{{a.id}}/{{a.filename}}" />
- </a>
- {% else %}
- <a href="/message-id/attachment/{{a.id}}/{{a.filename}}">{{a.filename}}</a>
- {% endif %}
- </th>
- <td>{{ a.contenttype }}</td>
- <td>{{a.len|filesizeformat}}</td>
- </tr>
- {%endfor%}
- </tbody>
- </table>
-{%endif%}
-
-{%if parent%}
- <h3>In response to</h3>
- <ul>
- <li><a href="/message-id/{{parent.messageid|urlencode}}">{{parent.subject}}</a> at {{parent.printdate}} from {{parent.mailfrom|nameonly}}</li>
- </ul>
-{%endif%}
-
-{%if responses%}
- <h3>Responses</h3>
- <ul>
- {%for m in responses%}
- <li>
- <a href="/message-id/{{m.messageid|urlencode}}">{{m.subject}}</a> at {{m.printdate}} from {{m.mailfrom|nameonly}}
- </li>
- {%endfor%}
- </ul>
-{%endif%}
-
-{%if nextprev%}
- {%for list, info in nextprev.items %}
- <h3>Browse {{list}} by date</h3>
- <table class="table table-sm table-responsive">
- <thead>
- <tr>
- <th scope="col"> </th>
- <th scope="col">From</th>
- <th scope="col">Date</th>
- <th scope="col">Subject</th>
- </tr>
- </thead>
- <tbody>
- {%if info.next%}
- <tr>
- <th scope="row"><a href="/message-id/{{info.next.msgid|urlencode}}">Next Message</a></th>
- <td>{{info.next.from|nameonly}}</td>
- <td>{{info.next.date}}</td>
- <td><a href="/message-id/{{info.next.msgid|urlencode}}">{{info.next.subject}}</a></td>
- </tr>
- {%endif%}
- {%if info.prev%}
- <tr>
- <th scope="row"><a href="/message-id/{{info.prev.msgid|urlencode}}">Previous Message</a></th>
- <td>{{info.prev.from|nameonly}}</td>
- <td>{{info.prev.date}}</td>
- <td><a href="/message-id/{{info.prev.msgid|urlencode}}">{{info.prev.subject}}</a></td>
- </tr>
- {%endif%}
- </tbody>
- </table>
- {%endfor%}
-{%endif%}
-
-{%endif%}{%comment%}hidden{%endcomment%}
+{% include '_message.html' with msg=msg lists=lists %}
{%endblock%}
{%endif%}
{%for m in allmsg %}
<a name="{{m.messageid|urlencode}}"></a>
-<table class="table table-sm table-responsive">
- <tr>
- <th scope="row">From:</th>
- <td>{{m.mailfrom|hidemail}}</td>
- </tr>
- <tr>
- <th scope="row">To:</th>
- <td>{{m.to|hidemail}}</td>
- </tr>
-{%if m.cc%}
- <tr>
- <th scope="row">Cc:</th>
- <td>{{m.cc|hidemail}}</td>
- </tr>
-{%endif%}
- <tr>
- <th scope="row">Subject:</th>
- <td>{%if not m.hiddenstatus%}{{m.subject}}{%endif%}</td>
- </tr>
- <tr>
- <th scope="row">Date:</th>
- <td>{{m.printdate}}</td>
- </tr>
- <tr>
- <th scope="row">Message-ID:</th>
- <td><a href="/message-id/{{m.messageid|urlencode}}">{{m.messageid}}</a></td>
- </tr>
- <tr>
- <th class="align-middle" scope="row">Views:</th>
- <td>
- <a class="btn btn-sm btn-secondary" href="/message-id/raw/{{m.messageid|urlencode}}">Raw Message</a>
- <a class="btn btn-sm btn-secondary" href="/message-id/{{m.messageid|urlencode}}">Original Message</a>
- <a class="btn btn-sm btn-secondary" href="/message-id/mbox/{{m.messageid|urlencode}}">Download mbox</a>
- </td>
- </tr>
-</table>
-
-{%if m.hiddenstatus%}
-<pre style="font-size: 0.85rem; line-height: 1.1rem;">{{m.hiddenreason}}</pre>
-{%else%}
-<pre style="font-size: 0.85rem; line-height: 1.1rem;">{{m.bodytxt|hideallemail|urlize}}</pre>
-
-{%if m.has_attachment%}
- <h5>Attachments</h5>
- <table class="table table-sm table-responsive">
- <thead>
- <tr>
- <th scope="col">Attachment</th>
- <th scope="col">Content-Type</th>
- <th scope="col">Size</th>
- </tr>
- </thead>
- <tbody>
- {%for a in m.attachments%}
- <tr>
- <th scope="row">
- {% if a.inlineable %}
- <a href="/message-id/attachment/{{a.id}}/{{a.filename}}">
- <img class="attachedimage" src="/message-id/attachment/{{a.id}}/{{a.filename}}" />
- </a>
- {% else %}
- <a href="/message-id/attachment/{{a.id}}/{{a.filename}}">{{a.filename}}</a>
- {% endif %}
- </th>
- <td>{{ a.contenttype }}</td>
- <td>{{a.len|filesizeformat}}</td>
- </tr>
- {%endfor%}
- </tbody>
- </table>
-{%endif%}
-
-{%endif%}{%comment%}hidden{%endcomment%}
+{% include '_message.html' with msg=m show_all=True %}
<hr />
{%endfor%}
{%endblock%}