Mercurial > public > sg101
annotate gpp/templates/weblinks/search_results.html @ 21:884839ddbfde
Webinks: added a navigation template tag so views don't have to keep constructing the searc form. Also provided a count of search results on the template.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 19 Apr 2009 21:00:06 +0000 |
parents | dbd703f7d63a |
children |
rev | line source |
---|---|
gremmie@1 | 1 {% extends 'weblinks/base.html' %} |
gremmie@1 | 2 {% block title %}Web Links: Search Results{% endblock %} |
gremmie@1 | 3 {% block weblinks_css %} |
gremmie@1 | 4 <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/pagination.css" /> |
gremmie@1 | 5 {% endblock %} |
gremmie@1 | 6 {% block weblinks_content %} |
bgneal@21 | 7 <h3>Search Results: {{ query }} - {{ page.paginator.count }} result{{ page.paginator.count|pluralize }}</h3> |
gremmie@1 | 8 |
gremmie@1 | 9 {% include 'core/pagination_query.html' %} |
gremmie@1 | 10 |
gremmie@1 | 11 {% if page.object_list %} |
gremmie@1 | 12 <dl> |
gremmie@1 | 13 {% for link in page.object_list %} |
gremmie@1 | 14 {% include 'weblinks/link.html' %} |
gremmie@1 | 15 {% endfor %} |
gremmie@1 | 16 </dl> |
gremmie@1 | 17 |
gremmie@1 | 18 {% include 'core/pagination_query.html' %} |
gremmie@1 | 19 |
gremmie@1 | 20 {% else %} |
gremmie@1 | 21 <p>No results found.</p> |
gremmie@1 | 22 {% endif %} |
gremmie@1 | 23 {% endblock %} |