From cf9e8cd1f1edb8fa5fccfcf431716496bd9cd559 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 20 Aug 2020 09:57:10 +0200 Subject: [PATCH] Bug 20502: Split URI on course detail view If there are more that one URIs for biblio or item, we should split the value. This patch reuses the same code as bug 24697. Test plan: Add one item to a course Add several URI for this item and for its biblio Show the course detail view The different URI of the item must be displayed Remove all URI for the item Show the course detail view The different URI of the biblio must be displayed Signed-off-by: Donna Bachowski --- .../prog/en/modules/course_reserves/course-details.tt | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt index 317a304a32..8028cd6e14 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt @@ -215,11 +215,19 @@ [% END %] - + [% IF (cr.item.uri) %] - Item URI + [% IF cr.item.uri.split(' \| ').size > 1 %] + [% FOREACH uri IN cr.item.uri.split(' \| ') %][% uri | html %]
[% END %] + [% ELSE %] + [% IF Koha.Preference('URLLinkText') %][% Koha.Preference('URLLinkText') | html %][% ELSE %]Link to resource[% END %] + [% END %] [% ELSIF (cr.biblioitem.url) %] - Record URL + [% IF cr.biblioitem.url.split(' \| ').size > 1 %] + [% FOREACH uri IN cr.biblioitem.url.split(' \| ') %][% uri | html %]
[% END %] + [% ELSE %] + [% IF Koha.Preference('URLLinkText') %][% Koha.Preference('URLLinkText') | html %][% ELSE %]Link to resource[% END %] + [% END %] [% END %] -- 2.11.0