Fridolin Somers
3bb7ea2dab
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> |
||
---|---|---|
.. | ||
detail.pl | ||
export.pl | ||
getitem-ajax.pl | ||
image.pl | ||
imageviewer.pl | ||
ISBDdetail.pl | ||
issuehistory.pl | ||
item-export.pl | ||
itemsearch.pl | ||
labeledMARCdetail.pl | ||
MARCdetail.pl | ||
moredetail.pl | ||
search-history.pl | ||
search.pl | ||
showelastic.pl | ||
showmarc.pl | ||
stockrotation.pl | ||
updateitem.pl |