[Koha-patches] [PATCH] Bug 2553: Additional patch for the branch drop-down in Existing Holds.
Garry Collum
gcollum at gmail.com
Thu Jul 23 03:07:16 CEST 2009
Improves previous patch through the use of GetBranchesLoop. Also adds highlighting to the Existing holds table.
---
.../prog/en/modules/reserve/request.tmpl | 6 +++---
reserve/request.pl | 10 +---------
2 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tmpl
index a98fefe..ea79fe6 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tmpl
@@ -505,7 +505,7 @@ function checkMultiHold() {
<th>Details</th>
</tr>
<!-- TMPL_LOOP Name="reserveloop" -->
- <tr>
+ <!-- TMPL_UNLESS Name="__odd__" --><tr class="highlight"><!-- TMPL_ELSE --><tr><!-- /TMPL_UNLESS -->
<td>
<input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->" />
<input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
@@ -539,9 +539,9 @@ function checkMultiHold() {
<select name="pickup">
<!-- TMPL_LOOP Name="branchloop" -->
<!-- TMPL_IF Name="selected" -->
- <option value="<!-- TMPL_VAR NAME="branch" -->" selected="selected">
+ <option value="<!-- TMPL_VAR NAME="value" -->" selected="selected">
<!-- TMPL_ELSE -->
- <option value="<!-- TMPL_VAR NAME="branch" -->">
+ <option value="<!-- TMPL_VAR NAME="value" -->">
<!-- /TMPL_IF -->
<!-- TMPL_VAR NAME="branchname" -->
</option>
diff --git a/reserve/request.pl b/reserve/request.pl
index b865c5c..a849d70 100755
--- a/reserve/request.pl
+++ b/reserve/request.pl
@@ -446,14 +446,6 @@ foreach my $biblionumber (@biblionumbers) {
}
);
}
- my @branchloop;
- foreach my $br ( sort {$branches->{$a}->{'branchname'} cmp $branches->{$b}->{'branchname'}} keys %$branches ) {
- my %abranch;
- $abranch{'selected'} = ( $br eq $res->{'branchcode'} );
- $abranch{'branch'} = $br;
- $abranch{'branchname'} = $branches->{$br}->{'branchname'};
- push( @branchloop, \%abranch );
- }
if ( ( $res->{'found'} eq 'W' ) ) {
my $item = $res->{'itemnumber'};
@@ -497,7 +489,7 @@ foreach my $biblionumber (@biblionumbers) {
$reserve{'ccode'} = $res->{'ccode'};
$reserve{'barcode'} = $res->{'barcode'};
$reserve{'priority'} = $res->{'priority'};
- $reserve{'branchloop'} = \@branchloop;
+ $reserve{'branchloop'} = GetBranchesLoop($res->{'branchcode'});
$reserve{'optionloop'} = \@optionloop;
push( @reserveloop, \%reserve );
--
1.5.6.5
More information about the Koha-patches
mailing list