From 8556c3f424120a8431bb3f10e0f6e710ee4ae6f9 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 Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 06d182bc82b40872970d99055c449d3c406724fa) Signed-off-by: Fridolin Somers (cherry picked from commit 4ebfdba0cb9513631c12454f81bcddc7228120a6) Signed-off-by: Matt Blenkinsop --- .../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 c10faffe13..3a4a257961 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -1260,13 +1260,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 %] @@ -1287,13 +1287,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.39.2