From c0808108b42127a5c84026ea51f945ec9de81f22 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Thu, 13 Feb 2020 00:37:43 +0000 Subject: [PATCH] Bug 15352: Use URLLinkText instead of URL for item links Use the value in URLLinkText in 952$u, or if not set, use 'Link to resource'. Signed-off-by: Owen Leonard Signed-off-by: Jonathan Druart Signed-off-by: Martin Renvoize --- .../prog/en/modules/catalogue/detail.tt | 6 +++- .../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 05a6cb50e4..90a8df5dc7 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 9ab7a1017e..4d00917373 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.39.5