[Koha-patches] [PATCH] Bug 9309 - Make OPACurlOpenInNewWindow be respected for 856$u

Robin Sheat robin at catalyst.net.nz
Thu Dec 20 03:51:56 CET 2012


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.
---
 koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt
index 763354d..485dea6 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt
@@ -478,7 +478,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>
-- 
1.7.9.5



More information about the Koha-patches mailing list