Skip to content

Commit

Permalink
mod_ginger_base: show in pager if result count is an estimate
Browse files Browse the repository at this point in the history
  • Loading branch information
mworrell committed Oct 11, 2022
1 parent e1df6e2 commit fa68fa7
Show file tree
Hide file tree
Showing 2 changed files with 129 additions and 75 deletions.
6 changes: 5 additions & 1 deletion modules/mod_ginger_base/templates/pager/pager.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<div id="{{ list_id }}-buttons" class="search__pager">
<div class="search__pager__result-counter">{% if items.total >= 30000 %}{_ More than 30000 results _} {% else %}{{ items.total }} {_ results _} {% endif %}</div>
<div class="search__pager__result-counter">
{% if items.is_total_estimated %}{{ _"About {n} results"|replace:"{n}":(items.total|round_significant|to_binary) }}
{% else %}{{ items.total }} {_ results _}
{% endif %}
</div>
<div class="do_search_cmp_pager search__pager__pagination">
{% pager result=items dispatch="search" qargs %}
</div>
Expand Down
Loading

0 comments on commit fa68fa7

Please sign in to comment.