Make the list-of-lists page more complete
authorMagnus Hagander <magnus@hagander.net>
Sat, 14 Sep 2013 12:00:47 +0000 (14:00 +0200)
committerMagnus Hagander <magnus@hagander.net>
Sat, 14 Sep 2013 12:00:47 +0000 (14:00 +0200)
Lift the code for showing it form the main website, and a later commit will
change the main website to redirect to this page instead.

django/archives/mailarchives/models.py
django/archives/mailarchives/templates/base.html
django/archives/mailarchives/templates/index.html

index aaa7d61c3e52452fdb0c96d1ec3e85824f6ffbd9..c857a74590b169313d73876a6c22b713846410fd 100644 (file)
@@ -72,6 +72,12 @@ class List(models.Model):
        active = models.BooleanField(null=False, blank=False)
        group = models.ForeignKey(ListGroup, db_column='groupid')
 
+       @property
+       def maybe_shortdesc(self):
+               if self.shortdesc:
+                       return self.shortdesc
+               return self.listname
+
        class Meta:
                db_table = 'lists'
 
index b2e494bd758ff321be789495727a50e4d9c27023..ef4ba472cdbcf3f9321931004ca08d7937fc2a45 100644 (file)
@@ -87,6 +87,7 @@
             <li><a href="http://www.postgresql.org/community/contributors/">Contributors</a></li>
             <li><a href="/list/">Mailing Lists</a>
               <ul>
+                <li><a href="/community/lists/subscribe/">Subscribe</a></li>
 {%for g in listgroups%}
                 <li><a href="/{{g.homelink}}/">{{g.groupname}}</a>
 {%if g.lists%}
index 86d554f54ccaa0cc6afa5d3054d82bd5a9b12399..525dd3d087284db2c89b44c6aa9a1c462e9bd829 100644 (file)
@@ -2,18 +2,46 @@
 {%block title%}PostgreSQL Mailing List Archives{%endblock%}
 {%load pgfilters%}
 {%block contents%}
-<h1>PostgreSQL Mailing List Archives</h1>
+<h1>PostgreSQL Mailing Lists</h1>
+
+<h3>How to Subscribe or Unsubscribe</h3>
+
+<p>Fill out this <a href="/community/lists/subscribe">form</a>.</p>
+
+<!-- this text is duplicated in system/form/subscribe.php -->
+<p>Please do not subscribe to mailing lists using e-mail accounts protected by
+mail-back anti-spam systems. These are extremely annoying to the list
+maintainers and other members, and you may be automatically unsubscribed.
+</p>
+
+<h3>Archives</h3>
+<p>Before posting to a list, you may wish to search the archives to see if
+your question has already been answered.</p>
+
 {%include "searchform.html" %}
-<ul>
+
+
 {%for g in groups%}
- <li>{{g.groupname}}
-   <ul>
+{%if not forloop.first%}
+ </table>
+</div>
+{%endif%}
+<h2>{{g.groupname}}</h2>
+<div class="tblBasic">
+<table border="0" cellpadding="0" cellspacing="0" class="tblBasicGrey">
+<tr>
+       <th class="colFirst">List</th>
+       <th class="colLast">Description</th>
+</tr>
+
 {%for l in g.lists%}
-     <li><a href="/list/{{l.listname}}/">{{l.listname}}</a></li>
+<tr>
+    <td class="colFirst"><a href="/list/{{l.listname}}/">{{l.maybe_shortdesc}}</a></td>
+    <td class="colLast">{{l.description|safe}}</td>
+</tr>
 {%endfor%}
-   </ul>
- </li>
 {%endfor%}
-</ul>
+ </table>
+</div>
 
 {%endblock%}