Bug 6759: Update existing accountlines for 'A'
[koha.git] / opac / svc / shelfbrowser.pl
blob2b24a0e3aa8172337ecd7592c9931dcac73ead95
1 #!/usr/bin/perl
3 use Modern::Perl;
4 use CGI qw ( -utf8 );
6 use C4::Auth;
7 use C4::Context;
8 use C4::Output;
9 use C4::ShelfBrowser;
11 my $cgi = new CGI;
13 my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
15 template_name => "svc/shelfbrowser.tt",
16 query => $cgi,
17 type => "opac",
18 authnotrequired => ( C4::Context->preference("OpacPublic") ? 1 : 0 ),
22 # Shelf Browser Stuff
23 if (C4::Context->preference("OPACShelfBrowser")) {
24 my $starting_itemnumber = $cgi->param('shelfbrowse_itemnumber');
25 if (defined($starting_itemnumber)) {
26 my $nearby = GetNearbyItems($starting_itemnumber);
28 $template->param(
29 starting_homebranch => $nearby->{starting_homebranch}->{description},
30 starting_location => $nearby->{starting_location}->{description},
31 starting_ccode => $nearby->{starting_ccode}->{description},
32 shelfbrowser_prev_item => $nearby->{prev_item},
33 shelfbrowser_next_item => $nearby->{next_item},
34 shelfbrowser_items => $nearby->{items},
35 OpenOPACShelfBrowser => 1,
40 output_html_with_http_headers $cgi, $cookie, $template->output;