[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/admin categorie.pl,1.6,1.7
From: |
Mike Hansen |
Subject: |
[Koha-cvs] CVS: koha/admin categorie.pl,1.6,1.7 |
Date: |
Fri, 04 Apr 2003 13:56:48 -0800 |
Update of /cvsroot/koha/koha/admin
In directory sc8-pr-cvs1:/tmp/cvs-serv17351/koha/admin
Modified Files:
categorie.pl
Log Message:
Templating...
Index: categorie.pl
===================================================================
RCS file: /cvsroot/koha/koha/admin/categorie.pl,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** categorie.pl 2 Apr 2003 09:47:52 -0000 1.6
--- categorie.pl 4 Apr 2003 21:56:44 -0000 1.7
***************
*** 42,45 ****
--- 42,48 ----
use C4::Output;
use C4::Search;
+ use HTML::Template;
+ use C4::Auth;
+ use C4::Interface::CGI::Output;
sub StringSearch {
***************
*** 81,85 ****
$template->param(script_name => $script_name,
! categorycode => $categorycode);
--- 84,89 ----
$template->param(script_name => $script_name,
! categorycode => $categorycode,
! searchfield => $searchfield);
***************
*** 109,113 ****
issuelimit =>
$data->{'issuelimit'},
reservefee =>
$data->{'reservefee'});
- }
# END $OP eq ADD_FORM
################## ADD_VALIDATE ##################################
--- 113,116 ----
***************
*** 148,171 ****
my $data=$sth2->fetchrow_hashref;
$sth2->finish;
- print mktablehdr;
- print mktablerow(2,'#99cc33',bold('Category
code'),bold("$categorycode"),'/images/background-mem.gif');
- print "<form action='$script_name' method=post><input type=hidden
name=op value=delete_confirmed><input type=hidden name=categorycode
value='$categorycode'>";
- print "<tr><td>Description</td><td>$data->{'description'}</td></tr>";
- print "<tr><td>Enrolment
period</td><td>$data->{'enrolmentperiod'}</td></tr>";
- print "<tr><td>Upperage
limit</td><td>$data->{'upperagelimit'}</td></tr>";
- print "<tr><td>Age
Required</td><td>$data->{'dateofbirthrequired'}</td></tr>";
- print "<tr><td>Fine type</td><td>$data->{'finetype'}</td></tr>";
- print "<tr><td>Bulk</td><td>$data->{'bulk'}</td></tr>";
- print "<tr><td>Enrolment fee</td><td>$data->{'enrolmentfee'}</td></tr>";
- print "<tr><td>Overdue notice
required</td><td>$data->{'overduenoticerequired'}</td></tr>";
- print "<tr><td>Issue limit</td><td>$data->{'issuelimit'}</td></tr>";
- print "<tr><td>Reserve fee</td><td>$data->{'reservefee'}</td></tr>";
if ($total->{'total'} >0) {
! print "<tr><td colspan=2 align=center><b>This record is used
$total->{'total'} times. Deletion not possible</b></td></tr>";
! print "<tr><td colspan=2></form><form action='$script_name'
method=post><input type=submit value=OK></form></td></tr>";
! } else {
! print "<tr><td colspan=2 align=center>CONFIRM
DELETION</td></tr>";
! print "<tr><td><INPUT type=submit
value='YES'></form></td><td><form action='$script_name' method=post><input
type=submit value=NO></form></td></tr>";
}
# END $OP eq DELETE_CONFIRM
################## DELETE_CONFIRMED ##################################
--- 151,170 ----
my $data=$sth2->fetchrow_hashref;
$sth2->finish;
if ($total->{'total'} >0) {
! $template->param(totalgtzero => 1);
}
+
+ $template->param(description => $data->{'description'},
+ enrolmentperiod =>
$data->{'enrolmentperiod'},
+ upperagelimit =>
$data->{'upperagelimit'},
+ dateofbirthrequired =>
$data->{'dateofbirthrequired'},
+ finetype =>
$data->{'finetype'},
+ bulk => $data->{'bulk'},
+ enrolmentfee =>
$data->{'enrolmentfee'},
+ overduenoticerequired =>
$data->{'overduenoticerequired'},
+ issuelimit =>
$data->{'issuelimit'},
+ reservefee =>
$data->{'reservefee'});
+
+
# END $OP eq DELETE_CONFIRM
################## DELETE_CONFIRMED ##################################
***************
*** 178,219 ****
$sth->execute;
$sth->finish;
- print "data deleted";
- print "<form action='$script_name' method=post>";
- print "<input type=submit value=OK>";
- print "</form>";
# END $OP eq DELETE_CONFIRMED
} else { # DEFAULT
! my @inputs=(["text","description",$searchfield],
! ["reset","reset","clr"]);
! print mkheadr(2,'Category admin');
! print mkformnotable("$script_name",@inputs);
! print <<printend
!
! printend
! ;
! if ($searchfield ne '') {
! print "You Searched for $searchfield<p>";
! }
! print mktablehdr;
! print
mktablerow(13,'#99cc33',bold('Category'),bold('Description'),bold('Enrolment'),bold('age
max')
! ,bold('birth
needed'),bold('Fine'),bold('Bulk'),bold('fee'),bold('overdue'),bold('Issue
limit'),bold('Reserve'),' ',' ','/images/background-mem.gif');
my $env;
my ($count,$results)=StringSearch($env,$searchfield,'web');
- my $toggle="white";
for (my $i=0; $i < $count; $i++){
! #find out stats
! # my
($od,$issue,$fines)=categdata2($env,$results->[$i]{'borrowernumber'});
! # $fines=$fines+0;
! if ($toggle eq 'white'){
! $toggle="#ffffcc";
! } else {
! $toggle="white";
! }
! print mktablerow(13,$toggle,$results->[$i]{'categorycode'},
! $results->[$i]{'description'},$results->[$i]{'enrolmentperiod'},
!
$results->[$i]{'upperagelimit'},$results->[$i]{'dateofbirthrequired'},$results->[$i]{'finetype'},
!
$results->[$i]{'bulk'},$results->[$i]{'enrolmentfee'},$results->[$i]{'overduenoticerequired'},$results->[$i]{'issuelimit'},$results->[$i]{'reservefee'},mklink("$script_name?op=add_form&categorycode=".$results->[$i]{'categorycode'},'Edit'),
!
mklink("$script_name?op=delete_confirm&categorycode=".$results->[$i]{'categorycode'},'Delete'));
}
--- 177,201 ----
$sth->execute;
$sth->finish;
# END $OP eq DELETE_CONFIRMED
} else { # DEFAULT
! $template->param(else => 1);
my $env;
+ my @loop;
my ($count,$results)=StringSearch($env,$searchfield,'web');
for (my $i=0; $i < $count; $i++){
! my %row = (categorycode => $results->[$i]{'categorycode'},
! description => $results->[$i]{'description'},
! enrolmentperiod =>
$results->[$i]{'enrolmentperiod'},
! upperagelimit =>
$results->[$i]{'upperagelimit'},
! dateofbirthrequired =>
$results->[$i]{'dateofbirthrequired'},
! finetype => $results->[$i]{'finetype'},
! bulk => $results->[$i]{'bulk'},
! enrolmentfee => $results->[$i]{'enrolmentfee'},
! overduenoticerequired =>
$results->[$i]{'overduenoticerequired'},
! issuelimit => $results->[$i]{'issuelimit'},
! reservefee => $results->[$i]{'reservefee'} );
! push @loop, \%row;
}
+ $template->param(loop => address@hidden);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/admin categorie.pl,1.6,1.7,
Mike Hansen <=