Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mod_ginger_base: show in pager if result count is an estimate #714

Merged
merged 1 commit into from
Oct 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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) }}
cdfa marked this conversation as resolved.
Show resolved Hide resolved
{% 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