[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/circ selectbranchprinter.pl,1.6,1.7
From: |
Henri-Damien LAURENT |
Subject: |
[Koha-cvs] CVS: koha/circ selectbranchprinter.pl,1.6,1.7 |
Date: |
Thu, 23 Jan 2003 03:29:15 -0800 |
Update of /cvsroot/koha/koha/circ
In directory sc8-pr-cvs1:/tmp/cvs-serv13048
Modified Files:
selectbranchprinter.pl
Log Message:
Templating : selectbranchprinter.pl
Index: selectbranchprinter.pl
===================================================================
RCS file: /cvsroot/koha/koha/circ/selectbranchprinter.pl,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** selectbranchprinter.pl 24 Oct 2002 18:30:18 -0000 1.6
--- selectbranchprinter.pl 23 Jan 2003 11:29:13 -0000 1.7
***************
*** 23,27 ****
--- 23,29 ----
use C4::Circulation::Circ2;
use C4::Output;
+ use C4::Auth;
use C4::Print;
+ use HTML::Template;
use DBI;
***************
*** 69,120 ****
my $branchcount=0;
my $printercount=0;
! my $branchoptions;
! my $printeroptions;
foreach (keys %$branches) {
(next) unless ($_);
(next) unless ($branches->{$_}->{'IS'});
$branchcount++;
! my $selected='';
! ($selected='selected') if ($_ eq $oldbranch);
! $branchoptions.="<option value=$_
$selected>$branches->{$_}->{'branchname'}\n";
}
foreach (keys %$printers) {
(next) unless ($_);
$printercount++;
! my $selected='';
! ($selected='selected') if ($_ eq $oldprinter);
! $printeroptions.="<option value=$_
$selected>$printers->{$_}->{'printername'}\n";
}
# if there is only one....
!
if ($printercount==1) {
($printer)=keys %$printers;
}
if ($branchcount==1) {
($branch)=keys %$branches;
}
- # set up printer and branch selection forms....
- my ($printerform, $branchform);
- if ($printercount>1) {
- $printerform=<<"EOF";
- <select name=printer> $printeroptions </select>
- EOF
- } else {
- my ($printer) = keys %$printers;
- $printerform.="Printer: ".$printers->{$printer}->{printername};
- }
-
- if ($branchcount>1) {
- $branchform=<<"EOF";
- <select name=branch> $branchoptions </select>
- EOF
- } else {
- my ($branch) = keys %$branches;
- $branchform.= "Branch: ".$branches->{$branch}->{branchname};
- }
-
-
#############################################################################################
--- 71,108 ----
my $branchcount=0;
my $printercount=0;
! my @branchloop;
foreach (keys %$branches) {
(next) unless ($_);
(next) unless ($branches->{$_}->{'IS'});
$branchcount++;
! my %branch;
! $branch{selected}=($_ eq $oldbranch);
! $branch{name}=$branches->{$_}->{'branchname'};
! $branch{value}=$_;
! push(@branchloop,\%branch);
}
+ my @printerloop;
foreach (keys %$printers) {
(next) unless ($_);
$printercount++;
! my %printer;
! $printer{selected}=($_ eq $oldprinter);
! $printer{name}=$printers->{$_}->{'printername'};
! $printer{value}=$_;
! push(@printerloop,\%printer);
}
# if there is only one....
! my $oneprinter=($printercount==1) ;
! my $onebranch=($branchcount==1) ;
if ($printercount==1) {
($printer)=keys %$printers;
+ $printername=$printers->{$printer}->{printername};
}
if ($branchcount==1) {
($branch)=keys %$branches;
+ $branchname=$branches->{$branch}->{branchname};
}
#############################################################################################
***************
*** 122,154 ****
# set header with cookie....
! print $query->header();
!
! print startpage();
! print startmenu('circulation');
!
! print << "EOF";
! <FONT SIZE=6><em>Circulation: Select Printer and Branch
Settings</em></FONT><br>
!
! <center>
! <form method=post action=/cgi-bin/koha/circ/circulation.pl>
! <table border=1 cellpadding=5 cellspacing=0>
! <tr><td colspan=2 bgcolor=$headerbackgroundcolor align=center
background=$backgroundimage>
! <font color=black><b>Please Set Branch and Printer</b></font></td></tr>
! <tr><td>
! $branchform
! </td>
! <td>
! $printerform
! </td></tr>
! </table>
! <input type="hidden" name="setcookies" value=1>
! <input type="submit" value="Submit" type="changesettings">
! </form>
! </center>
!
! EOF
- print endmenu('circulation');
- print endpage();
--- 110,131 ----
# set header with cookie....
! my ($template, $borrowernumber, $cookie)
! = get_template_and_user({template_name => "circ/selectbranchprinter.tmpl",
! query => $input,
! type => "intranet",
! authnotrequired => 0,
! flagsrequired => {parameters => 1},
! });
! $template->param(headerbackgroundcolor => $headerbackgroundcolor,
! backgroundimage =>
$backgroundimage,
! oneprinter =>
$oneprinter,
! onebranch => $onebranch,
! printername =>
$printername,
! branchname =>
$branchname,
! printerloop =>
address@hidden,
! branchloop =>
address@hidden
! );
+ print $query->header(), $template->output;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/circ selectbranchprinter.pl,1.6,1.7,
Henri-Damien LAURENT <=