Mercurial > public > sg101
comparison gpp/templates/search/search.html @ 323:0c18dfb1da1c
Fixing #149; adding the ygroup application: an archive of the old Yahoo Group messages.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 20 Feb 2011 00:31:54 +0000 |
parents | 88b2b9cb8c1f |
children | b1f939b1fb01 |
comparison
equal
deleted
inserted
replaced
322:c3d3d7114749 | 323:0c18dfb1da1c |
---|---|
1 {% extends 'base.html' %} | 1 {% extends 'base.html' %} |
2 {% load highlight %} | 2 {% load highlight %} |
3 {% block title %}Search{% endblock %} | 3 {% block title %}Search{% endblock %} |
4 {% block custom_js %} | |
5 <script type="text/javascript"> | |
6 //<![CDATA[ | |
7 $(document).ready(function() { | |
8 chkboxes = $('#search-form input[type="checkbox"]'); | |
9 $('#chk_all').click(function() { | |
10 chkboxes.each(function(index) { | |
11 $(this).attr('checked', true); | |
12 }); | |
13 return false; | |
14 }); | |
15 $('#chk_none').click(function() { | |
16 chkboxes.each(function(index) { | |
17 $(this).attr('checked', false); | |
18 }); | |
19 return false; | |
20 }); | |
21 }); | |
22 //]]> | |
23 </script> | |
24 {% endblock %} | |
4 {% block content %} | 25 {% block content %} |
5 <h2>Search <img src="{{ STATIC_URL }}icons/magnifier.png" alt="Search" /></h2> | 26 <h2>Search <img src="{{ STATIC_URL }}icons/magnifier.png" alt="Search" /></h2> |
6 <form method="get" action="."> | 27 <form id="search-form" method="get" action="."> |
7 <table> | 28 <table> |
8 <tr> | 29 <tr> |
9 <td><input type="text" name="q" id="id_q" size="48" class="text" /></td> | 30 <td><input type="text" name="q" id="id_q" size="48" class="text" /></td> |
10 <td><input type="submit" value="Search" /></td> | 31 <td><input type="submit" value="Search" /></td> |
11 </tr> | 32 </tr> |
12 </table> | 33 </table> |
13 <fieldset> | 34 <fieldset> |
14 <legend>Search in:</legend> | 35 <legend>Search in:</legend> |
15 <table> | 36 <table> |
16 <tr> | 37 <tr> |
17 <td><input type="checkbox" name="models" value="forums.post" checked="checked" />Forum Posts</td> | 38 <td><input id="chk-forums" type="checkbox" name="models" value="forums.post" checked="checked" /> |
18 <td><input type="checkbox" name="models" value="news.story" checked="checked" />News Stories</td> | 39 <label for="chk-forums" class="pointer">Forum Posts</label></td> |
19 <td><input type="checkbox" name="models" value="bio.userprofile" checked="checked" />User Profiles</td> | 40 <td><input id="chk-news" type="checkbox" name="models" value="news.story" checked="checked" /> |
41 <label for="chk-news" class="pointer">News Stories</label></td> | |
42 <td><input id="chk-profiles" type="checkbox" name="models" value="bio.userprofile" checked="checked" /> | |
43 <label for="chk-profiles" class="pointer">User Profiles</label></td> | |
20 </tr> | 44 </tr> |
21 <tr> | 45 <tr> |
22 <td><input type="checkbox" name="models" value="weblinks.link" checked="checked" />Links</td> | 46 <td><input id="chk-links" type="checkbox" name="models" value="weblinks.link" checked="checked" /> |
23 <td><input type="checkbox" name="models" value="downloads.download" checked="checked" />Downloads</td> | 47 <label for="chk-links" class="pointer">Links</label></td> |
24 <td><input type="checkbox" name="models" value="podcast.item" checked="checked" />Podcasts</td> | 48 <td><input id="chk-dls" type="checkbox" name="models" value="downloads.download" checked="checked" /> |
49 <label for="chk-dls" class="pointer">Downloads</label></td> | |
50 <td><input id="chk-podcasts" type="checkbox" name="models" value="podcast.item" checked="checked" /> | |
51 <label for="chk-podcasts" class="pointer">Podcasts</label></td> | |
52 </tr> | |
53 <tr> | |
54 <td colspan="2"><input id="chk-ygroup" type="checkbox" name="models" value="ygroup.post" checked="checked" /> | |
55 <label for="chk-ygroup" class="pointer">Yahoo Group Archives</label></td> | |
25 </tr> | 56 </tr> |
26 </table> | 57 </table> |
58 <p><a href="#" id="chk_all">Check all</a> | <a href="#" id="chk_none">Check none</a></p> | |
27 </fieldset> | 59 </fieldset> |
60 </form> | |
28 | 61 |
29 {% if query %} | 62 {% if query %} |
30 <h3>Results for "{{ query }}" page {{ page.number }} of {{ page.paginator.num_pages }}</h3> | 63 <h3>Results for "{{ query }}" page {{ page.number }} of {{ page.paginator.num_pages }}</h3> |
31 | 64 |
32 {% if page.paginator.count %} | 65 {% if page.paginator.count %} |
58 </div> | 91 </div> |
59 {% endif %} | 92 {% endif %} |
60 {% else %} | 93 {% else %} |
61 {# Show some example queries to run, maybe query syntax, something else? #} | 94 {# Show some example queries to run, maybe query syntax, something else? #} |
62 {% endif %} | 95 {% endif %} |
63 </form> | |
64 {% endblock %} | 96 {% endblock %} |