From da1257f202fe0a6a4ddc5907c0b7dbb03e172015 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 Content-Type: text/plain; charset=utf-8 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: Marcel de Rooy --- .../intranet-tmpl/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..dcd200e90a 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.11.0