[Koha-cvs] CVS: koha/bookshelves addbookbybiblionumber.pl,1.2,1.3 shelves.pl,1.3,1.4
Paul POULAIN
tipaul at users.sourceforge.net
Wed Dec 15 18:28:56 CET 2004
Update of /cvsroot/koha/koha/bookshelves
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13519/bookshelves
Modified Files:
addbookbybiblionumber.pl shelves.pl
Log Message:
adding bookshelf features :
* create bookshelf on the fly
* modify a bookshelf (this being not finished, will commit the rest soon)
Index: addbookbybiblionumber.pl
===================================================================
RCS file: /cvsroot/koha/koha/bookshelves/addbookbybiblionumber.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** addbookbybiblionumber.pl 19 Nov 2004 16:31:30 -0000 1.2
--- addbookbybiblionumber.pl 15 Dec 2004 17:28:22 -0000 1.3
***************
*** 37,40 ****
--- 37,54 ----
my $biblionumber = $query->param('biblionumber');
my $shelfnumber = $query->param('shelfnumber');
+ my $newbookshelf = $query->param('newbookshelf');
+ my $category = $query->param('category');
+
+ my ($template, $loggedinuser, $cookie)
+ = get_template_and_user({template_name => "bookshelves/addbookbybiblionumber.tmpl",
+ query => $query,
+ type => "intranet",
+ authnotrequired => 0,
+ flagsrequired => {catalogue => 1},
+ });
+
+ my $x; # for trash
+ ($x,$x,$shelfnumber) = AddShelf('',$newbookshelf,$loggedinuser,$category) if $newbookshelf;
+
if ($shelfnumber) {
&AddToShelfFromBiblio($env, $biblionumber, $shelfnumber);
***************
*** 44,54 ****
my ( $bibliocount, @biblios ) = getbiblio($biblionumber);
- my ($template, $loggedinuser, $cookie)
- = get_template_and_user({template_name => "bookshelves/addbookbybiblionumber.tmpl",
- query => $query,
- type => "intranet",
- authnotrequired => 0,
- flagsrequired => {catalogue => 1},
- });
my ($shelflist) = GetShelfList($loggedinuser,3);
--- 58,61 ----
***************
*** 75,78 ****
--- 82,90 ----
}
# $Log$
+ # Revision 1.3 2004/12/15 17:28:22 tipaul
+ # adding bookshelf features :
+ # * create bookshelf on the fly
+ # * modify a bookshelf (this being not finished, will commit the rest soon)
+ #
# Revision 1.2 2004/11/19 16:31:30 tipaul
# bugfix for bookshelves not in official CVS
Index: shelves.pl
===================================================================
RCS file: /cvsroot/koha/koha/bookshelves/shelves.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** shelves.pl 2 Dec 2004 16:38:50 -0000 1.3
--- shelves.pl 15 Dec 2004 17:28:23 -0000 1.4
***************
*** 67,70 ****
--- 67,71 ----
circbackgroundcolor => $circbackgroundcolor });
SWITCH: {
+ if ($query->param('op') eq 'modif') { editshelf($query->param('shelf')); last SWITCH;}
if ($query->param('viewshelf')) { viewshelf($query->param('viewshelf')); last SWITCH;}
if ($query->param('shelves')) { shelves(); last SWITCH;}
***************
*** 81,84 ****
--- 82,86 ----
$line{'shelf'}=$element;
$line{'shelfname'}=$shelflist->{$element}->{'shelfname'};
+ $line{'mine'} = 1 if $shelflist->{$element}->{'owner'} eq $loggedinuser;
$line{'shelfbookcount'}=$shelflist->{$element}->{'count'};
$line{'canmanage'} = ShelfPossibleAction($loggedinuser,$element,'manage');
***************
*** 90,93 ****
--- 92,103 ----
output_html_with_http_headers $query, $cookie, $template->output;
+ sub editshelf {
+ my ($shelfnumber) = @_;
+ my ($shelfnumber,$shelfname,$owner,$category) = GetShelf($shelfnumber);
+ warn "($shelfnumber,$shelfname,$owner,$category)";
+ $template->param(edit => 1,
+ shelfname => $shelfname,
+ "category$category" => 1);
+ }
sub shelves {
if (my $newshelf=$query->param('addshelf')) {
***************
*** 158,161 ****
--- 168,176 ----
#
# $Log$
+ # Revision 1.4 2004/12/15 17:28:23 tipaul
+ # adding bookshelf features :
+ # * create bookshelf on the fly
+ # * modify a bookshelf (this being not finished, will commit the rest soon)
+ #
# Revision 1.3 2004/12/02 16:38:50 tipaul
# improvement in book shelves
More information about the Koha-cvs
mailing list