Refactored BaseSearch/Result to use templates to render the title and content entries...
[philo.git] / philo / contrib / sobol / templates / sobol / search / _list.html
index a3d8108..99db761 100644 (file)
@@ -8,6 +8,27 @@
                }(jQuery));
        </script>
 {% endif %}
+{% if favored_results %}
+       <article class="search favored{% if ajax %} loading{% endif %}">
+               <header>
+                       <h1>Favored results</h1>
+               </header>
+               {% if not ajax %}
+               <dl>
+                       {% for search in searches %}
+                       {% for result in search.results %}
+                               {% if result.get_actual_url in favored_results %}
+                               {{ result }}
+                               {% endif %}
+                       {% endfor %}
+                       {% endfor %}
+                       {% if search.get_actual_more_results_url in favored_results %}
+                               <dt><a href="{{ search.more_results_url }}">More results for {{ search }}</a></dt>
+                       {% endif %}
+               </dl>
+               {% endif %}
+       </article>
+{% endif %}
 {% for search in searches %}
 <article {% if ajax %}class="search loading {{ search.slug }}" data-url="{{ search.ajax_api_url }}"{% else %}class="search {{ search.slug }}{% if not search.results %} empty{% endif %}"{% endif %}>
        <header>
@@ -23,7 +44,7 @@
                        </dl>
                        {% if search.has_more_results and search.more_results_url %}
                        <footer>
-                               <p><a href="?{{ search.more_results_querydict.urlencode }}">See more results</a></p>
+                               <p><a href="{{ search.more_results_url }}">See more results</a></p>
                        </footer>
                        {% endif %}
                {% else %}