From 061805aa73d3d5b418a61fa6d6591d1a7d03d9ed Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 18 Oct 2014 18:28:26 -0500 Subject: FS#30773: put exact matches at top There have been a few proposed solutions to this, but there really isn't anything without a drawback. Things break pagination, require loading the entire result set from the database, etc. Just plop a new table on the page if someone did a so-called "simple" search and we have a match. Only show on the first page of the search results. This results in a relatively fast experience for someone doing something like searching for the "perl" package. Signed-off-by: Dan McGee --- templates/packages/search_paginator.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'templates/packages/search_paginator.html') diff --git a/templates/packages/search_paginator.html b/templates/packages/search_paginator.html index 4c2bef03..a748d26b 100644 --- a/templates/packages/search_paginator.html +++ b/templates/packages/search_paginator.html @@ -1,6 +1,6 @@
{% if is_paginated %} -

{{ paginator.count }} packages found. +

{{ paginator.count }} matching packages found. Page {{ page_obj.number }} of {{ paginator.num_pages }}.

@@ -22,6 +22,6 @@
{% else %} -

{{ package_list|length }} packages found.

+

{{ package_list|length }} matching package{{ package_list|pluralize }} found.

{% endif %}
-- cgit v1.2.3-54-g00ecf