From 78eba3198694803caabe0377fc557d07cff1ae2b Mon Sep 17 00:00:00 2001 From: tonnesen Date: Wed, 26 Jun 2002 20:28:15 +0000 Subject: [PATCH] Some udpates that I made here locally a while ago. Still won't be useful, but should be functional --- shelves.pl | 64 ++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 57 insertions(+), 7 deletions(-) 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";
@@ -62,9 +61,60 @@ EOF print "\n"; } print "
$shelflist->{$_}->{'shelfname'} ($shelflist->{$_}->{'count'} books)
\n"; + print "

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"; +

+Modify Shelf Contents

+

Bookshelves

+ +
+
+ + + +EOF + my $color=''; + my $color=''; + foreach (sort keys %$shelflist) { + ($color eq $linecolor1) ? ($color=$linecolor2) : ($color=$linecolor1); + print "\n"; + } + print "
+Select Shelves to Delete +
$shelflist->{$_}->{'shelfname'} ($shelflist->{$_}->{'count'} books)
\n"; + print '

'; + print "

\n"; + print "\n"; + print "\n"; + print "

Add Shelf:

\n"; + print '

'; + print "\n"; + print "

\n"; +} + + + sub viewshelf { my $shelfnumber=shift; my ($itemlist) = GetShelfContents($env, $shelfnumber); @@ -116,14 +166,14 @@ EOF # # $Log$ -# Revision 1.2 2001/02/07 23:47:43 tonnesen -# Added header and log substition variables -# -# Revision 1.1 2001/02/07 20:27:16 tonnesen -# Start of code to implement virtual bookshelves in Koha. +# Revision 1.2.2.1 2002/06/26 20:28:15 tonnesen +# Some udpates that I made here locally a while ago. Still won't be useful, but +# should be functional # # # +print endpage(); +print endmenu('catalogue'); -- 2.39.5