From 5100defd9ee348b8593f2e2f638a03f0824cd092 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Thu, 13 Feb 2020 00:37:43 +0000 Subject: [PATCH] Bug 15352: (alternative patch) Use URLLinkText instead of URL for item links Use the value in URLLinkText in 952$u, or if not set, use 'Link to resource'. --- .../prog/en/modules/catalogue/detail.tt | 6 ++++- .../opac-tmpl/bootstrap/en/modules/opac-detail.tt | 31 ++++++++++++++++------ 2 files changed, 28 insertions(+), 9 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 05a6cb5..90a8df5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -404,7 +404,11 @@ Note that permanent location is a code, and location may be an authval. [% item.dateaccessioned | $KohaDates %] [% item.barcode | html %] [% IF ( itemdata_uri ) %] - [% item.uri | html %] + [% IF Koha.Preference('URLLinkText') %] + [% Koha.Preference('URLLinkText') %] + [% ELSE %] + Link to resource + [% END %] [% END %] [% IF ( itemdata_copynumber ) %] [% item.copynumber | html %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt index 9ab7a10..4d00917 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -1345,18 +1345,33 @@ [% IF ( itemdata_uri ) %] [% IF ITEM_RESULT.uri %] - [% IF trackclicks == 'track' || trackclicks == 'anonymous' %] - [% IF Koha.Preference("OPACURLOpenInNewWindow") %] - Link to resource + [% IF Koha.Preference('URLLinkText') %] + [% IF trackclicks == 'track' || trackclicks == 'anonymous' %] + [% IF Koha.Preference("OPACURLOpenInNewWindow") %] + [% Koha.Preference('URLLinkText') %] + [% ELSE %] + [% Koha.Preference('URLLinkText') %] + [% END %] [% ELSE %] - Link to resource + [% IF Koha.Preference("OPACURLOpenInNewWindow") %] + [% Koha.Preference('URLLinkText') %] + [% ELSE %] + [% Koha.Preference('URLLinkText') %] + [% END %] [% END %] - [% ELSE %] - [% IF Koha.Preference("OPACURLOpenInNewWindow") %] - [% ITEM_RESULT.uri | html %] + [% IF trackclicks == 'track' || trackclicks == 'anonymous' %] + [% IF Koha.Preference("OPACURLOpenInNewWindow") %] + Link to resource + [% ELSE %] + Link to resource + [% END %] [% ELSE %] - [% ITEM_RESULT.uri | html %] + [% IF Koha.Preference("OPACURLOpenInNewWindow") %] + Link to resource + [% ELSE %] + Link to resource + [% END %] [% END %] [% END %] [% END %] -- 2.1.4