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 <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Aleisha Amohia 2020-02-13 00:37:43 +00:00 committed by Martin Renvoize
parent f9abd7d2ef
commit c0808108b4
Signed by: martin.renvoize
GPG key ID: 422B469130441A0F
2 changed files with 28 additions and 9 deletions

View file

@ -404,7 +404,11 @@ Note that permanent location is a code, and location may be an authval.
<td class="dateaccessioned"><span title="[% item.dateaccessioned | html %]">[% item.dateaccessioned | $KohaDates %]</span></td>
<td><a href="/cgi-bin/koha/catalogue/moredetail.pl?type=[% item.type | uri %]&amp;itemnumber=[% item.itemnumber | uri %]&amp;biblionumber=[% item.biblionumber | uri %]&amp;bi=[% item.biblioitemnumber | uri %]#item[% item.itemnumber | uri %]">[% item.barcode | html %]</a></td>
[% IF ( itemdata_uri ) %]
<td class="uri"><a href="[% item.uri | url %]">[% item.uri | html %]</a></td>
[% IF Koha.Preference('URLLinkText') %]
<td class="uri"><a href="[% item.uri | url %]">[% Koha.Preference('URLLinkText') %]</a></td>
[% ELSE %]
<td class="uri"><a href="[% item.uri | url %]">Link to resource</a></td>
[% END %]
[% END %]
[% IF ( itemdata_copynumber ) %]
<td class="copynumber">[% item.copynumber | html %]</td>

View file

@ -1345,18 +1345,33 @@
[% IF ( itemdata_uri ) %]
<td class="url">
[% IF ITEM_RESULT.uri %]
[% IF trackclicks == 'track' || trackclicks == 'anonymous' %]
[% IF Koha.Preference("OPACURLOpenInNewWindow") %]
<a target="_blank" rel="noreferrer" href="/cgi-bin/koha/tracklinks.pl?uri=[% ITEM_RESULT.uri | uri %]&amp;biblionumber=[% biblio.biblionumber | html %]&amp;itemnumber=[% ITEM_RESULT.itemnumber | url %]" property="url"> Link to resource </a>
[% IF Koha.Preference('URLLinkText') %]
[% IF trackclicks == 'track' || trackclicks == 'anonymous' %]
[% IF Koha.Preference("OPACURLOpenInNewWindow") %]
<a target="_blank" rel="noreferrer" href="/cgi-bin/koha/tracklinks.pl?uri=[% ITEM_RESULT.uri | uri %]&amp;biblionumber=[% biblio.biblionumber | html %]&amp;itemnumber=[% ITEM_RESULT.itemnumber | url %]" property="url">[% Koha.Preference('URLLinkText') %]</a>
[% ELSE %]
<a href="/cgi-bin/koha/tracklinks.pl?uri=[% ITEM_RESULT.uri | uri %]&amp;biblionumber=[% biblio.biblionumber | uri %]&amp;itemnumber=[% ITEM_RESULT.itemnumber | url %]" property="url">[% Koha.Preference('URLLinkText') %]</a>
[% END %]
[% ELSE %]
<a href="/cgi-bin/koha/tracklinks.pl?uri=[% ITEM_RESULT.uri | uri %]&amp;biblionumber=[% biblio.biblionumber | uri %]&amp;itemnumber=[% ITEM_RESULT.itemnumber | url %]" property="url"> Link to resource </a>
[% IF Koha.Preference("OPACURLOpenInNewWindow") %]
<a target="_blank" rel="noreferrer" href="[% ITEM_RESULT.uri | url %]" property="url">[% Koha.Preference('URLLinkText') %]</a>
[% ELSE %]
<a href="[% ITEM_RESULT.uri | url %]" property="url">[% Koha.Preference('URLLinkText') %]</a>
[% END %]
[% END %]
[% ELSE %]
[% IF Koha.Preference("OPACURLOpenInNewWindow") %]
<a target="_blank" rel="noreferrer" href="[% ITEM_RESULT.uri | url %]" property="url">[% ITEM_RESULT.uri | html %]</a>
[% IF trackclicks == 'track' || trackclicks == 'anonymous' %]
[% IF Koha.Preference("OPACURLOpenInNewWindow") %]
<a target="_blank" rel="noreferrer" href="/cgi-bin/koha/tracklinks.pl?uri=[% ITEM_RESULT.uri | uri %]&amp;biblionumber=[% biblio.biblionumber | html %]&amp;itemnumber=[% ITEM_RESULT.itemnumber | url %]" property="url">Link to resource</a>
[% ELSE %]
<a href="/cgi-bin/koha/tracklinks.pl?uri=[% ITEM_RESULT.uri | uri %]&amp;biblionumber=[% biblio.biblionumber | uri %]&amp;itemnumber=[% ITEM_RESULT.itemnumber | url %]" property="url">Link to resource</a>
[% END %]
[% ELSE %]
<a href="[% ITEM_RESULT.uri | url %]" property="url">[% ITEM_RESULT.uri | html %]</a>
[% IF Koha.Preference("OPACURLOpenInNewWindow") %]
<a target="_blank" rel="noreferrer" href="[% ITEM_RESULT.uri | url %]" property="url">Link to resource</a>
[% ELSE %]
<a href="[% ITEM_RESULT.uri | url %]" property="url">Link to resource</a>
[% END %]
[% END %]
[% END %]
[% END %]