Prettified results page. Added search results templates for grappelli and the normal...
[philo.git] / contrib / sobol / templates / admin / sobol / search / results.html
index e69de29..44d4e7c 100644 (file)
@@ -0,0 +1,47 @@
+{% extends "admin/base_site.html" %}
+{% load i18n %}
+
+{% block extrastyle %}<style type="text/css">.favored{font-weight:bold;}</style>{% endblock %}
+
+{% block breadcrumbs %}
+<div class="breadcrumbs">
+       {% if queryset|length > 1 %}
+       <a href="../../">{% trans "Home" %}</a> &rsaquo;
+       <a href="../">{{ app_label|capfirst }}</a> &rsaquo;
+       <a href="./">{{ opts.verbose_name_plural|capfirst }}</a> &rsaquo;
+       {% trans 'Search results for multiple objects' %}
+       {% else %}
+       <a href="../../../../">{% trans "Home" %}</a> &rsaquo;
+       <a href="../../../">{{ app_label|capfirst }}</a> &rsaquo; 
+       <a href="../../">{{ opts.verbose_name_plural|capfirst }}</a> &rsaquo;
+       <a href="../">{{ queryset|first|truncatewords:"18" }}</a> &rsaquo;
+       {% trans 'Results' %}
+       {% endif %}
+</div>
+{% endblock %}
+
+
+{% block content %}
+               {% for search in queryset %}
+               {% if not forloop.first and not forloop.last %}<h1>{{ search.string }}</h1>{% endif %}
+                       <fieldset class="module">
+                               <h2>{% blocktrans %}Results{% endblocktrans %}</h2>{% comment %}For the favored results, add a class?{% endcomment %}
+                               <table>
+                                       <thead>
+                                               <tr>
+                                                       <th>Weight</th>
+                                                       <th>URL</th>
+                                               </tr>
+                                       </thead>
+                                       <tbody>
+                                               {% for result in search.get_weighted_results %}
+                                               <tr{% if result in search.favored_results %} class="favored"{% endif %}>
+                                                       <td>{{ result.weight }}</td>
+                                                       <td>{{ result.url }}</td>
+                                               </tr>
+                                               {% endfor %}
+                                       </tbody>
+                               </table>
+                       </fieldset>
+               {% endfor %}
+{% endblock %}
\ No newline at end of file