Skip to content

Commit

Permalink
correct hit count display when ajax search options use whoosh filters m…
Browse files Browse the repository at this point in the history
  • Loading branch information
RogerHaase committed Feb 15, 2025
1 parent 33b61b4 commit bc8bda2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/moin/templates/ajaxsearch.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{#
This template displays the result of a whoosh search. The initial report
is generated by an include within the search.html template. Subsequent
updates are made by ajax as the user selects search options or adds/delete
characters to the search query.
updates are made by ajax as the user clicks search options or adds/deletes
characters within the search query string.
#}

{%- if results is defined %}
Expand All @@ -28,6 +28,7 @@ <h4>{{ _("Please check these tickets if they cover your issue:") }}</h4>
</table>
</div>
{% endif %}

{% else %}
{# when user keys changes into long search form, updates to whoosh_query indicates conclusion of queued searches #}
<p class="moin-suggestions"> {{ _("Whoosh query:") }}
Expand All @@ -46,7 +47,7 @@ <h4>{{ _("Please check these tickets if they cover your issue:") }}</h4>
{%- if results is defined %}
<p class="moin-search-hits">
{%- if results.filtered_count %}
{%- set found = results|length - results.filtered_count %}
{%- set found = results|length %}
{{ _("{found:d} items found, {items_filtered:d} more items filtered by content types.").format(found=found, items_filtered=results.filtered_count) }}
{%- else %}
{{ _("{result_len:d} items found.").format(result_len=results|length) }}
Expand Down

0 comments on commit bc8bda2

Please sign in to comment.