1 package C4::Interface::FlagsCDK; #asummes C4/Interface/FlagsCDK
4 # Copyright 2000-2002 Katipo Communications
6 # This file is part of Koha.
8 # Koha is free software; you can redistribute it and/or modify it under the
9 # terms of the GNU General Public License as published by the Free Software
10 # Foundation; either version 2 of the License, or (at your option) any later
13 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
14 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
15 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License along with
18 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
19 # Suite 330, Boston, MA 02111-1307 USA
21 # FIXME - I'm pretty sure that this, along with the rest of the
22 # CDK-based stuff, is obsolete.
30 use vars qw($VERSION @ISA @EXPORT);
32 # set the version for version checking
36 @EXPORT = qw(&trapscreen &trapsnotes &reservesdisplay);
39 my ($env,$bornum,$borrower,$amount,$traps_set)=@_;
40 my $titlepanel = C4::InterfaceCDK::titlepanel($env,$env->{'sysarea'},"Borrower Flags");
42 #debug_msg($env,"owwing = $amount");
43 my $borpanel = C4::InterfaceCDK::borrowerbox($env,$borrower,$amount);
45 my $hght = @$traps_set+4;
46 my $flagsset = new Cdk::Scroll ('Title'=>"Act On Flag",
47 'List'=>\@$traps_set,'Height'=>$hght,'Width'=>15,
49 my $act =$flagsset->activate();
54 $action = @$traps_set[$act];
63 my ($env,$bornum,$borrower,$amount) = @_;
64 my $titlepanel = C4::InterfaceCDK::titlepanel($env,$env->{'sysarea'},"Borrower Notes");
65 my $borpanel = C4::InterfaceCDK::borrowerbox($env,$borrower,$amount);
67 my $notesbox = new Cdk::Mentry ('Label'=>"Notes: ",
68 'Width'=>40,'Prows'=>10,'Lrows'=>30,
69 'Lpos'=>"Top",'Xpos'=>"RIGHT",'Ypos'=>10);
70 my $ln = length($borrower->{'borrowernotes'});
73 my $y = substr($borrower->{'borrowernotes'},$x,1);
74 $notesbox->inject('Input'=>$y);
77 my $notes = $notesbox->activate();
78 if (!defined $notes) {
79 $notes = $borrower->{'borrowernotes'};
81 while (substr($notes,0,1) eq " ") {
83 if (length($notes) == 1) {
86 $temp = substr($notes,1,length($notes)-1);
98 my ($env,$borrower,$amount,$odues,$items) = @_;
99 my $titlepanel = C4::InterfaceCDK::titlepanel($env,$env->{'sysarea'},"Reserves Waiting");
100 my $borpanel = C4::InterfaceCDK::borrowerbox($env,$borrower,$amount);
104 while (@$items[$x] ne "") {
105 my $itemdata = @$items[$x];
106 my $itemrow = fmtstr($env,$itemdata->{'holdingbranch'},"L6");
107 $itemrow = $itemrow.$itemdata->{'title'}.": ".$itemdata->{'author'};
108 $itemrow = fmtstr($env,$itemrow,"L68").$itemdata->{'itemtype'};
109 @itemslist[$x] = $itemrow;
112 my $reslist = new Cdk::Scroll('Title'=>"",'List'=>\@itemslist,
113 'Height'=>10,'Width'=>76,'Xpos'=>1,'Ypos'=>10);
114 $reslist->activate();
120 END { } # module clean-up code here (global destructor)