diff --git a/shelves.pl b/shelves.pl index 094e689ab5..d954c09e91 100755 --- a/shelves.pl +++ b/shelves.pl @@ -3,8 +3,6 @@ # # $Header$ # -# Change log is at the bottom of the file -# use strict; use C4::Search; @@ -45,6 +43,7 @@ if ($query->param('modifyshelfcontents')) { SWITCH: { if ($query->param('viewshelf')) { viewshelf($query->param('viewshelf')); last SWITCH;} + if ($query->param('shelves')) { shelves(); last SWITCH;} print << "EOF";
| $shelflist->{$_}->{'shelfname'} ($shelflist->{$_}->{'count'} books) |
Add or Remove Book Shelves\n"; } + +sub shelves { + if (my $newshelf=$query->param('addshelf')) { + my ($status, $string) = AddShelf($env,$newshelf); + if ($status) { + print "$string
\n"; + } + } + foreach ($query->param()) { + if (/DEL-(\d+)/) { + my $delshelf=$1; + my ($status, $string) = RemoveShelf($env,$delshelf); + if ($status) { + print "$string
\n"; + } + } + } + my ($shelflist) = GetShelfList(); + print << "EOF"; +
+
| + | \n"; + print "\n"; + print " |