From: Jérémy Fabre Date: Wed, 20 Jul 2016 09:49:20 +0000 (+0200) Subject: Search results base implementation X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=c428c102bde76bba79fdd9d007128d2a2357fda0;p=mezzo.git Search results base implementation --- diff --git a/app/templates/search_results.html b/app/templates/search_results.html index dd9129c2..1c5b62b4 100644 --- a/app/templates/search_results.html +++ b/app/templates/search_results.html @@ -9,47 +9,55 @@ {% endblock %} {% block breadcrumb_menu %} -
  • +
  • -
  • {% trans "Search Results" %}
  • + {% endblock %} {% block main %} -

    -{% if results.paginator.count == 0 %} -{% blocktrans %} -No results were found in {{ search_type }} matching your query: {{ query }} -{% endblocktrans %} -{% else %} -{% blocktrans with start=results.start_index end=results.end_index total=results.paginator.count %} -Showing {{ start }} to {{ end }} of {{ total }} results in {{ search_type }} matching your query: {{ query }} -{% endblocktrans %} -{% endif %} -

    - -
    -{% for result in results.object_list %} -{% with result.get_absolute_url as result_url %} -
    - {{ forloop.counter0|add:results.start_index }}) - {% if result_url %} - {{ result }} - {% else %} - {{ result }} - {% endif %} -
    - {% if result.description != result|stringformat:"s" %} -

    {{ result.description|truncatewords_html:20|safe }}

    - {% endif %} - {% if result_url %} - {% trans "read more" %} - {% endif %} -{% endwith %} -{% endfor %} +
    +
    +

    {% trans "Search Results" %}

    +
    -{% pagination_for results %} +
    +
    +

    + {% if results.paginator.count == 0 %} + {% blocktrans %} + No results were found in {{ search_type }} matching your query: {{ query }} + {% endblocktrans %} + {% else %} + {% blocktrans with start=results.start_index end=results.end_index total=results.paginator.count %} + Showing {{ start }} to {{ end }} of {{ total }} results in {{ search_type }} matching your query: {{ query }} + {% endblocktrans %} + {% endif %} +

    + + {% for result in results.object_list %} + {% with result.get_absolute_url as result_url %} +
    + {{ forloop.counter0|add:results.start_index }}) + {% if result_url %} + {{ result }} + {% else %} + {{ result }} + {% endif %} +
    + {% if result.description != result|stringformat:"s" %} +

    {{ result.description|truncatewords_html:20|safe }}

    + {% endif %} + {% if result_url %} + {% trans "read more" %} + {% endif %} + {% endwith %} + {% endfor %} + + {% pagination_for results %} +
    +
    {% endblock %}