Koha/koha-tmpl/intranet-tmpl/prog/en/modules
Fridolin Somers 3bb7ea2dab
Bug 33569: Fix sort by relevance in catalog search
When ordering catalog search by relevance from advanced search, this is not visible in sort order combobox in staff interface.

This is because sort by relevance is a special case not using sort
order.
This patch add a new method C4::Context->default_catalog_sort_by to use
in both staff interface and OPAC.

Test plan :
1.0) On staff interface
1.1) Define system preferences defaultSortField = 'relevance' and defaultSortOrder = 'descending'
1.2) Perform a catalog search from main page on any term, ie 'perl'
=> You see in sort combobox 'relevance' selected (with a check icon)
1.3) Perform an advanced search on any term, ie 'perl', with sort by relevance
=> Without patch : you see in sort combobox 'relevance' not selected (no check icon)
=> With patch : you see in sort combobox 'relevance' selected (with a check icon)
2.0) On OPAC
2.1) Define system preferences OPACdefaultSortField = 'relevance' and OPACdefaultSortOrder = 'descending'
2.2) Perform a catalog search from main page on any term, ie 'perl'
=> You see in sort combobox 'relevance' selected
3.0) Run prove t/Context.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-09 11:46:47 -03:00
..
acqui Bug 33104: Remove fieldset 2023-05-05 10:18:51 -03:00
admin Bug 33673: Change "global system preferences" to "system preferences" 2023-05-09 10:58:01 -03:00
authorities Bug 33185: Use template wrapper for tabs on authority and biblio MARC details 2023-04-13 11:48:07 -03:00
basket Bug 33160: (QA follow-up) Adjust condition on biblio object 2023-04-06 09:47:24 -03:00
batch
catalogue Bug 33569: Fix sort by relevance in catalog search 2023-05-09 11:46:47 -03:00
cataloguing Bug 33591: Restore auto-select of checkboxes of src record when merging 2023-05-09 10:58:03 -03:00
circ Bug 33597: (follow-up) Two other occurrences for holdfor 2023-05-05 09:13:30 -03:00
clubs Bug 33382: Use template wrapper for breadcrumbs: Patron clubs 2023-04-12 11:43:16 -03:00
course_reserves Bug 33383: Use template wrapper for breadcrumbs: Course reserves 2023-04-12 09:27:07 -03:00
erm Bug 33408: Remove obsolete tests and template sys pref code 2023-04-13 11:48:02 -03:00
errors Bug 32973: Use template wrapper for breadcrumbs: about, main, and error page 2023-02-27 11:39:31 -03:00
ill Bug 22440: New ILL requests table 2023-05-05 09:13:41 -03:00
installer Bug 28267: Add warnings for database row formats 2023-05-05 10:18:35 -03:00
labels Bug 32955: Standardize structure around action fieldsets in various templates 2023-04-14 11:35:27 -03:00
mana
members Bug 31448: Replace 'Print' with 'Receipt' dropdown 2023-05-05 10:18:45 -03:00
offline_circ Bug 32955: Standardize structure around action fieldsets in various templates 2023-04-14 11:35:27 -03:00
onboarding
patron_lists Bug 33409: Use template wrapper for breadcrumbs: Patrons lists 2023-04-12 09:27:02 -03:00
patroncards Bug 32955: Standardize structure around action fieldsets in various templates 2023-04-14 11:35:27 -03:00
plugins Bug 33336: Use a dedicated column for plugin status in plugins table 2023-04-13 11:47:58 -03:00
pos Bug 32955: Standardize structure around action fieldsets in various templates 2023-04-14 11:35:27 -03:00
recalls Bug 32688: Convert recalls awaiting pickup tabs to Bootstrap 2023-01-30 12:21:34 -03:00
reports Bug 33513: Remove whitespace in batch report lists 2023-05-09 10:58:02 -03:00
reserve Bug 33577: Add btn class to cancel hold button on /reserve/request.pl 2023-04-24 10:43:38 -03:00
reviews Bug 32182: Replace static tabs markup with Bootstrap 2022-11-16 09:35:14 -03:00
rotating_collections Bug 33555: Use template wrapper for breadcrumbs: Rotating collections 2023-04-21 10:36:22 -03:00
serials Bug 33564: Use template wrapper for breadcrumbs: Serials part 3 2023-05-05 09:13:27 -03:00
services
suggestion Bug 33310: Use template wrapper for tabs: Suggestions 2023-04-21 10:36:24 -03:00
tags Bug 33565: Use template wrapper for breadcrumbs: Tags 2023-04-24 10:43:35 -03:00
test
tools Bug 33601: Use template wrapper for breadcrumbs: Tools, part 8 2023-05-09 10:57:58 -03:00
virtualshelves Bug 33307: Use template wrapper for tabs: Lists 2023-04-13 11:48:10 -03:00
about.tt Bug 28267: Add warnings for database row formats 2023-05-05 10:18:35 -03:00
auth.tt Bug 32217: Fixed typo in error message for authentication providers 2023-03-30 12:09:39 +02:00
intranet-main.tt Bug 33133: Add fast cataloging to 'Cataloging' page 2023-03-27 12:50:07 +02:00