Skip to content

Commit

Permalink
Show the number of results returned in search (#383)
Browse files Browse the repository at this point in the history
* Show the number of results returned in search

* Fix typo
  • Loading branch information
Xpirix authored May 22, 2024
1 parent 0e58058 commit 8073926
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions qgis-app/templates/search/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ <h2>Search</h2>
</div>

{% if query %}
<h3>Search results</h3>
<h3>Search results for "{{query}}" ({{paginator.count}} items found)</h3>

{% for result in page.object_list %}
<p class="search-item">
Expand All @@ -58,9 +58,27 @@ <h3>Search results</h3>

{% if page.has_previous or page.has_next %}
<div class="pagination">
{% if page.has_previous %}<a href="?q={{ query }}&amp;page={{ page.previous_page_number }}">{% endif %}&laquo; Previous{% if page.has_previous %}</a>{% endif %}
{% if page.has_previous %}
<a href="?q={{ query }}&amp;page=1">
{% endif %}&laquo; First
{% if page.has_previous %}</a>{% endif %}
|
{% if page.has_next %}<a href="?q={{ query }}&amp;page={{ page.next_page_number }}">{% endif %}Next &raquo;{% if page.has_next %}</a>{% endif %}
{% if page.has_previous %}
<a href="?q={{ query }}&amp;page={{ page.previous_page_number }}">
{% endif %}Previous
{% if page.has_previous %}</a>{% endif %}
|
Page {{ page.number }} of {{ paginator.num_pages }}
|
{% if page.has_next %}
<a href="?q={{ query }}&amp;page={{ page.next_page_number }}">
{% endif %}Next
{% if page.has_next %}</a>{% endif %}
|
{% if page.has_next %}
<a href="?q={{ query }}&amp;page={{ paginator.num_pages }}">
{% endif %}Last &raquo;
{% if page.has_next %}</a>{% endif %}
</div>
{% endif %}
{% else %}
Expand Down

0 comments on commit 8073926

Please sign in to comment.