Prettified results page. Added search results templates for grappelli and the normal...
[philo.git] / contrib / sobol / templates / admin / sobol / search / grappelli_results.html
index 28d5af7..45135ff 100644 (file)
@@ -3,13 +3,24 @@
 <!-- LOADING -->
 {% load i18n %}
 
+<!-- EXTRASTYLES -->
+{% block extrastyle %}<style type="text/css">.favored{font-weight:bold;}</style>{% endblock %}
+
 <!-- BREADCRUMBS -->
 {% block breadcrumbs %}
        <div id="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 %}
        <div class="container-grid delete-confirmation">
                {% for search in queryset %}
-               <h1>{{ search.string }}</h1>
-               <div class="module">
+               {% if not forloop.first and not forloop.last %}<h1>{{ search.string }}</h1>{% endif %}
+               <div class="group tabular">
                        <h2>{% blocktrans %}Results{% endblocktrans %}</h2>{% comment %}For the favored results, add a class?{% endcomment %}
-                       {% for result in search.get_weighted_results %}
-                       <div class="row cell-2">
-                               <div class="cell span-4">{{ result.url }}</div>
-                               <div class="cell span-flexible">{{ result.weight }}</div>
+                       <div class="module table">
+                               <div class="module thead">
+                                       <div class="tr">
+                                               <div class="th">Weight</div>
+                                               <div class="th">URL</div>
+                                       </div>
+                               </div>
+                               <div class="module tbody">
+                                       {% for result in search.get_weighted_results %}
+                                       <div class="tr{% if result in search.get_favored_results %} favored{% endif %}">
+                                               <div class="td">{{ result.weight }}</div>
+                                               <div class="td">{{ result.url }}</div>
+                                       </div>
+                                       {% endfor %}
+                               </div>
                        </div>
-                       {% endfor %}
                </div>
                {% endfor %}
        </div>