]> git.koha-community.org Git - koha.git/commit
Bug 14419: Expanding facets (Show more) performs a new search
authorNick Clemens <nick@bywatersolutions.com>
Tue, 2 Jul 2019 11:58:49 +0000 (11:58 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Thu, 4 Jul 2019 08:22:02 +0000 (09:22 +0100)
commit14e6375637590b644b39ca19c0f118dda7815cc1
treea98bf3d12dd4b13cb1efc7d2168b85302b6ec085
parent288cc505557fdcb167737f1894cee581526b4741
Bug 14419: Expanding facets (Show more) performs a new search

This patch removes the constraint of only passing 5 facets to the template unless the list is expanded, in fact, it removes the 'expanded' attribute from Search.pm
Now that all facets are passed to page it adds a 'show more' link at the bottom of lists and allows user to expand or collapse any facet set without reloading page.

Updated tests included.

To test:
1  - Perform an OPAC search that returns more than 5 of any given facet type
2  - Click the "Show more" link on the facets and see that the search is reloaded
3  - Apply patch
4  - Repeat search
5  - Note that you can click "Show more" without reloading page
6  - Test that page load is not greatly affected
7  - Ensure that all facet links function normally
8  - Ensure that facets are the same a prior to patch
9  - Repeat for staff client
10 - Prove t/Search.t

NOTE: This patch makes it much easier to see that there is an existing issue with marking the "active" facet.  Ending punctuation seems to confuse the matcher.

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
12 files changed:
C4/Search.pm
Koha/SearchEngine/Elasticsearch/QueryBuilder.pm
Koha/SearchEngine/Elasticsearch/Search.pm
catalogue/search.pl
koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt
koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt
opac/opac-detail.pl
opac/opac-search.pl
t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t
t/db_dependent/Search.t