2 #script to provide bookshelf management
3 # WARNING: This file uses 4-character tabs!
7 # Copyright 2000-2002 Katipo Communications
9 # This file is part of Koha.
11 # Koha is free software; you can redistribute it and/or modify it under the
12 # terms of the GNU General Public License as published by the Free Software
13 # Foundation; either version 2 of the License, or (at your option) any later
16 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
17 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
18 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
20 # You should have received a copy of the GNU General Public License along with
21 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
22 # Suite 330, Boston, MA 02111-1307 USA
30 use C4::Circulation::Circ2;
32 use C4::Interface::CGI::Output;
37 my $biblionumber = $query->param('biblionumber');
38 my $shelfnumber = $query->param('shelfnumber');
40 &AddToShelfFromBiblio($env, $biblionumber, $shelfnumber);
41 print "Content-Type: text/html\n\n<html><body onload=\"window.close()\"></body></html>";
45 my ( $bibliocount, @biblios ) = getbiblio($biblionumber);
46 my ($template, $loggedinuser, $cookie)
47 = get_template_and_user({template_name => "bookshelves/addbookbybiblionumber.tmpl",
51 flagsrequired => {catalogue => 1},
54 my ($shelflist) = GetShelfList($loggedinuser,3);
57 foreach my $element (sort keys %$shelflist) {
58 push (@shelvesloop, $element);
59 $shelvesloop{$element} = $shelflist->{$element}->{'shelfname'};
62 my $CGIbookshelves=CGI::scrolling_list( -name => 'shelfnumber',
63 -values => \@shelvesloop,
64 -labels => \%shelvesloop,
68 $template->param(biblionumber => $biblionumber,
69 title => $biblios[0]->{'title'},
70 author => $biblios[0]->{'author'},
71 CGIbookshelves => $CGIbookshelves,
74 output_html_with_http_headers $query, $cookie, $template->output;
77 # Revision 1.2 2004/11/19 16:31:30 tipaul
78 # bugfix for bookshelves not in official CVS
80 # Revision 1.1.2.2 2004/03/10 15:08:18 tipaul
81 # modifying shelves : introducing category of shelf : private, public, free for all
83 # Revision 1.1.2.1 2004/02/19 10:14:36 tipaul
84 # new feature : adding book to bookshelf from biblio detail screen.