From 591843ba6d769aa5dd0ad0faf12d55816326808f Mon Sep 17 00:00:00 2001 From: Jake Deery Date: Tue, 3 Mar 2026 11:43:07 +0000 Subject: [PATCH] Bug 14962: (QA follow-up) Make permenant location links for holdings table clearer This patch extends the links added to allow users to see the permenant location/ccode/homebranch/holdingbranch to cover the entire text, not just the font-awesome icon Sponsored-by: ByWater Solutions --- .../tables/items/catalogue_detail.inc | 28 +++++--- .../prog/en/modules/catalogue/detail.tt | 71 ++++++++++++++----- 2 files changed, 75 insertions(+), 24 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc index d26b329aee0..9ba9a148289 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc @@ -457,12 +457,15 @@ if (holding_library_id_str != effective_holding_library_id_str) { nodes += ''; nodes += ' '; + nodes += ' ' + escape_str(effective_holding_library_id_str || ''); nodes += ' '; + } else { + nodes += escape_str(effective_holding_library_id_str || ''); } + [% ELSE %] + nodes += escape_str(effective_holding_library_id_str || ''); [% END %] - nodes += escape_str(effective_holding_library_id_str || ''); - nodes = '' + nodes + ''; return nodes; } @@ -489,12 +492,15 @@ if (home_library_id_str != effective_home_library_id_str) { nodes += ''; nodes += ' '; + nodes += ' ' + escape_str(effective_home_library_id_str || ''); nodes += ' '; + } else { + nodes += escape_str(effective_home_library_id_str || ''); } + [% ELSE %] + nodes += escape_str(effective_home_library_id_str || ''); [% END %] - nodes += escape_str(effective_home_library_id_str || ''); - nodes = '' + nodes + ''; return nodes; } @@ -518,12 +524,15 @@ if (loc_str != effective_loc_str) { nodes += ''; nodes += ' '; + nodes += ' ' + escape_str(effective_loc_str || ''); nodes += ' '; + } else { + nodes += escape_str(effective_loc_str || ''); } + [% ELSE %] + nodes += escape_str(effective_loc_str || ''); [% END %] - nodes += escape_str(effective_loc_str || ''); - nodes = '' + nodes + ''; return nodes; } @@ -547,12 +556,15 @@ if (ccode_str != effective_ccode_str) { nodes += ''; nodes += ' '; + nodes += ' ' + escape_str(effective_ccode_str || ''); nodes += ' '; + } else { + nodes += escape_str(effective_ccode_str || ''); } + [% ELSE %] + nodes += escape_str(effective_ccode_str || ''); [% END %] - nodes += escape_str(effective_ccode_str || ''); - nodes = '' + nodes + ''; return nodes; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index 4f9abc2f4cc..3de2f133a23 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -2529,14 +2529,17 @@ let effective_holding_library_id_str = row._strings.effective_holding_library_id ? row._strings.effective_holding_library_id.str : row.effective_holding_library_id; let holding_library_id_str = row._strings.holding_library_id ? row._strings.holding_library_id.str : row.holding_library_id; - nodes += escape_str(effective_holding_library_id_str || ''); - [% IF Koha.Preference('UseDisplayModule') %] if (holding_library_id_str != effective_holding_library_id_str) { - nodes += ''; + nodes += ''; nodes += ' '; - nodes += ''; + nodes += ' ' + escape_str(effective_holding_library_id_str || ''); + nodes += ' '; + } else { + nodes += escape_str(effective_holding_library_id_str || ''); } + [% ELSE %] + nodes += escape_str(effective_holding_library_id_str || ''); [% END %] nodes = '' + nodes + ''; @@ -2554,13 +2557,25 @@ orderable: true, [% END %] render: function (data, type, row, meta) { - [% IF Koha.Preference('UseDisplayModule') %] + let nodes = ""; let effective_home_library_id_str = row._strings.effective_home_library_id ? row._strings.effective_home_library_id.str : row.effective_home_library_id; - return escape_str(effective_home_library_id_str || ''); - [% ELSE %] let home_library_id_str = row._strings.home_library_id ? row._strings.home_library_id.str : row.home_library_id; - return escape_str(home_library_id_str || ''); + + [% IF Koha.Preference('UseDisplayModule') %] + if (home_library_id_str != effective_home_library_id_str) { + nodes += ''; + nodes += ' '; + nodes += ' ' + escape_str(effective_home_library_id_str || ''); + nodes += ' '; + } else { + nodes += escape_str(effective_home_library_id_str || ''); + } + [% ELSE %] + nodes += escape_str(effective_home_library_id_str || ''); [% END %] + + nodes = '' + nodes + ''; + return nodes; } }, { @@ -2574,13 +2589,25 @@ orderable: true, [% END %] render: function (data, type, row, meta) { + let nodes = ""; + let effective_loc_str = row._strings.effective_location ? row._strings.effective_location.str : row.effective_location; + let loc_str = row._strings.location ? row._strings.location.str : row.location; + [% IF Koha.Preference('UseDisplayModule') %] - let loc_str = row._strings.effective_location ? row._strings.effective_location.str : row.effective_location; - return escape_str(effective_loc_str || ''); + if (loc_str != effective_loc_str) { + nodes += ''; + nodes += ' '; + nodes += ' ' + escape_str(effective_loc_str || ''); + nodes += ' '; + } else { + nodes += escape_str(effective_loc_str || ''); + } [% ELSE %] - let loc_str = row._strings.location ? row._strings.location.str : row.location; - return escape_str(loc_str || ''); + nodes += escape_str(effective_loc_str || ''); [% END %] + + nodes = '' + nodes + ''; + return nodes; } }, { @@ -2594,13 +2621,25 @@ orderable: true, [% END %] render: function (data, type, row, meta) { - [% IF Koha.Preference('UseDisplayModule') %] + let nodes = ""; let effective_ccode_str = row._strings.effective_collection_code ? row._strings.effective_collection_code.str : row.effective_collection_code; - return escape_str(effective_ccode_str || ''); - [% ELSE %] let ccode_str = row._strings.collection_code ? row._strings.collection_code.str : row.collection_code; - return escape_str(ccode_str || ''); + + [% IF Koha.Preference('UseDisplayModule') %] + if (ccode_str != effective_ccode_str) { + nodes += ''; + nodes += ' '; + nodes += ' ' + escape_str(effective_ccode_str || ''); + nodes += ' '; + } else { + nodes += escape_str(effective_ccode_str || ''); + } + [% ELSE %] + nodes += escape_str(effective_ccode_str || ''); [% END %] + + nodes = '' + nodes + ''; + return nodes; } }, { -- 2.50.1 (Apple Git-155)