comparison gpp/templates/search/search.html @ 277:d424b8bae71d

Fixing #128 and #129. Add elsewhere weblinks to search content. Add support for haystack's get_update_field() method.
author Brian Neal <bgneal@gmail.com>
date Sat, 02 Oct 2010 23:24:39 +0000
parents 8a46843c258f
children 879d39647064
comparison
equal deleted inserted replaced
276:8a46843c258f 277:d424b8bae71d
4 {% block content %} 4 {% block content %}
5 <h2>Search <img src="{{ MEDIA_URL }}icons/magnifier.png" alt="Search" /></h2> 5 <h2>Search <img src="{{ MEDIA_URL }}icons/magnifier.png" alt="Search" /></h2>
6 <form method="get" action="."> 6 <form method="get" action=".">
7 <table> 7 <table>
8 <tr> 8 <tr>
9 <td><input type="text" name="q" id="id_q" /></td> 9 <td><input type="text" name="q" id="id_q" size="48" /></td>
10 <td><input type="submit" value="Search" /></td> 10 <td><input type="submit" value="Search" /></td>
11 </tr> 11 </tr>
12 </table> 12 </table>
13 <fieldset> 13 <fieldset>
14 <legend>Search in:</legend> 14 <legend>Search in:</legend>
25 </tr> 25 </tr>
26 </table> 26 </table>
27 </fieldset> 27 </fieldset>
28 28
29 {% if query %} 29 {% if query %}
30 <h3>Results</h3> 30 <h3>Results for &quot;{{ query }}&quot; page {{ page.number }} of {{ page.paginator.num_pages }}</h3>
31
32 {% if page.paginator.count %}
33 <p>
34 <strong>{{ page.paginator.count }} hit{{ page.paginator.count|pluralize }}</strong>
35 </p>
36 {% endif %}
37
31 {% if page.object_list %} 38 {% if page.object_list %}
32 <dl> 39 <dl>
33 {% for result in page.object_list %} 40 {% for result in page.object_list %}
34 <dt> 41 <dt>
35 {{ result.verbose_name }}: <a href="{{ result.object.get_absolute_url }}">{{ result.object.search_title }}</a> ({{ result.score }}) 42 {{ result.verbose_name }}: <a href="{{ result.object.get_absolute_url }}">{{ result.object.search_title }}</a> ({{ result.score }})