Bring back the search box.
authorMagnus Hagander <magnus@hagander.net>
Thu, 27 Dec 2012 18:15:06 +0000 (19:15 +0100)
committerMagnus Hagander <magnus@hagander.net>
Thu, 27 Dec 2012 18:15:06 +0000 (19:15 +0100)
django/archives/mailarchives/templates/datelist.html
django/archives/mailarchives/templates/index.html
django/archives/mailarchives/templates/monthlist.html
django/archives/mailarchives/templates/searchform.html [new file with mode: 0644]
django/archives/mailarchives/views.py

index 3c058a9492e57c1c9f1550b6800a02ea80f566d7..2fdd9b9935b6c1b58bebacb033c83f989b71d98c 100644 (file)
@@ -3,6 +3,7 @@
 {%load pgfilters%}
 {%block contents%}
 <h1>{{title}}</h1>
+{%include "searchform.html"%}
 {%for m in messages%}
 {%ifchanged m.date.date%}
 {%if not forloop.first%}
index b6f0216dde490cde36c30351bc5930180ab4318f..86d554f54ccaa0cc6afa5d3054d82bd5a9b12399 100644 (file)
@@ -3,8 +3,7 @@
 {%load pgfilters%}
 {%block contents%}
 <h1>PostgreSQL Mailing List Archives</h1>
-<p>
-</p>
+{%include "searchform.html" %}
 <ul>
 {%for g in groups%}
  <li>{{g.groupname}}
index 9dfd116cf90c173248a48fed7d60d346a0bdd38c..290cc53f216a18d701b70a6045fb303f1647b6ba 100644 (file)
@@ -3,6 +3,7 @@
 {%load pgfilters%}
 {%block contents%}
 <h1>{{list.listname}}</h1>
+{%include "searchform.html" %}
 {%regroup months by year as yearmonth %}
 <ul>
 {%for year in yearmonth%}
diff --git a/django/archives/mailarchives/templates/searchform.html b/django/archives/mailarchives/templates/searchform.html
new file mode 100644 (file)
index 0000000..0422548
--- /dev/null
@@ -0,0 +1,21 @@
+<p>
+</p>
+<form name="searchform" method="get" action="http://www.postgresql.org/search/">
+ <input type="hidden" name="m" value="1" />
+{%if searchform_list%} <input type="hidden" name="l" value="{{searchform_list}}"/>{%endif%}
+ <div class="tblBasic">
+  <table border="0" cellpadding="0" cellspacing="0" class="tblBasicGrey">
+   <tr>
+      <th class="colFirst" style="vertical-align: middle">Search archives</th>
+      <th class="colLast" colspan="2">
+       <input type="text" name="q" size="25" value=""/> <input type="submit" value="Search" />
+      </th>
+   </tr>
+   <tr class="lastrow">
+    <td class="colFirst"></td>
+    <td>(enter a message-id to go directly to that message)</td>
+    <td class="colLast" align="right"><a href="http://www.postgresql.org/search/?m=1">Advanced Search</a></td>
+   </tr>
+  </table>
+ </div>
+</form>
index 7dfa1023b936e58aeea68e6a394816ae779ac035..8357906479da3df432c32b3b78b194b83fa6eb26 100644 (file)
@@ -77,6 +77,9 @@ class NavContext(RequestContext):
                                g['lists'] = []
 
                self.update({'listgroups': groups})
+               if listid:
+                       self.update({'searchform_list': listid})
+
 
 @cache(hours=4)
 def index(request):