Bugzilla – Attachment 98905 Details for
Bug 15352
Use URLLinkText instead of URL for item links
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15352: Do not display the link if item.uri does not exist
Bug-15352-Do-not-display-the-link-if-itemuri-does-.patch (text/plain), 4.89 KB, created by
Jonathan Druart
on 2020-02-14 08:49:41 UTC
(
hide
)
Description:
Bug 15352: Do not display the link if item.uri does not exist
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-02-14 08:49:41 UTC
Size:
4.89 KB
patch
obsolete
>From b148989b3b0dc96dcfd4e5a4f1e5a4243e14ff97 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 14 Feb 2020 09:48:48 +0100 >Subject: [PATCH] Bug 15352: Do not display the link if item.uri does not exist > >Otherwise there is a "Link to ressource" that points to the current url >--- > koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt | 4 +++- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 8 ++++---- > 2 files changed, 7 insertions(+), 5 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 90a8df5dc7..4ab9a27c8a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -406,8 +406,10 @@ Note that permanent location is a code, and location may be an authval. > [% IF ( itemdata_uri ) %] > [% IF Koha.Preference('URLLinkText') %] > <td class="uri"><a href="[% item.uri | url %]">[% Koha.Preference('URLLinkText') %]</a></td> >- [% ELSE %] >+ [% ELSIF item.uri %] > <td class="uri"><a href="[% item.uri | url %]">Link to resource</a></td> >+ [% ELSE %] >+ <td></td> > [% END %] > [% END %] > [% IF ( itemdata_copynumber ) %] >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 04ed3f0dc3..8c1c39e8f5 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -1349,13 +1349,13 @@ > [% 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 %]&biblionumber=[% biblio.biblionumber | html %]&itemnumber=[% ITEM_RESULT.itemnumber | url %]" property="url">[% Koha.Preference('URLLinkText') | html %]</a> >- [% ELSE %] >+ [% ELSIF ITEM_RESULT.uri %] > <a href="/cgi-bin/koha/tracklinks.pl?uri=[% ITEM_RESULT.uri | uri %]&biblionumber=[% biblio.biblionumber | uri %]&itemnumber=[% ITEM_RESULT.itemnumber | url %]" property="url">[% Koha.Preference('URLLinkText') | html %]</a> > [% END %] > [% ELSE %] > [% IF Koha.Preference("OPACURLOpenInNewWindow") %] > <a target="_blank" rel="noreferrer" href="[% ITEM_RESULT.uri | url %]" property="url">[% Koha.Preference('URLLinkText') | html %]</a> >- [% ELSE %] >+ [% ELSIF ITEM_RESULT.uri %] > <a href="[% ITEM_RESULT.uri | url %]" property="url">[% Koha.Preference('URLLinkText') | html %]</a> > [% END %] > [% END %] >@@ -1363,13 +1363,13 @@ > [% 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 %]&biblionumber=[% biblio.biblionumber | html %]&itemnumber=[% ITEM_RESULT.itemnumber | url %]" property="url">Link to resource</a> >- [% ELSE %] >+ [% ELSIF ITEM_RESULT.uri %] > <a href="/cgi-bin/koha/tracklinks.pl?uri=[% ITEM_RESULT.uri | uri %]&biblionumber=[% biblio.biblionumber | uri %]&itemnumber=[% ITEM_RESULT.itemnumber | url %]" property="url">Link to resource</a> > [% END %] > [% ELSE %] > [% IF Koha.Preference("OPACURLOpenInNewWindow") %] > <a target="_blank" rel="noreferrer" href="[% ITEM_RESULT.uri | url %]" property="url">Link to resource</a> >- [% ELSE %] >+ [% ELSIF ITEM_RESULT.uri %] > <a href="[% ITEM_RESULT.uri | url %]" property="url">Link to resource</a> > [% END %] > [% END %] >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 15352
:
45578
|
62347
|
62473
|
65335
|
98784
|
98828
|
98832
|
98901
| 98905 |
98927