Re-formatted mailing list messages and fixed some markup.
authorThom Brown <thom@linux.com>
Mon, 9 Jul 2012 20:25:46 +0000 (21:25 +0100)
committerThom Brown <thom@linux.com>
Mon, 9 Jul 2012 20:25:46 +0000 (21:25 +0100)
django/archives/mailarchives/templates/message.html
django/archives/mailarchives/templates/message_flat.html
django/media/css/table.css
django/media/css/text.css

index 7b1577bf9a5e5ee94fef941ca47443bfd11ee8de..2cee83d713566cdb8df42a7e4c41d62bed370f8a 100644 (file)
@@ -21,32 +21,54 @@ ul.threadlist li {
    margin-left: 0px;
 }
 span.listname {
-   background-color: lightgray;
+   background-color: #F7F7F7;
    padding: 0.2em;
-   margin: 2ex 10px 2ex 0ex;
-   background: #F7F7F7;
    border: 1px solid #CFCFCF;
-   -moz-border-radius: 8px;
-   -webkit-border-radius: 8px;
-   -khtml-border-radius: 8px;
-   border-radius: 8px;
 }
 </style>
 {%endblock%}
 {%block layoutblock%}
 <h2>{{msg.subject}}</h2>
-<strong>From:</strong> {{msg.mailfrom|hidemail}}<br/>
-<strong>To:</strong> {{msg.to|hidemail}}<br/>
-{%if msg.cc%}<strong>Cc:</strong> {{msg.cc|hidemail}}<br/>{%endif%}
-<strong>Subject:</strong> {{msg.subject}}<br/>
-<strong>Date:</strong> {{msg.printdate}}<br/>
-<strong>Message-ID:</strong> <a href="http://archives.postgresql.org/message-id/{{msg.messageid}}">{{msg.messageid}}</a> (view <a href="/message-id/{{msg.messageid}}/raw">raw</a>)<br/>
-<strong>Thread:</strong> <select id="thread_select" onChange="onThreadSelect()">
-{%for m in threadstruct%}{%if m.id%}<option value="{{m.messageid}}"{%if m.id = msg.id%} SELECTED{%endif%}>{{m.indent|safe}}{{m.printdate}} from {{m.mailfrom}}</option>{%endif%}
+<table class="message">
+ <tr>
+  <th>From:</th>
+  <td>{{msg.mailfrom|hidemail}}</td>
+ </tr>
+{%if msg.cc%}<tr>
+  <th>To:</th>
+  <td>{{msg.to|hidemail}}</td>
+ </tr>
+{%endif%}
+ <tr>
+  <th>Cc:</th>
+  <td>{{msg.cc|hidemail}}</td>
+ </tr>
+ <tr>
+  <th>Subject:</th>
+  <td>{{msg.subject}}</td>
+ </tr>
+ <tr>
+  <th>Date:</th>
+  <td>{{msg.printdate}}</td>
+ </tr>
+ <tr>
+  <th>Message-ID:</th>
+  <td><a href="http://archives.postgresql.org/message-id/{{msg.messageid}}">{{msg.messageid}}</a> (view <a href="/message-id/{{msg.messageid}}/raw">raw</a>)</td>
+ </tr>
+ <tr>
+  <th>Thread:</th>
+  <td>
+   <select id="thread_select" onChange="onThreadSelect()">
+{%for m in threadstruct%}{%if m.id%}<option value="{{m.messageid}}"{%if m.id = msg.id%} selected="selected"{%endif%}>{{m.indent|safe}}{{m.printdate}} from {{m.mailfrom}}</option>{%endif%}
 {%endfor%}
-</select><br/>
-<strong>Lists:</strong> {%for l in lists %}<span class="listname"><a href="/{{l.listname}}/since/{{msg.shortdate}}">{{l.listname}}</a></span>{%endfor%}<br/>
-<hr/>
+   </select>
+  </td>
+ </tr>
+ <tr>
+  <th>Lists:</th>
+  <td>{%for l in lists %}<span class="listname"><a href="/{{l.listname}}/since/{{msg.shortdate}}">{{l.listname}}</a></span>{%endfor%}</td>
+ </tr>
+</table>
 <div class="bodywrapper">
 <pre>{{msg.bodytxt|urlize}}</pre>
 
@@ -62,14 +84,14 @@ Description: {{a.contenttype}}
 {%if parent%}
 <h3>In response to</h3>
 <ul>
-<li><a href="/message-id/{{parent.messageid}}">{{parent.subject}}</a> at {{parent.printdate}} from {{parent.mailfrom|nameonly}}</a></li>
+<li><a href="/message-id/{{parent.messageid}}">{{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}}">{{m.subject}}</a> at {{m.printdate}} from {{m.mailfrom|nameonly}}</a></li>
+<li><a href="/message-id/{{m.messageid}}">{{m.subject}}</a> at {{m.printdate}} from {{m.mailfrom|nameonly}}</li>
 {%endfor%}
 </ul>
 {%endif%}
index a17d89952afab4cf643de0d8d13456dd7e498b73..e29633177bb6e41b94f0447b0b7c13c53ead750a 100644 (file)
@@ -14,7 +14,7 @@ window.onload = load;
 </script>
 <style>
 div.msgwrap {
-   border: 2px solid blue;
+   border: 2px solid lightGray;
    margin-bottom: 10px;
 }
 </style>
@@ -24,13 +24,33 @@ div.msgwrap {
 {%for m in allmsg %}
 <div class="msgwrap">
 <a name="{{m.messageid}}"></a>
-<strong>From:</strong> {{m.mailfrom|hidemail}}<br/>
-<strong>To:</strong> {{m.to|hidemail}}<br/>
-{%if m.cc%}<strong>Cc:</strong> {{m.cc|hidemail}}<br/>{%endif%}
-<strong>Subject:</strong> {{m.subject}}<br/>
-<strong>Date:</strong> {{m.printdate}}<br/>
-<strong>Message-ID:</strong> <a href="http://archives.postgresql.org/message-id/{{m.messageid}}">{{m.messageid}}</a> (view <a href="/message-id/{{m.messageid}}/raw">raw</a>)<br/>
-<hr/>
+<table class="message">
+ <tr>
+  <th>From:</th>
+  <td>{{m.mailfrom|hidemail}}</td>
+ </tr>
+{%if msg.cc%}<tr>
+  <th>To:</th>
+  <td>{{m.to|hidemail}}</td>
+ </tr>
+{%endif%}
+ <tr>
+  <th>Cc:</th>
+  <td>{{m.cc|hidemail}}</td>
+ </tr>
+ <tr>
+  <th>Subject:</th>
+  <td>{{m.subject}}</td>
+ </tr>
+ <tr>
+  <th>Date:</th>
+  <td>{{m.printdate}}</td>
+ </tr>
+ <tr>
+  <th>Message-ID:</th>
+  <td><a href="http://archives.postgresql.org/message-id/{{m.messageid}}">{{m.messageid}}</a> (view <a href="/message-id/{{m.messageid}}/raw">raw</a>)</td>
+ </tr>
+</table>
 <div class="bodywrapper">
 <pre>{{m.bodytxt|urlize}}</pre>
 
index c8ac49244d5d06d19461f3304617063ed4cc75e6..4013f7f5eac28c105d3011a7349b4a8b923dc586 100644 (file)
@@ -99,3 +99,23 @@ div.tblBasic table td.colLastRT {
         text-align: right;
         vertical-align: top;
 }
+
+table.message th,
+table.message td
+{
+       vertical-align: top;
+}
+
+table.message
+{
+       background-color: rgb(240,240,240);
+       padding-bottom: 5px;
+       border: 2px solid lightGray;
+       width: 100%;
+}
+
+.msgwrap table.message
+{
+       border-width: 0;
+}
+
index 902a118624c281d5df0e5fdbbef559bf0977374f..6b3eba38148581d4b75cd2780b6bbb98541aa390 100644 (file)
@@ -143,9 +143,14 @@ a:hover                         { color:#000000; text-decoration: underline; }
 #txtFrontUserName a:active              { color:#666; text-decoration: underline; }
 #txtFrontUserName a:hover               { color:#000; text-decoration: underline; }
 
-#txtArchives a:visited { color:#00536E; text-decoration: underline; }
-#txtArchives pre       { word-wrap: break-word; font-size: 150%; }
-#txtArchives tt        { word-wrap: break-word; font-size: 150%; }
+.bodywrapper a:visited { color:#00536E; text-decoration: underline; }
+.bodywrapper pre,
+.bodywrapper tt {
+  word-wrap: break-word;
+  font-size: 1.2em;
+  padding-top: 1em;
+  padding-left: 2em;
+}
 
 #pgFrontUSSContainer h2, #pgFrontUSSContainer h3 {
   margin: 0;