From 53ea6d564f0718f3f79aa586143eb669288d4bb6 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 14 Oct 2025 10:33:04 +0200 Subject: [PATCH] Bug 30633: Prepare the ground Make the OPAC holdings table ready to use visibility based on column's names. Signed-off-by: Michaela --- .../bootstrap/en/modules/opac-detail.tt | 115 ++++++++++-------- 1 file changed, 63 insertions(+), 52 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 259ccfefb3..3e2e5ec465 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -1295,57 +1295,24 @@ Holdings - [% IF Koha.Preference('OPACLocalCoverImages') && ( tab == 'holdings' && itemloop_has_images || tab == 'otherholdings' && otheritemloop_has_images ) %] - Cover image - [% END %] - [% IF ( item_level_itypes ) %] - Item type - [% END %] - [% IF ( OpacLocationBranchToDisplay == 'holding' || OpacLocationBranchToDisplay == 'both' ) %] - Current library - [% END %] - [% IF ( OpacLocationBranchToDisplay == 'home' || OpacLocationBranchToDisplay == 'both' ) %] - Home library - [% END %] - [% IF ( itemdata_ccode ) %] - Collection - [% END %] - [% IF ( Koha.Preference('OpacLocationOnDetail') == 'column' && itemdata_location ) %] - Shelving location - [% END %] - [% IF ( itemdata_itemcallnumber ) %] - Call number - [% END %] - [% IF ( itemdata_materials ) %] - Materials specified - [% END %] - [% IF ( itemdata_enumchron ) %] - Vol info - [% END %] - [% IF ( itemdata_uri ) %] - URL - [% END %] - [% IF ( itemdata_copynumber ) %] - Copy number - [% END %] + Cover image + Item type + Current library + Home library + Collection + Shelving location + Call number + Materials specified + Vol info + URL + Copy number Status - [% IF ( itemdata_itemnotes ) %] - Notes - [% END %] - [% IF ( item_checkouts ) %] - Date due - [% END %] - [% IF ( itemdata_barcode ) %] - Barcode - [% END %] - [% IF item_level_holds > 0 %] - Item holds - [% ELSIF show_priority %] - Item hold queue priority - [% END %] - [% IF ( ShowCourseReservesHeader ) %] - Course reserves - [% END %] + Notes + Date due + Barcode + Item holds + Item hold queue priority + Course reserves @@ -1366,6 +1333,8 @@ + [% ELSE %] + [% END %] [% IF ( item_level_itypes ) %] @@ -1377,6 +1346,8 @@ [% END %] [% ITEM_RESULT.description | html %] + [% ELSE %] + [% END %] [% IF ( OpacLocationBranchToDisplay == 'holding' || OpacLocationBranchToDisplay == 'both' ) %] [%# Show opac_info or branchurl from holding library %] @@ -1400,6 +1371,8 @@ [% ITEM_RESULT.location_description | html %] [% END %] + [% ELSE %] + [% END %] [% IF ( OpacLocationBranchToDisplay == 'home' || OpacLocationBranchToDisplay == 'both' ) %] @@ -1424,14 +1397,20 @@ [% ITEM_RESULT.location_description | html %] [% END %] + [% ELSE %] + [% END %] [% IF ( itemdata_ccode ) %] [% ITEM_RESULT.ccode | html %] + [% ELSE %] + [% END %] [% IF ( Koha.Preference('OpacLocationOnDetail') == 'column' && itemdata_location ) %] [% ITEM_RESULT.location_description | html %] + [% ELSE %] + [% END %] [% IF ( itemdata_itemcallnumber ) %] @@ -1456,10 +1435,14 @@ [% END %] [% END %] + [% ELSE %] + [% END %] [% IF ( itemdata_materials ) %] [% ITEM_RESULT.materials | html %] + [% ELSE %] + [% END %] [% IF ( itemdata_enumchron ) %] @@ -1480,7 +1463,10 @@ ([% serial.publisheddate | $KohaDates %]) [% END %] + [% ELSE %] + [% END %] + [% IF ( itemdata_uri ) %] [% IF ITEM_RESULT.uri %] @@ -1522,16 +1508,34 @@ [% END %] [% END %] + [% ELSE %] + [% END # /IF itemdata_uri %] - [% IF ( itemdata_copynumber ) %][% ITEM_RESULT.copynumber | html %][% END %] + + [% IF ( itemdata_copynumber ) %] + [% ITEM_RESULT.copynumber | html %] + [% ELSE %] + + [% END %] + [% INCLUDE 'item-status.inc' item = ITEM_RESULT.object include_schema_org = 1 %] - [% IF ( itemdata_itemnotes ) %][% ITEM_RESULT.itemnotes | $raw %][% END %] + + [% IF ( itemdata_itemnotes ) %] + [% ITEM_RESULT.itemnotes | $raw %] + [% ELSE %] + + [% END %] + [% IF item_checkouts %] [% ITEM_RESULT.checkout.date_due | $KohaDates as_due_date => 1 %] + [% ELSE %] + [% END %] [% IF ( itemdata_barcode ) %] [% ITEM_RESULT.barcode | html %] + [% ELSE %] + [% END %] [% IF item_level_holds > 0 %] @@ -1545,8 +1549,13 @@ [% END %] [% END %] + [% ELSIF show_priority %] + [% priority | html %] + [% ELSE %] + + [% END %] [% IF ShowCourseReservesHeader %] @@ -1566,6 +1575,8 @@ [% END %] [% END %] + [% ELSE %] + [% END # /IF ShowCourseReservesHeader %] -- 2.39.5