Bug 9309 - Make OPACurlOpenInNewWindow be respected for 856$u
authorRobin Sheat <robin@catalyst.net.nz>
Thu, 20 Dec 2012 02:45:33 +0000 (15:45 +1300)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Wed, 16 Jan 2013 03:02:15 +0000 (22:02 -0500)
If a biblio record contained a URL, and the OPAC was using the "normal"
(non-XSLT) display for records, then these links would never open a new
window. With this patch, they will.

Test plan:
1) have a biblio containing an 856$u link
2) set OPACurlOpenInNewWindow to "true"
3) do not use XSLT for displaying the detail pages in the OPAC
4) view the record, click the link, and note that it opens in the
   current window.
5) apply the patch
6) reload the detail page, click the link, and note that it opens a new
   window.

Sponsored-By: National Institute of Water and Atmospheric Research
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt

index fa5ec3d..bee65c2 100644 (file)
@@ -479,7 +479,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
             <br />[% END %] 
         <!-- here you might do a tmpl_if name="toc" and use greybox or equivalent for table of contents -->
         
-        [% IF ( MARCurl.OPACurlOpenInNewWindow ) %]<a href="[% MARCurl.MARCURL %]" title="[% MARCurl.MARCURL %]" target="_blank">[% ELSE %]<a href="[% MARCurl.MARCURL %]" title="[% MARCurl.MARCURL %]">[% END %]
+        [% IF ( OPACURLOpenInNewWindow ) %]<a href="[% MARCurl.MARCURL %]" title="[% MARCurl.MARCURL %]" target="_blank">[% ELSE %]<a href="[% MARCurl.MARCURL %]" title="[% MARCurl.MARCURL %]">[% END %]
         
         [% MARCurl.linktext %]</a>
             [% IF ( MARCurl.notes ) %]<ul>[% FOREACH note IN MARCurl.notes %]<li>[% note.note %]</li>[% END %]</ul>[% END %]</li>