[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/opac opac-reserve.pl,1.10,1.11
From: |
Finlay Thompson |
Subject: |
[Koha-cvs] CVS: koha/opac opac-reserve.pl,1.10,1.11 |
Date: |
Tue, 18 Mar 2003 12:57:54 -0800 |
Update of /cvsroot/koha/koha/opac
In directory sc8-pr-cvs1:/tmp/cvs-serv18843
Modified Files:
opac-reserve.pl
Log Message:
fixed so that it works with the old templates too
Index: opac-reserve.pl
===================================================================
RCS file: /cvsroot/koha/koha/opac/opac-reserve.pl,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** opac-reserve.pl 18 Mar 2003 20:25:31 -0000 1.10
--- opac-reserve.pl 18 Mar 2003 20:57:52 -0000 1.11
***************
*** 83,86 ****
--- 83,114 ----
# get the itemtype data....
my @items = ItemInfo(undef, $biblionumber, 'opac');
+
+ #######################################################
+ # old version, add so that old templates still work
+ my %types_old;
+ foreach my $itm (@items) {
+ my $ity = $itm->{'itemtype'};
+ unless ($types_old {$ity}) {
+ $types_old{$ity}->{'itemtype'} = $ity;
+ $types_old{$ity}->{'branchinfo'}->{$itm->{'branchcode'}} = 1;
+ $types_old{$ity}->{'description'} = $itm->{'description'};
+ } else {
+ $types_old{$ity}->{'branchinfo'}->{$itm->{'branchcode'}} ++;
+ }
+ }
+
+ foreach my $type (values %types_old) {
+ my $copies = "";
+ foreach my $bc (keys %{$type->{'branchinfo'}}) {
+ $copies .=
$branches->{$bc}->{'branchname'}."(".$type->{'branchinfo'}->{$bc}.")";
+ }
+ $type->{'copies'} = $copies;
+ }
+
+ my @types_old = values %types_old;
+
+ # end old version
+ ################################
+
my @temp;
foreach my $itm (@items) {
***************
*** 222,228 ****
--- 250,258 ----
}
unless ($noreserves) {
+ $template->param(TYPES => address@hidden);
$template->param(select_item_types => 1);
}
}
+
# check that you can actually make the reserve.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/opac opac-reserve.pl,1.10,1.11,
Finlay Thompson <=