From be61becdf02e0ff6bed9ef9fadcbe1f311986bac 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. Signed-off-by: Jonathan Druart --- .../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 6ef518489b..5617968f6f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -402,12 +402,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.20.1