[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/admin branches.pl,1.28,1.29
From: |
Owen Leonard |
Subject: |
[Koha-cvs] CVS: koha/admin branches.pl,1.28,1.29 |
Date: |
Wed, 03 Aug 2005 12:30:44 -0700 |
Update of /cvsroot/koha/koha/admin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21627/admin
Modified Files:
branches.pl
Log Message:
Synching with rel_2_2.
Index: branches.pl
===================================================================
RCS file: /cvsroot/koha/koha/admin/branches.pl,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -r1.28 -r1.29
*** branches.pl 23 Mar 2005 09:29:30 -0000 1.28
--- branches.pl 3 Aug 2005 19:30:31 -0000 1.29
***************
*** 89,93 ****
heading("Branches: Add Branch");
$template->param('heading-branches-add-branch-p' => 1);
- $template->param('use-heading-flags-p' => 1);
editbranchform();
--- 89,92 ----
***************
*** 96,100 ****
heading("Branches: Edit Branch");
$template->param('heading-branches-edit-branch-p' => 1);
- $template->param('use-heading-flags-p' => 1);
$template->param(add => 1);
editbranchform($branchcode);
--- 95,98 ----
***************
*** 103,111 ****
my $params = $input->Vars;
unless ($params->{'branchcode'} && $params->{'branchname'}) {
! default ("Cannot change branch record: You must specify a
Branchname and a Branchcode");
} else {
setbranchinfo($params);
$template->param(else => 1);
! default ("Branch record changed for branch:
$params->{'branchname'}");
}
} elsif ($op eq 'delete') {
--- 101,110 ----
my $params = $input->Vars;
unless ($params->{'branchcode'} && $params->{'branchname'}) {
! $template->param(else => 1);
! default ("MESSAGE1");
} else {
setbranchinfo($params);
$template->param(else => 1);
! default ("MESSAGE2");
}
} elsif ($op eq 'delete') {
***************
*** 124,133 ****
deletebranch($branchcode);
$template->param(else => 1);
! default("The branch \"$branchname\" ($branchcode) has been deleted.");
} elsif ($op eq 'editcategory') {
# If the user has pressed the "add new category" or "modify" buttons.
- heading("Branches: Edit Category");
$template->param('heading-branches-edit-category-p' => 1);
- $template->param('use-heading-flags-p' => 1);
editcatform($categorycode);
} elsif ($op eq 'addcategory_validate') {
--- 123,130 ----
deletebranch($branchcode);
$template->param(else => 1);
! default("MESSAGE3");
} elsif ($op eq 'editcategory') {
# If the user has pressed the "add new category" or "modify" buttons.
$template->param('heading-branches-edit-category-p' => 1);
editcatform($categorycode);
} elsif ($op eq 'addcategory_validate') {
***************
*** 135,143 ****
my $params = $input->Vars;
unless ($params->{'categorycode'} && $params->{'categoryname'}) {
! default ("Cannot change branch record: You must specify a
Branchname and a Branchcode");
} else {
setcategoryinfo($params);
$template->param(else => 1);
! default ("Category record changed for category
$params->{'categoryname'}");
}
} elsif ($op eq 'delete_category') {
--- 132,141 ----
my $params = $input->Vars;
unless ($params->{'categorycode'} && $params->{'categoryname'}) {
! $template->param(else => 1);
! default ("MESSAGE4");
} else {
setcategoryinfo($params);
$template->param(else => 1);
! default ("MESSAGE5");
}
} elsif ($op eq 'delete_category') {
***************
*** 155,159 ****
deletecategory($categorycode);
$template->param(else => 1);
! default("The category with code $categorycode has been deleted.");
} else {
--- 153,157 ----
deletecategory($categorycode);
$template->param(else => 1);
! default("MESSAGE6");
} else {
***************
*** 172,177 ****
heading("Branches");
$template->param('heading-branches-p' => 1);
! $template->param('use-heading-flags-p' => 1);
! $template->param(message => $message);
$template->param(action => $script_name);
branchinfotable();
--- 170,174 ----
heading("Branches");
$template->param('heading-branches-p' => 1);
! $template->param("$message" => 1);
$template->param(action => $script_name);
branchinfotable();
***************
*** 264,271 ****
$branchinfo = getbranchinfo();
}
! my $color;
my @loop_data =();
foreach my $branch (@$branchinfo) {
! ($color eq $linecolor1) ? ($color=$linecolor2) :
($color=$linecolor1);
#
# We export the following fields to the template. These are not
--- 261,269 ----
$branchinfo = getbranchinfo();
}
! my $toggle;
! my $i;
my @loop_data =();
foreach my $branch (@$branchinfo) {
! ($i % 2) ? ($toggle = 1) : ($toggle = 0);
#
# We export the following fields to the template. These are not
***************
*** 323,341 ****
$row{'branch_name'} = $branch->{'branchname'};
$row{'branch_code'} = $branch->{'branchcode'};
! $row{'color'} = $color;
$row{'value'} = $branch->{'branchcode'};
$row{'action'} = '/cgi-bin/koha/admin/branches.pl';
push @loop_data, { %row };
}
my @branchcategories =();
my $catinfo = getcategoryinfo();
foreach my $cat (@$catinfo) {
push @branchcategories, {
categoryname => $cat->{'categoryname'},
categorycode => $cat->{'categorycode'},
codedescription => $cat->{'codedescription'},
};
! }
$template->param(branches => address@hidden,
--- 321,345 ----
$row{'branch_name'} = $branch->{'branchname'};
$row{'branch_code'} = $branch->{'branchcode'};
! $row{'toggle'} = $toggle;
$row{'value'} = $branch->{'branchcode'};
$row{'action'} = '/cgi-bin/koha/admin/branches.pl';
push @loop_data, { %row };
+ $i++;
}
my @branchcategories =();
my $catinfo = getcategoryinfo();
+ my $toggle;
+ my $i = 0;
foreach my $cat (@$catinfo) {
+ ($i % 2) ? ($toggle = 1) : ($toggle = 0);
push @branchcategories, {
+ toggle => $toggle,
categoryname => $cat->{'categoryname'},
categorycode => $cat->{'categorycode'},
codedescription => $cat->{'codedescription'},
};
! $i++;
! }
$template->param(branches => address@hidden,
***************
*** 502,506 ****
if ($total) {
# FIXME: need to be replaced by an exported boolean parameter
! $message = "Branch cannot be deleted because there are $total items
using that branch.";
}
return $message;
--- 506,510 ----
if ($total) {
# FIXME: need to be replaced by an exported boolean parameter
! $message = "MESSAGE7";
}
return $message;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/admin branches.pl,1.28,1.29,
Owen Leonard <=