Mercurial > public > sg101
view gpp/templates/search/search.html @ 224:76ad86454ce9
For #51, adding podcasts to Haystack search.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Tue, 08 Jun 2010 03:09:48 +0000 |
parents | a5fcf3d1b663 |
children | 8a46843c258f |
line wrap: on
line source
{% extends 'base.html' %} {% load highlight %} {% block title %}Search{% endblock %} {% block content %} <h2>Search <img src="{{ MEDIA_URL }}icons/magnifier.png" alt="Search" /></h2> <form method="get" action="."> <table> {{ form.as_table }} <tr> <td> </td> <td> <input type="submit" value="Search"> </td> </tr> </table> {% if query %} <h3>Results</h3> {% if page.object_list %} <dl> {% for result in page.object_list %} <dt> {{ result.verbose_name }}: <a href="{{ result.object.get_absolute_url }}">{{ result.object.search_title }}</a> ({{ result.score }}) </dt> <dd> {% 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 %} <div> {% if page.has_previous %}<a href="?q={{ query }}&page={{ page.previous_page_number }}">{% endif %}« Previous{% if page.has_previous %}</a>{% endif %} | {% if page.has_next %}<a href="?q={{ query }}&page={{ page.next_page_number }}">{% endif %}Next »{% if page.has_next %}</a>{% endif %} </div> {% endif %} {% else %} {# Show some example queries to run, maybe query syntax, something else? #} {% endif %} </form> {% endblock %}