View | Details | Raw Unified | Return to bug 35139
Collapse All | Expand All

(-)a/circ/pendingreserves.pl (-2 / +16 lines)
Lines 42-47 my $theme = $input->param('theme'); # only used if allowthemeoverride is set Link Here
42
my $op         = $input->param('op') || '';
42
my $op         = $input->param('op') || '';
43
my $borrowernumber = $input->param('borrowernumber');
43
my $borrowernumber = $input->param('borrowernumber');
44
my $reserve_id = $input->param('reserve_id');
44
my $reserve_id = $input->param('reserve_id');
45
my $all_branches   = $input->param('allbranches') || '';
45
46
46
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
47
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
47
    {
48
    {
Lines 181-188 if ( !C4::Context->preference('AllowHoldsOnDamagedItems') ){ Link Here
181
    $where{'itembib.damaged'} = 0;
182
    $where{'itembib.damaged'} = 0;
182
}
183
}
183
184
184
if ( C4::Context->only_my_library() ){
185
if ( C4::Context->preference('IndependentBranches') ) {
185
    $where{'me.branchcode'} = C4::Context->userenv->{'branch'};
186
    undef $all_branches;
187
} else {
188
    my $all_branches_link = '/cgi-bin/koha/circ/pendingreserves.pl?allbranches=1';
189
    $all_branches_link .= '&from=' . $startdate if $startdate;
190
    $all_branches_link .= '&to=' . $enddate if $enddate;
191
    $template->param( all_branches_link => $all_branches_link ) unless $all_branches;
192
}
193
if ($all_branches) {
194
    $template->param( allbranches => 1 );
195
} else {
196
    $where{'itembib.holdingbranch'} = C4::Context->userenv->{'branch'};
186
}
197
}
187
198
188
# get all distinct unfulfilled reserves
199
# get all distinct unfulfilled reserves
Lines 196-201 my @biblionumbers = $holds->get_column('biblionumber'); Link Here
196
my $all_items;
207
my $all_items;
197
if ( $holds->count ) {
208
if ( $holds->count ) {
198
    foreach my $item ( $holds->get_items_that_can_fill ) {
209
    foreach my $item ( $holds->get_items_that_can_fill ) {
210
        unless ($all_branches) {
211
            next unless $item->holdingbranch eq C4::Context->userenv->{'branch'};
212
        }
199
        push @{ $all_items->{ $item->biblionumber } }, $item;
213
        push @{ $all_items->{ $item->biblionumber } }, $item;
200
    }
214
    }
201
}
215
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt (-1 / +8 lines)
Lines 58-63 Link Here
58
        [% END %]
58
        [% END %]
59
59
60
<h2>Holds to pull placed between [% from | $KohaDates %] and [% to | $KohaDates %]</h2>
60
<h2>Holds to pull placed between [% from | $KohaDates %] and [% to | $KohaDates %]</h2>
61
<h2>
62
    [% IF all_branches_link %]
63
        <span><a href="[% all_branches_link | url %]">View all libraries</a></span>
64
    [% END %]
65
</h2>
61
<h3>Reported on [% todaysdate | $KohaDates %]</h3>
66
<h3>Reported on [% todaysdate | $KohaDates %]</h3>
62
<p>The following holds have not been filled. Please retrieve them and check them in.</p>
67
<p>The following holds have not been filled. Please retrieve them and check them in.</p>
63
<div id="searchresults">
68
<div id="searchresults">
Lines 187-192 Link Here
187
            <form name="cancelReserve" action="/cgi-bin/koha/circ/pendingreserves.pl" method="post">
192
            <form name="cancelReserve" action="/cgi-bin/koha/circ/pendingreserves.pl" method="post">
188
                <input type="hidden" name="op" value="cancel_reserve" />
193
                <input type="hidden" name="op" value="cancel_reserve" />
189
                <input type="hidden" name="reserve_id" value="[% hold.reserve_id | html %]" />
194
                <input type="hidden" name="reserve_id" value="[% hold.reserve_id | html %]" />
195
                <input type="hidden" name="allbranches" value="[% allbranches | html %]" />
190
196
191
                [% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %]
197
                [% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %]
192
                [% IF hold_cancellation %]
198
                [% IF hold_cancellation %]
Lines 212-217 Link Here
212
            [% IF hold.itemnumber %]
218
            [% IF hold.itemnumber %]
213
                <form name="cancelReserve" action="/cgi-bin/koha/circ/pendingreserves.pl" method="post">
219
                <form name="cancelReserve" action="/cgi-bin/koha/circ/pendingreserves.pl" method="post">
214
                    <input type="hidden" name="reserve_id" value="[% hold.reserve_id | html %]" />
220
                    <input type="hidden" name="reserve_id" value="[% hold.reserve_id | html %]" />
221
                    <input type="hidden" name="allbranches" value="[% allbranches | html %]" />
215
                    [% IF Koha.Preference('CanMarkHoldsToPullAsLost') == 'allow' %]
222
                    [% IF Koha.Preference('CanMarkHoldsToPullAsLost') == 'allow' %]
216
                        <input type="hidden" name="op" value="mark_as_lost" />
223
                        <input type="hidden" name="op" value="mark_as_lost" />
217
                        <input type="submit" value="Mark item as lost" />
224
                        <input type="submit" value="Mark item as lost" />
Lines 264-269 Link Here
264
<div id="filters">
271
<div id="filters">
265
272
266
<form action="/cgi-bin/koha/circ/pendingreserves.pl" method="post" >
273
<form action="/cgi-bin/koha/circ/pendingreserves.pl" method="post" >
274
<input type="hidden" name="allbranches" value="[% allbranches | html %]" />
267
<fieldset class="brief">
275
<fieldset class="brief">
268
<h4>Refine results</h4>
276
<h4>Refine results</h4>
269
<ol>
277
<ol>
270
- 

Return to bug 35139