ENH: 3525 - Link to OPAC View from Staff Bib
authorNicole Engard <nce@liblime.com>
Wed, 12 Aug 2009 22:38:08 +0000 (17:38 -0500)
committerGalen Charlton <gmcharlt@gmail.com>
Thu, 13 Aug 2009 01:50:16 +0000 (21:50 -0400)
This patch adds a link to the OPAC view for a bib
record from the staff client so catalogers can
preview changes as the patrons see them.

This patch only shows the link is the OPACBaseURL
system preference has a value.

[RM note re bug 2152: this is probably enough to keep
 OPACBaseURL after all - the staff interface has
 no other way of reliably knowing where the OPAC
 is.]

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
catalogue/detail.pl
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl

index 716d65c..a24031e 100755 (executable)
@@ -268,4 +268,10 @@ if ( C4::Context->preference("AmazonEnabled") == 1 ) {
         $template->param( AMAZON_EDITORIAL_REVIEWS => $editorial_reviews      );
     }
 }
+
+# Get OPAC URL
+if (C4::Context->preference('OPACBaseURL')){
+     $template->param( OpacUrl => C4::Context->preference('OPACBaseURL') );
+}
+
 output_html_with_http_headers $query, $cookie, $template->output;
index cb9dae5..4bacb77 100644 (file)
@@ -100,6 +100,11 @@ function verify_images() {
             <!-- /TMPL_LOOP --></ul>
 </li>
     <!-- /TMPL_IF -->
+    <!-- TMPL_IF name="OpacUrl" -->
+       <li><strong>OPAC View:</strong>
+       <a href="http://<!-- TMPL_VAR name="OpacUrl" -->/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->" target="_blank">Open in new window</a>
+               </li>
+       <!-- /TMPL_IF -->
         </ul>
         </div>