annotate gpp/templates/search/search.html @ 304:0231aad9e211

Fixing #123; removed the H1-H6 buttons from the markitup editor.
author Brian Neal <bgneal@gmail.com>
date Sat, 15 Jan 2011 21:11:50 +0000
parents 879d39647064
children 88b2b9cb8c1f
rev   line source
bgneal@219 1 {% extends 'base.html' %}
bgneal@219 2 {% load highlight %}
bgneal@219 3 {% block title %}Search{% endblock %}
bgneal@219 4 {% block content %}
bgneal@219 5 <h2>Search <img src="{{ MEDIA_URL }}icons/magnifier.png" alt="Search" /></h2>
bgneal@219 6 <form method="get" action=".">
bgneal@276 7 <table>
bgneal@276 8 <tr>
bgneal@279 9 <td><input type="text" name="q" id="id_q" size="48" class="text" /></td>
bgneal@276 10 <td><input type="submit" value="Search" /></td>
bgneal@276 11 </tr>
bgneal@276 12 </table>
bgneal@276 13 <fieldset>
bgneal@276 14 <legend>Search in:</legend>
bgneal@276 15 <table>
bgneal@276 16 <tr>
bgneal@276 17 <td><input type="checkbox" name="models" value="forums.post" checked="checked" />Forum Posts</td>
bgneal@276 18 <td><input type="checkbox" name="models" value="news.story" checked="checked" />News Stories</td>
bgneal@276 19 <td><input type="checkbox" name="models" value="bio.userprofile" checked="checked" />User Profiles</td>
bgneal@276 20 </tr>
bgneal@276 21 <tr>
bgneal@276 22 <td><input type="checkbox" name="models" value="weblinks.link" checked="checked" />Links</td>
bgneal@276 23 <td><input type="checkbox" name="models" value="downloads.download" checked="checked" />Downloads</td>
bgneal@276 24 <td><input type="checkbox" name="models" value="podcast.item" checked="checked" />Podcasts</td>
bgneal@276 25 </tr>
bgneal@276 26 </table>
bgneal@276 27 </fieldset>
bgneal@276 28
bgneal@219 29 {% if query %}
bgneal@277 30 <h3>Results for &quot;{{ query }}&quot; page {{ page.number }} of {{ page.paginator.num_pages }}</h3>
bgneal@277 31
bgneal@277 32 {% if page.paginator.count %}
bgneal@277 33 <p>
bgneal@277 34 <strong>{{ page.paginator.count }} hit{{ page.paginator.count|pluralize }}</strong>
bgneal@277 35 </p>
bgneal@277 36 {% endif %}
bgneal@277 37
bgneal@219 38 {% if page.object_list %}
bgneal@219 39 <dl>
bgneal@219 40 {% for result in page.object_list %}
bgneal@219 41 <dt>
bgneal@222 42 {{ result.verbose_name }}: <a href="{{ result.object.get_absolute_url }}">{{ result.object.search_title }}</a> ({{ result.score }})
bgneal@219 43 </dt>
bgneal@219 44 <dd>
bgneal@220 45 {% highlight result.object.search_summary with query css_class "highlight" max_length 200 %}
bgneal@219 46 </dd>
bgneal@219 47 {% endfor %}
bgneal@219 48 </dl>
bgneal@220 49 {% else %}
bgneal@220 50 <p>No results found for <em>{{ query }}</em>.</p>
bgneal@219 51 {% endif %}
bgneal@219 52
bgneal@219 53 {% if page.has_previous or page.has_next %}
bgneal@219 54 <div>
bgneal@219 55 {% if page.has_previous %}<a href="?q={{ query }}&amp;page={{ page.previous_page_number }}">{% endif %}&laquo; Previous{% if page.has_previous %}</a>{% endif %}
bgneal@219 56 |
bgneal@219 57 {% if page.has_next %}<a href="?q={{ query }}&amp;page={{ page.next_page_number }}">{% endif %}Next &raquo;{% if page.has_next %}</a>{% endif %}
bgneal@219 58 </div>
bgneal@219 59 {% endif %}
bgneal@219 60 {% else %}
bgneal@219 61 {# Show some example queries to run, maybe query syntax, something else? #}
bgneal@219 62 {% endif %}
bgneal@219 63 </form>
bgneal@219 64 {% endblock %}