From 6e169428453d0cf1eac841ae229371722add4caf 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 Content-Type: text/plain; charset=utf-8 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 Signed-off-by: Marcel de Rooy --- .../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 aed553c2fb..34a1198a4d 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