Bug 33217: Allow specifiying sort field and order for authro links
authorNick Clemens <nick@bywatersolutions.com>
Mon, 13 Mar 2023 19:45:49 +0000 (19:45 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Wed, 8 Nov 2023 20:52:40 +0000 (17:52 -0300)
commit4b71a85e13ce88d1e6a84be35d0be6d3b27eecbe
treec0c397cd4016d51129fc565bb67c38a7c9b2deda
parent51ef0f688eaf90031321e7b573780b81fccbfda4
Bug 33217: Allow specifiying sort field and order for authro links

When using the facets for author, i.e. limiting a search, it makes sense to preserve the default sort order for the results (relevance, etc)

When clicking on an author to search the catalog for all works by an author, it would be nice to be able to optionally specify sorting for the listing - i.e. publication date, or title

This patch adds two new system preferences:
AuthorLinkSortBy
AuthorLinkSortOrder

To test:
1 - Do a search in intranet and staff for 'austen'
    or an author you have multiple titles from
2 - Click the linked name
3 - Note a new search is performed, sorted by field from
    defaultSortField  preference
4 - Apply patch, updatedatabase, restart_all
5 - Ensure nothing has changed by searching again
6 - Set AuthorLinkSortBy to 'date of publication' and
    AuthorLinkSortORder to asc
7 - Search again, comfirm links obey sorting specific above
8 - Test other values - confirm links are updated in both staff/opac
    and results/details

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
C4/XSLT.pm
installer/data/mysql/mandatory/sysprefs.sql
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref
koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl
koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl
koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl
koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl