From 87717a672627ff5688294e654da2dfbe90a57a3b 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 Works as described, no errors. --- .../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 20bb32bb37..e2c7f5943b 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.17.1