Bugzilla – Attachment 44541 Details for
Bug 14575
OPACURLOpenInNewWindow should apply to item-level urls too
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14575: Fix OPACURLOpenInNewWindow
Bug-14575-Fix-OPACURLOpenInNewWindow.patch (text/plain), 8.38 KB, created by
Jonathan Druart
on 2015-11-06 10:14:30 UTC
(
hide
)
Description:
Bug 14575: Fix OPACURLOpenInNewWindow
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-11-06 10:14:30 UTC
Size:
8.38 KB
patch
obsolete
>From fee1a586b76c77ed914b54ca1fd00c4a995ba6b8 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 4 Sep 2015 15:22:24 +0100 >Subject: [PATCH] Bug 14575: Fix OPACURLOpenInNewWindow > >There are some type fixed with this patch. > >This patch creates a TT var "target" to avoid c/p links. >--- > .../opac-tmpl/bootstrap/en/modules/opac-basket.tt | 2 +- > .../opac-tmpl/bootstrap/en/modules/opac-detail.tt | 38 ++++++++-------------- > 2 files changed, 14 insertions(+), 26 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt >index fb9234b..94d5e0b 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt >@@ -198,7 +198,7 @@ > [% FOREACH MARCurl IN BIBLIO_RESULT.MARCURLS %] > [% IF MARCurl.part %]<p>[% MARCurl.part %]</p>[% END %] > >- [% IF OPACurlOpenInNewWindow %] >+ [% IF OPACURLOpenInNewWindow %] > <a href="[% MARCurl.MARCURL %]" title="[% MARCurl.MARCURL %]" target="_blank">[% MARCurl.linktext %]</a> > [% ELSE %] > <a href="[% MARCurl.MARCURL %]" title="[% MARCurl.MARCURL %]">[% MARCurl.linktext %]</a> >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 3229b8c..e533184 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -37,6 +37,10 @@ > [% INCLUDE 'bodytag.inc' bodyid='opac-detail' bodyclass='scrollto' %] > [% INCLUDE 'masthead.inc' %] > >+[% IF OPACURLOpenInNewWindow %] >+ [% SET target = 'target="_blank" ' %] >+[% END %] >+ > <div class="main"> > <ul class="breadcrumb"> > <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">›</span></li> >@@ -53,7 +57,7 @@ > <div title="[% biblionumber |url %]" class="[% biblionumber %]" id="local-thumbnail-preview"></div> > [% END %] > [% IF ( OPACAmazonCoverImages ) %] >- [% IF ( OPACurlOpenInNewWindow ) %] >+ [% IF ( OPACURLOpenInNewWindow ) %] > <a href="http://www.amazon[% AmazonTld %]/gp/reader/[% normalized_isbn %]/ref=sib_dp_pt/002-7879865-0184864#reader-link" target="_blank"> > [% ELSE %] > <a href="http://www.amazon[% AmazonTld %]/dp/[% normalized_isbn %]"> >@@ -92,9 +96,9 @@ > [% IF ( BakerTaylorEnabled && bt_id ) %] > [% IF BakerTaylorBookstoreURL %] > [% IF ( OPACurlOpenInNewWindow ) %] >- <a href="https://[% BakerTaylorBookstoreURL |html %][% bt_id %]" target="_blank"><img alt="See Baker & Taylor" src="[% BakerTaylorImageURL |html %][% bt_id %]" /></a> >+ <a[% target %]href="https://[% BakerTaylorBookstoreURL |html %][% normalized_isbn %]" target="_blank"><img alt="See Baker & Taylor" src="[% BakerTaylorImageURL |html %][% normalized_isbn %]" /></a> > [% ELSE %] >- <a href="https://[% BakerTaylorBookstoreURL |html %][% bt_id %]"><img alt="See Baker & Taylor" src="[% BakerTaylorImageURL |html %][% bt_id %]" /></a> >+ <a[% target %]href="https://[% BakerTaylorBookstoreURL |html %][% normalized_isbn %]"><img alt="See Baker & Taylor" src="[% BakerTaylorImageURL |html %][% normalized_isbn %]" /></a> > [% END %] > [% ELSE %] > <img alt="See Baker & Taylor" src="[% BakerTaylorImageURL |html %][% bt_id %]" /> >@@ -339,18 +343,10 @@ > [% FOREACH MARCurl IN MARCURLS %] > <li>[% IF ( MARCurl.part ) %][% MARCurl.part %]<br />[% END %] > >- [% IF ( OPACurlOpenInNewWindow ) %] >- [% IF trackclicks == 'track' || trackclicks == 'anonymous' %] >- <a href="/cgi-bin/koha/tracklinks.pl?uri=[% MARCurl.MARCURL |url%]&biblionumber=[% biblionumber | url %]" title="[% MARCurl.MARCURL %]" target="_blank"> >- [% ELSE %] >- <a href="[% MARCurl.MARCURL %]" title="[% MARCurl.MARCURL %]" target="_blank"> >- [% END %] >+ [% IF trackclicks == 'track' || trackclicks == 'anonymous' %] >+ <a [% target %]href="/cgi-bin/koha/tracklinks.pl?uri=[% MARCurl.MARCURL |url%]&biblionumber=[% biblionumber | url %]" title="[% MARCurl.MARCURL %]"> > [% ELSE %] >- [% IF trackclicks == 'track' || trackclicks == 'anonymous' %] >- <a href="/cgi-bin/koha/tracklinks.pl?uri=[% MARCurl.MARCURL |url%]&biblionumber=[% biblionumber | url %]" title="[% MARCurl.MARCURL %]"> >- [% ELSE %] >- <a href="[% MARCurl.MARCURL %]" title="[% MARCurl.MARCURL %]"> >- [% END %] >+ <a [% target %]href="[% MARCurl.MARCURL %]" title="[% MARCurl.MARCURL %]"> > [% END %] > > [% MARCurl.linktext %]</a> >@@ -519,7 +515,7 @@ > [% IF ( BakerTaylorContentURL ) %] > <span class="results_summary"> > <span class="label">Enhanced content: </span> >- [% IF ( OPACurlOpenInNewWindow ) %]<a href="[% BakerTaylorContentURL |html %]" target="_blank">Content Cafe</a>[% ELSE %]<a href="[% BakerTaylorContentURL |html %]">Content Cafe</a>[% END %] >+ <a [% target %]href="[% BakerTaylorContentURL |html %]">Content Cafe</a> > </span> > [% END # / IF BakerTaylorContentURL %] > >@@ -1277,17 +1273,9 @@ > <td class="url"> > [% IF ITEM_RESULT.uri %] > [% IF trackclicks == 'track' || trackclicks == 'anonymous' %] >- [% IF Koha.Preference("OPACURLOpenInNewWindow") %] >- <a target="_blank" href="/cgi-bin/koha/tracklinks.pl?uri=[% ITEM_RESULT.uri | url %]&biblionumber=[% biblionumber |url %]&itemnumber=[% ITEM_RESULT.itemnumber | url %]" property="url"> Link to resource </a> >- [% ELSE %] >- <a href="/cgi-bin/koha/tracklinks.pl?uri=[% ITEM_RESULT.uri | url %]&biblionumber=[% biblionumber |url %]&itemnumber=[% ITEM_RESULT.itemnumber | url %]" property="url"> Link to resource </a> >- [% END %] >+ <a [% target %]href="/cgi-bin/koha/tracklinks.pl?uri=[% ITEM_RESULT.uri | url %]&biblionumber=[% biblionumber |url %]&itemnumber=[% ITEM_RESULT.itemnumber | url %]" property="url"> Link to resource </a> > [% ELSE %] >- [% IF Koha.Preference("OPACURLOpenInNewWindow") %] >- <a target="_blank" href="[% ITEM_RESULT.uri %]" property="url">[% ITEM_RESULT.uri %]</a> >- [% ELSE %] >- <a href="[% ITEM_RESULT.uri %]" property="url">[% ITEM_RESULT.uri %]</a> >- [% END %] >+ <a [% target %]href="[% ITEM_RESULT.uri %]" property="url">[% ITEM_RESULT.uri %]</a> > [% END %] > [% END %] > </td> >-- >2.1.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 14575
:
41104
|
42400
|
42405
|
42407
|
44541
|
44546
|
44641
|
44684
|
44685
|
44686
|
47864