projects
/
koha_gimpoz
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote-tracking branch 'kc/new/enh/bug_5917' into kcmaster
[koha_gimpoz]
/
opac
/
opac-reserve.pl
diff --git
a/opac/opac-reserve.pl
b/opac/opac-reserve.pl
index
fca1e0b
..
a92a976
100755
(executable)
--- a/
opac/opac-reserve.pl
+++ b/
opac/opac-reserve.pl
@@
-88,7
+88,7
@@
if (($#biblionumbers < 0) && (! $query->param('place_reserve'))) {
}
# pass the pickup branch along....
}
# pass the pickup branch along....
-my $branch = $query->param('branch') || C4::Context->userenv->{branch} || '' ;
+my $branch = $query->param('branch') ||
$borr->{'branchcode'} ||
C4::Context->userenv->{branch} || '' ;
($branches->{$branch}) or $branch = ""; # Confirm branch is real
$template->param( branch => $branch );
($branches->{$branch}) or $branch = ""; # Confirm branch is real
$template->param( branch => $branch );
@@
-96,6
+96,11
@@
$template->param( branch => $branch );
my $CGIbranchloop = GetBranchesLoop($branch);
$template->param( CGIbranch => $CGIbranchloop );
my $CGIbranchloop = GetBranchesLoop($branch);
$template->param( CGIbranch => $CGIbranchloop );
+# Is the person allowed to choose their branch
+my $OPACChooseBranch = (C4::Context->preference("OPACAllowUserToChooseBranch")) ? 1 : 0;
+
+$template->param( choose_branch => $OPACChooseBranch);
+
#
#
# Build hashes of the requested biblio(item)s and items.
#
#
# Build hashes of the requested biblio(item)s and items.
@@
-175,7
+180,7
@@
if ( $query->param('place_reserve') ) {
my $branch = shift(@selectedItems); # i.e., branch code, not name
my $singleBranchMode = $template->param('singleBranchMode');
my $branch = shift(@selectedItems); # i.e., branch code, not name
my $singleBranchMode = $template->param('singleBranchMode');
- if ($singleBranchMode
) {
+ if ($singleBranchMode
|| ! $OPACChooseBranch) { # single branch mode or disabled user choosing
$branch = $borr->{'branchcode'};
}
$branch = $borr->{'branchcode'};
}
@@
-291,7
+296,7
@@
my $numBibsAvailable = 0;
my $itemdata_enumchron = 0;
my $anyholdable;
my $itemLevelTypes = C4::Context->preference('item-level_itypes');
my $itemdata_enumchron = 0;
my $anyholdable;
my $itemLevelTypes = C4::Context->preference('item-level_itypes');
-$template->param('item
-
level_itypes' => $itemLevelTypes);
+$template->param('item
_
level_itypes' => $itemLevelTypes);
foreach my $biblioNum (@biblionumbers) {
foreach my $biblioNum (@biblionumbers) {
@@
-472,11
+477,11
@@
if ( $numBibsAvailable == 0 || !$anyholdable) {
$template->param( none_available => 1 );
}
$template->param( none_available => 1 );
}
-my $itemTableColspan =
5
;
-if (!
$template->param('OPACItemHolds')
) {
+my $itemTableColspan =
7
;
+if (!
$template->{VARS}->{'OPACItemHolds'}
) {
$itemTableColspan--;
}
$itemTableColspan--;
}
-if (
$template->param('singleBranchMode')
) {
+if (
! $template->{VARS}->{'singleBranchMode'}
) {
$itemTableColspan--;
}
$template->param(itemtable_colspan => $itemTableColspan);
$itemTableColspan--;
}
$template->param(itemtable_colspan => $itemTableColspan);