From d84aef9ec5d6b7cba699225d08085c9bb1031cf7 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 10 Oct 2023 12:03:18 +0000 Subject: [PATCH] Bug 35006: OPAC holdings table - Fix sort for library columns This patch updates the holdings table on the OPAC's bibliographic detail page so that home and current library columns can be sorted correctly by library name. There have been changes to the way the template shows these values, but the DataTables "data-sort" attribute on the table cell had not been updated accordingly. To test, apply the patch set the OpacLocationBranchToDisplay system preference to "home and holding libraries." - Make sure home and holding library columns are not hidden in the table settings under Administration -> Table settings -> OPAC -> holdingst. - Locate a bibliographic record in the OPAC which has multiple items from different libraries. - Test that the home and current library columns sort correctly by library name. Signed-off-by: David Nind Signed-off-by: Nick Clemens --- .../bootstrap/en/modules/opac-detail.tt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt index b0dd34cf77..c62cda2726 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -1249,13 +1249,13 @@ [% END %] [% IF ( OpacLocationBranchToDisplay == 'holding' || OpacLocationBranchToDisplay == 'both' ) %] - + [%# Show opac_info or branchurl from holding library %] + [% SET holding_library_name = Branches.GetName( ITEM_RESULT.holdingbranch ) %] + [% SET holding_library_url = Branches.GetURL( ITEM_RESULT.holdingbranch ) %] + - [%# Show opac_info or branchurl from holding library %] - [% SET holding_library_name = Branches.GetName( ITEM_RESULT.holdingbranch ) %] - [% SET holding_library_url = Branches.GetURL( ITEM_RESULT.holdingbranch ) %] [% IF ( ITEM_RESULT.holding_library_info ) %] [% holding_library_name | html %] @@ -1276,13 +1276,13 @@ [% END %] [% IF ( OpacLocationBranchToDisplay == 'home' || OpacLocationBranchToDisplay == 'both' ) %] - + [%# Show opac_info or branchurl from home library %] + [% SET home_library_name = Branches.GetName( ITEM_RESULT.homebranch ) %] + [% SET home_library_url = Branches.GetURL( ITEM_RESULT.homebranch ) %] + - [%# Show opac_info or branchurl from home library %] - [% SET home_library_name = Branches.GetName( ITEM_RESULT.homebranch ) %] - [% SET home_library_url = Branches.GetURL( ITEM_RESULT.homebranch ) %] [% IF ( ITEM_RESULT.home_library_info ) %] [% home_library_name | html %] -- 2.30.2