Mercurial > public > sg101
comparison gpp/templates/search/search.html @ 220:71fd8454688b
For #51, added weblinks to search. Decided against using the search index to store prerendered results. My fear is this could get too unweildy once we add forums.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 06 Jun 2010 20:06:15 +0000 |
parents | 26ee684c2033 |
children | a5fcf3d1b663 |
comparison
equal
deleted
inserted
replaced
219:26ee684c2033 | 220:71fd8454688b |
---|---|
17 <h3>Results</h3> | 17 <h3>Results</h3> |
18 {% if page.object_list %} | 18 {% if page.object_list %} |
19 <dl> | 19 <dl> |
20 {% for result in page.object_list %} | 20 {% for result in page.object_list %} |
21 <dt> | 21 <dt> |
22 {{ result.verbose_name }}: {{ result.title|safe }} • {{ result.score }} | 22 {{ result.verbose_name }}: <a href="{{ result.object.get_absolute_url }}">{{ result.object.search_title }}</a> • ({{ result.score }}) |
23 </dt> | 23 </dt> |
24 <dd> | 24 <dd> |
25 {% highlight result.summary with query css_class "highlight" max_length 200 %} | 25 {% highlight result.object.search_summary with query css_class "highlight" max_length 200 %} |
26 </dd> | 26 </dd> |
27 {% endfor %} | 27 {% endfor %} |
28 </dl> | 28 </dl> |
29 {% else %} | |
30 <p>No results found for <em>{{ query }}</em>.</p> | |
29 {% endif %} | 31 {% endif %} |
30 | 32 |
31 {% if page.has_previous or page.has_next %} | 33 {% if page.has_previous or page.has_next %} |
32 <div> | 34 <div> |
33 {% if page.has_previous %}<a href="?q={{ query }}&page={{ page.previous_page_number }}">{% endif %}« Previous{% if page.has_previous %}</a>{% endif %} | 35 {% if page.has_previous %}<a href="?q={{ query }}&page={{ page.previous_page_number }}">{% endif %}« Previous{% if page.has_previous %}</a>{% endif %} |