From 754c2d1cad011bd0ce24897e0ae5c547d6ea3bc6 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Wed, 19 Oct 2011 16:11:56 +0200 Subject: [PATCH] 7064: TT error for OPACBaseURL in opac-sendshelf template Content-Type: text/plain; charset="utf-8" Change scope in the template for OPACBaseURL. Fill variable in the script. --- .../opac-tmpl/prog/en/modules/opac-sendshelf.tt | 2 +- opac/opac-sendshelf.pl | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendshelf.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendshelf.tt index 74317df..3af028c 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendshelf.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendshelf.tt @@ -33,7 +33,7 @@ Classification: [% BIBLIO_RESULT.classification %][% END %][% IF ( BIBLIO_RESULT LCCN: [% BIBLIO_RESULT.lccn %][% END %][% IF ( BIBLIO_RESULT.url ) %] url : [% BIBLIO_RESULT.url %][% END %] In the online catalog: -[% OPACBaseURL %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% BIBLIO_RESULT.biblionumber |url %] +http://[% BIBLIO_RESULT.OPACBaseURL %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% BIBLIO_RESULT.biblionumber |url %] Items : [% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %] [% ITEM_RESULT.branchname %] [% ITEM_RESULT.location %] [% IF ( ITEM_RESULT.itemcallnumber ) %]([% ITEM_RESULT.itemcallnumber %])[% END %] [% ITEM_RESULT.barcode %][% END %] diff --git a/opac/opac-sendshelf.pl b/opac/opac-sendshelf.pl index b571e07..daae64c 100755 --- a/opac/opac-sendshelf.pl +++ b/opac/opac-sendshelf.pl @@ -75,6 +75,7 @@ if ( $email ) { my @shelf = GetShelf($shelfid); my ($items, $totitems) = GetShelfContents($shelfid); my $marcflavour = C4::Context->preference('marcflavour'); + my $baseurl = C4::Context->preference('OPACBaseURL'); my $iso2709; my @results; @@ -95,6 +96,7 @@ if ( $email ) { $dat->{MARCAUTHORS} = $marcauthorsarray; $dat->{'biblionumber'} = $biblionumber; $dat->{ITEM_RESULTS} = \@items; + $dat->{OPACBaseURL} = $baseurl; $iso2709 .= $record->as_usmarc(); @@ -185,4 +187,4 @@ END_OF_BODY url => "/cgi-bin/koha/opac-sendshelf.pl", ); output_html_with_http_headers $query, $cookie, $template->output; -} \ No newline at end of file +} -- 1.6.0.6