From 0ef1e1a24ca0ecc53c81d2c1dae218004e7730b6 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Thu, 20 Feb 2020 12:10:57 +0000 Subject: [PATCH] Bug 24697: Split items.uri on staff detail view If there are more URIs, we split on vertical bar and show the real URL instead of duplicated text. Otherwise display depends on the pref URLLinkText. Test plan: Create item with uri = A | B | C Create another item with uri = D Check the results on staff detail view (items table). Signed-off-by: Bernardo Gonzalez Kriegel Signed-off-by: Jonathan Druart Signed-off-by: Martin Renvoize --- .../prog/en/modules/catalogue/detail.tt | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) 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 f164618fab..a477bb46fe 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -404,12 +404,16 @@ Note that permanent location is a code, and location may be an authval. [% item.dateaccessioned | $KohaDates %] [% item.barcode | html %] [% IF ( itemdata_uri ) %] - [% IF Koha.Preference('URLLinkText') %] - [% Koha.Preference('URLLinkText') | html %] - [% ELSIF item.uri %] - Link to resource + [% IF item.uri.split(' \| ').size > 1 %] + + [% FOREACH uri IN item.uri.split(' \| ') %][% uri | html %]
[% END %] + [% ELSE %] - + + [% IF item.uri %] + [% IF Koha.Preference('URLLinkText') %][% Koha.Preference('URLLinkText') | html %][% ELSE %]Link to resource[% END %] + [% END %] + [% END %] [% END %] [% IF ( itemdata_copynumber ) %] -- 2.39.5