Bug 14790 - Add Opac view link to search results
authorKyle M Hall <kyle@bywatersolutions.com>
Wed, 15 Jun 2016 12:27:40 +0000 (12:27 +0000)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 8 Jul 2016 13:56:34 +0000 (13:56 +0000)
Test Plan:
1) Apply this patch
2) Perform a staff catalog search
3) Note the new "OPAC view" link
4) Click the link, it should open a new tab to the OPAC details for that
   record.

This works fine except that it doesn't open in a new tab. I don't think
it's the fault of the patch, but of browser.js messing with links again
(See Bug 11937).

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt

index dfdbf15..4da80da 100644 (file)
@@ -600,7 +600,11 @@ var holdForPatron = function () {
                           [% END %]
                           [% IF ( CAN_user_editcatalogue_edit_items ) %]
                           | <a href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]">Edit items</a>
-                          [% END %]</p>
+                          [% END %]
+                          <span class="view-in-opac">
+                            | <a href="[% Koha.Preference('OPACBaseURL') %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]" target="_blank">OPAC view</a>
+                          </span>
+                                </p>
                                 </td>
 
                                 <td><div class="availability">