diff 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
line wrap: on
line diff
--- a/gpp/templates/search/search.html	Sat Jun 05 20:46:52 2010 +0000
+++ b/gpp/templates/search/search.html	Sun Jun 06 20:06:15 2010 +0000
@@ -19,13 +19,15 @@
       <dl>
       {% for result in page.object_list %}
          <dt>
-            {{ result.verbose_name }}: {{ result.title|safe }} &bull; {{ result.score }}
+         {{ result.verbose_name }}: <a href="{{ result.object.get_absolute_url }}">{{ result.object.search_title }}</a> &bull; ({{ result.score }})
          </dt>
          <dd>
-            {% highlight result.summary with query css_class "highlight" max_length 200 %}
+            {% highlight result.object.search_summary with query css_class "highlight" max_length 200 %}
          </dd>
       {% endfor %}
       </dl>
+      {% else %}
+      <p>No results found for <em>{{ query }}</em>.</p>
       {% endif %}
 
       {% if page.has_previous or page.has_next %}