Bugzilla – Attachment 194855 Details for
Bug 14962
Temp Shelving Location / On Display Module
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14962: (QA follow-up) Make permenant location links for holdings table clearer
591843b.patch (text/plain), 12.94 KB, created by
Jake Deery
on 2026-03-06 17:00:44 UTC
(
hide
)
Description:
Bug 14962: (QA follow-up) Make permenant location links for holdings table clearer
Filename:
MIME Type:
Creator:
Jake Deery
Created:
2026-03-06 17:00:44 UTC
Size:
12.94 KB
patch
obsolete
>From 591843ba6d769aa5dd0ad0faf12d55816326808f Mon Sep 17 00:00:00 2001 >From: Jake Deery <jake.deery@openfifth.co.uk> >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 += '<a href="javascript:void(0)" onClick="handlePermanentLocation(this)" data-header="' + _("Permanent holding branch") + '" data-body="' + holding_library_id_str + '">'; > nodes += ' <i class="fa fa-info-circle" aria-hidden="true"></i>'; >+ nodes += ' ' + escape_str(effective_holding_library_id_str || ''); > nodes += '</a> '; >+ } 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 = '<span>' + nodes + '</span>'; > return nodes; > } >@@ -489,12 +492,15 @@ > if (home_library_id_str != effective_home_library_id_str) { > nodes += '<a href="javascript:void(0)" onClick="handlePermanentLocation(this)" data-header="' + _("Permanent home branch") + '" data-body="' + home_library_id_str + '">'; > nodes += ' <i class="fa fa-info-circle" aria-hidden="true"></i>'; >+ nodes += ' ' + escape_str(effective_home_library_id_str || ''); > nodes += '</a> '; >+ } 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 = '<span>' + nodes + '</span>'; > return nodes; > } >@@ -518,12 +524,15 @@ > if (loc_str != effective_loc_str) { > nodes += '<a href="javascript:void(0)" onClick="handlePermanentLocation(this)" data-header="' + _("Permanent shelving location") + '" data-body="' + loc_str + '">'; > nodes += ' <i class="fa fa-info-circle" aria-hidden="true"></i>'; >+ nodes += ' ' + escape_str(effective_loc_str || ''); > nodes += '</a> '; >+ } else { >+ nodes += escape_str(effective_loc_str || ''); > } >+ [% ELSE %] >+ nodes += escape_str(effective_loc_str || ''); > [% END %] > >- nodes += escape_str(effective_loc_str || ''); >- > nodes = '<span>' + nodes + '</span>'; > return nodes; > } >@@ -547,12 +556,15 @@ > if (ccode_str != effective_ccode_str) { > nodes += '<a href="javascript:void(0)" onClick="handlePermanentLocation(this)" data-header="' + _("Permanent collection") + '" data-body="' + ccode_str + '">'; > nodes += ' <i class="fa fa-info-circle" aria-hidden="true"></i>'; >+ nodes += ' ' + escape_str(effective_ccode_str || ''); > nodes += '</a> '; >+ } else { >+ nodes += escape_str(effective_ccode_str || ''); > } >+ [% ELSE %] >+ nodes += escape_str(effective_ccode_str || ''); > [% END %] > >- nodes += escape_str(effective_ccode_str || ''); >- > nodes = '<span>' + nodes + '</span>'; > 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 += '<a href="javascript:void(0)" onClick="handlePermanentLocation(this)" data-header="Permanent holding branch" data-body="' + holding_library_id_str + '">'; >+ nodes += '<a href="javascript:void(0)" onClick="handlePermanentLocation(this)" data-header="' + _("Permanent holding branch") + '" data-body="' + holding_library_id_str + '">'; > nodes += ' <i class="fa fa-info-circle" aria-hidden="true"></i>'; >- nodes += '</a>'; >+ nodes += ' ' + escape_str(effective_holding_library_id_str || ''); >+ nodes += '</a> '; >+ } else { >+ nodes += escape_str(effective_holding_library_id_str || ''); > } >+ [% ELSE %] >+ nodes += escape_str(effective_holding_library_id_str || ''); > [% END %] > > nodes = '<span>' + nodes + '</span>'; >@@ -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 += '<a href="javascript:void(0)" onClick="handlePermanentLocation(this)" data-header="' + _("Permanent home branch") + '" data-body="' + home_library_id_str + '">'; >+ nodes += ' <i class="fa fa-info-circle" aria-hidden="true"></i>'; >+ nodes += ' ' + escape_str(effective_home_library_id_str || ''); >+ nodes += '</a> '; >+ } else { >+ nodes += escape_str(effective_home_library_id_str || ''); >+ } >+ [% ELSE %] >+ nodes += escape_str(effective_home_library_id_str || ''); > [% END %] >+ >+ nodes = '<span>' + nodes + '</span>'; >+ 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 += '<a href="javascript:void(0)" onClick="handlePermanentLocation(this)" data-header="' + _("Permanent shelving location") + '" data-body="' + loc_str + '">'; >+ nodes += ' <i class="fa fa-info-circle" aria-hidden="true"></i>'; >+ nodes += ' ' + escape_str(effective_loc_str || ''); >+ nodes += '</a> '; >+ } 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 = '<span>' + nodes + '</span>'; >+ 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 += '<a href="javascript:void(0)" onClick="handlePermanentLocation(this)" data-header="' + _("Permanent collection") + '" data-body="' + ccode_str + '">'; >+ nodes += ' <i class="fa fa-info-circle" aria-hidden="true"></i>'; >+ nodes += ' ' + escape_str(effective_ccode_str || ''); >+ nodes += '</a> '; >+ } else { >+ nodes += escape_str(effective_ccode_str || ''); >+ } >+ [% ELSE %] >+ nodes += escape_str(effective_ccode_str || ''); > [% END %] >+ >+ nodes = '<span>' + nodes + '</span>'; >+ return nodes; > } > }, > { >-- >2.50.1 (Apple Git-155) >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 14962
:
190216
|
190217
|
190218
|
190219
|
190220
|
190221
|
190222
|
190223
|
190224
|
190225
|
190226
|
190227
|
190228
|
190229
|
190230
|
190231
|
190232
|
190571
|
190572
|
193719
|
193720
|
193721
|
193722
|
193723
|
193724
|
193725
|
193726
|
193727
|
193728
|
193729
|
193730
|
193731
|
193732
|
193733
|
193734
|
193735
|
193736
|
193737
|
193738
|
193739
|
193740
|
193741
|
193742
|
193743
|
193744
|
193745
|
193746
|
193747
|
193748
|
193749
|
193750
|
193751
|
193752
|
193753
|
193754
|
193755
|
194285
|
194286
|
194287
|
194288
|
194289
|
194290
|
194291
|
194292
|
194293
|
194294
|
194295
|
194296
|
194297
|
194298
|
194299
|
194300
|
194301
|
194302
|
194303
|
194304
|
194305
|
194306
|
194307
|
194308
|
194309
|
194310
|
194311
|
194312
|
194313
|
194314
|
194315
|
194316
|
194317
|
194318
|
194320
|
194321
|
194322
|
194786
|
194795
|
194796
|
194797
|
194798
|
194799
|
194800
|
194801
|
194802
|
194803
|
194804
|
194805
|
194806
|
194807
|
194808
|
194809
|
194813
|
194814
|
194815
|
194816
|
194817
|
194818
|
194819
|
194820
|
194821
|
194822
|
194823
|
194824
|
194825
|
194826
|
194827
|
194828
|
194829
|
194830
|
194831
|
194832
|
194833
|
194834
|
194835
|
194836
|
194837
|
194838
|
194839
|
194840
|
194841
|
194842
|
194843
|
194844
|
194845
|
194846
|
194847
|
194848
|
194849
|
194850
|
194851
|
194852
|
194853
|
194854
| 194855 |
194856
|
194857
|
194858
|
194859
|
194860
|
194861
|
194862
|
194863
|
194864