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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt (+15 lines)
Lines 284-289 Link Here
284
                                </div>
284
                                </div>
285
                            [% END %]
285
                            [% END %]
286
286
287
                            [% IF CAN_user_circulate_circulate_remaining_permissions && holds_to_pull %]
288
                                <div class="pending-info" id="holds_to_pull">
289
                                    Holds to pull:
290
                                    [% IF local_holds_to_pull %]
291
                                        <a href="/cgi-bin/koha/circ/pendingreserves.pl">
292
                                            <span class="pending-number-link">[% Branches.GetLoggedInBranchname | html %]: [% local_holds_to_pull | html %]</span>
293
                                        </a>
294
                                        /
295
                                    [% END %]
296
                                    <a href="/cgi-bin/koha/circ/pendingreserves.pl">
297
                                        <span class="pending-number-link">All libraries: [% holds_to_pull | html %]</span>
298
                                    </a>
299
                                </div>
300
                            [% END %]
301
287
                            [% IF new_curbside_pickups.count %]
302
                            [% IF new_curbside_pickups.count %]
288
                                <div class="pending-info" id="new_curbside_pickups">
303
                                <div class="pending-info" id="new_curbside_pickups">
289
                                    <a href="/cgi-bin/koha/circ/curbside_pickups.pl">New curbside pickups</a>:
304
                                    <a href="/cgi-bin/koha/circ/curbside_pickups.pl">New curbside pickups</a>:
(-)a/mainpage.pl (-2 / +24 lines)
Lines 24-30 use CGI qw ( -utf8 ); Link Here
24
use C4::Output qw( output_html_with_http_headers );
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Auth   qw( get_template_and_user );
25
use C4::Auth   qw( get_template_and_user );
26
use C4::Koha;
26
use C4::Koha;
27
use C4::Tags qw( get_count_by_tag_status );
27
use C4::Tags        qw( get_count_by_tag_status );
28
use Koha::DateUtils qw( dt_from_string );
28
use Koha::AdditionalContents;
29
use Koha::AdditionalContents;
29
use Koha::Patron::Modifications;
30
use Koha::Patron::Modifications;
30
use Koha::Patron::Discharge;
31
use Koha::Patron::Discharge;
Lines 133-138 unless ( $logged_in_user->has_permission( { parameters => 'manage_background_job Link Here
133
$template->param(
134
$template->param(
134
    holds_with_cancellation_requests => Koha::Holds->waiting->filter_by_has_cancellation_requests->count );
135
    holds_with_cancellation_requests => Koha::Holds->waiting->filter_by_has_cancellation_requests->count );
135
136
137
my $holds_to_pull_start_date = C4::Context->preference('HoldsToPullStartDate') || 2;
138
my $reserves_to_pull_from    = dt_from_string()->subtract( days => $holds_to_pull_start_date );
139
140
my $holds_to_pull = Koha::Holds->search(
141
    {
142
        found       => undef,
143
        reservedate => { '>=' => $reserves_to_pull_from->ymd() }
144
    }
145
)->count;
146
147
#get local holds to pull by looking for holds with an item homebranch that matches the loggedinuser's location
148
my $local_holds_to_pull = Koha::Holds->search(
149
    {
150
        'me.found'        => undef,
151
        'item.homebranch' => C4::Context->userenv()->{'branch'},
152
        'me.reservedate'  => { '>=' => $reserves_to_pull_from->ymd() }
153
    },
154
    { join => 'item' }
155
)->count;
156
136
if ( C4::Context->preference('CurbsidePickup') ) {
157
if ( C4::Context->preference('CurbsidePickup') ) {
137
    $template->param(
158
    $template->param(
138
        new_curbside_pickups => Koha::CurbsidePickups->search(
159
        new_curbside_pickups => Koha::CurbsidePickups->search(
Lines 163-168 $template->param( Link Here
163
    pending_discharge_requests     => $pending_discharge_requests,
184
    pending_discharge_requests     => $pending_discharge_requests,
164
    pending_article_requests       => $pending_article_requests,
185
    pending_article_requests       => $pending_article_requests,
165
    pending_problem_reports        => $pending_problem_reports,
186
    pending_problem_reports        => $pending_problem_reports,
187
    holds_to_pull                  => $holds_to_pull,
188
    local_holds_to_pull            => $local_holds_to_pull,
166
);
189
);
167
190
168
output_html_with_http_headers $query, $cookie, $template->output;
191
output_html_with_http_headers $query, $cookie, $template->output;
169
- 

Return to bug 36063