|
Lines 48-53
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
Link Here
|
| 48 |
} |
48 |
} |
| 49 |
); |
49 |
); |
| 50 |
my $OPACDisplayRequestPriority = (C4::Context->preference("OPACDisplayRequestPriority")) ? 1 : 0; |
50 |
my $OPACDisplayRequestPriority = (C4::Context->preference("OPACDisplayRequestPriority")) ? 1 : 0; |
|
|
51 |
my $show_holds_count = C4::Context->preference("OPACShowHoldsCount"); |
| 52 |
|
| 51 |
sub get_out ($$$) { |
53 |
sub get_out ($$$) { |
| 52 |
output_html_with_http_headers(shift,shift,shift); # $query, $cookie, $template->output; |
54 |
output_html_with_http_headers(shift,shift,shift); # $query, $cookie, $template->output; |
| 53 |
exit; |
55 |
exit; |
|
Lines 113-124
$template->param( choose_branch => $OPACChooseBranch);
Link Here
|
| 113 |
# |
115 |
# |
| 114 |
# |
116 |
# |
| 115 |
|
117 |
|
| 116 |
# Hash of biblionumber to biblio/biblioitems record. |
118 |
my %biblioDataHash; # Hash of biblionumber to biblio/biblioitems record. |
| 117 |
my %biblioDataHash; |
119 |
my %itemInfoHash; # Hash of itemnumber to item info. |
| 118 |
|
|
|
| 119 |
# Hash of itemnumber to item info. |
| 120 |
my %itemInfoHash; |
| 121 |
|
| 122 |
foreach my $biblioNumber (@biblionumbers) { |
120 |
foreach my $biblioNumber (@biblionumbers) { |
| 123 |
|
121 |
|
| 124 |
my $biblioData = GetBiblioData($biblioNumber); |
122 |
my $biblioData = GetBiblioData($biblioNumber); |
|
Lines 128-160
foreach my $biblioNumber (@biblionumbers) {
Link Here
|
| 128 |
|
126 |
|
| 129 |
my $marcrecord= GetMarcBiblio($biblioNumber); |
127 |
my $marcrecord= GetMarcBiblio($biblioNumber); |
| 130 |
|
128 |
|
| 131 |
# flag indicating existence of at least one item linked via a host record |
129 |
# flag indicating existence of at least one item linked via a host record |
| 132 |
my $hostitemsflag; |
130 |
my $hostitemsflag; |
| 133 |
# adding items linked via host biblios |
131 |
# adding items linked via host biblios |
| 134 |
my @hostitemInfos = GetHostItemsInfo($marcrecord); |
132 |
my @hostitemInfos = GetHostItemsInfo($marcrecord); |
| 135 |
if (@hostitemInfos){ |
133 |
if (@hostitemInfos){ |
| 136 |
$hostitemsflag =1; |
134 |
$hostitemsflag =1; |
| 137 |
push (@itemInfos,@hostitemInfos); |
135 |
push (@itemInfos,@hostitemInfos); |
| 138 |
} |
136 |
} |
| 139 |
|
|
|
| 140 |
|
| 141 |
|
137 |
|
| 142 |
$biblioData->{itemInfos} = \@itemInfos; |
138 |
$biblioData->{itemInfos} = \@itemInfos; |
| 143 |
foreach my $itemInfo (@itemInfos) { |
139 |
foreach my $itemInfo (@itemInfos) { |
| 144 |
$itemInfoHash{$itemInfo->{itemnumber}} = $itemInfo; |
140 |
$itemInfoHash{$itemInfo->{itemnumber}} = $itemInfo; |
| 145 |
} |
141 |
} |
| 146 |
|
142 |
|
| 147 |
# Compute the priority rank. |
143 |
if ($show_holds_count) { |
| 148 |
my ( $rank, $reserves ) = GetReservesFromBiblionumber($biblioNumber,1); |
144 |
# Compute the priority rank. |
| 149 |
$biblioData->{reservecount} = $rank; |
145 |
my ( $rank, $reserves ) = GetReservesFromBiblionumber($biblioNumber,1); |
| 150 |
foreach my $res (@$reserves) { |
146 |
$biblioData->{reservecount} = $rank; |
| 151 |
my $found = $res->{'found'}; |
147 |
foreach my $res (@$reserves) { |
| 152 |
if ( $found && ($found eq 'W') ) { |
148 |
my $found = $res->{'found'}; |
| 153 |
$rank--; |
149 |
if ( $found && ($found eq 'W') ) { |
|
|
150 |
$rank--; |
| 151 |
} |
| 154 |
} |
152 |
} |
|
|
153 |
$rank++; |
| 154 |
$biblioData->{rank} = $rank; |
| 155 |
} |
155 |
} |
| 156 |
$rank++; |
|
|
| 157 |
$biblioData->{rank} = $rank; |
| 158 |
} |
156 |
} |
| 159 |
|
157 |
|
| 160 |
# |
158 |
# |
|
Lines 528-534
$template->param(itemtable_colspan => $itemTableColspan);
Link Here
|
| 528 |
|
526 |
|
| 529 |
# display infos |
527 |
# display infos |
| 530 |
$template->param(bibitemloop => $biblioLoop); |
528 |
$template->param(bibitemloop => $biblioLoop); |
| 531 |
$template->param( showpriority=>1 ) if $OPACDisplayRequestPriority; |
529 |
$template->param( showpriority=>$OPACDisplayRequestPriority); |
|
|
530 |
$template->param( showholds=>$show_holds_count); |
| 532 |
# can set reserve date in future |
531 |
# can set reserve date in future |
| 533 |
if ( |
532 |
if ( |
| 534 |
C4::Context->preference( 'AllowHoldDateInFuture' ) && |
533 |
C4::Context->preference( 'AllowHoldDateInFuture' ) && |
| 535 |
- |
|
|