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 265-270 Link Here
265
                                </div>
265
                                </div>
266
                            [% END %]
266
                            [% END %]
267
267
268
                            [% IF CAN_user_circulate_circulate_remaining_permissions && holds_to_pull %]
269
                                <div class="pending-info" id="holds_to_pull">
270
                                    Holds to pull:
271
                                    [% IF local_holds_to_pull %]
272
                                        <a href="/cgi-bin/koha/circ/pendingreserves.pl">
273
                                            <span class="pending-number-link">[% Branches.GetLoggedInBranchname | html %]: [% local_holds_to_pull | html %]</span>
274
                                        </a>
275
                                        /
276
                                    [% END %]
277
                                    <a href="/cgi-bin/koha/circ/pendingreserves.pl">
278
                                        <span class="pending-number-link">All libraries: [% holds_to_pull | html %]</span>
279
                                    </a>
280
                                </div>
281
                            [% END %]
282
268
                            [% IF new_curbside_pickups.count %]
283
                            [% IF new_curbside_pickups.count %]
269
                                <div class="pending-info" id="new_curbside_pickups">
284
                                <div class="pending-info" id="new_curbside_pickups">
270
                                    <a href="/cgi-bin/koha/circ/curbside_pickups.pl">New curbside pickups</a>:
285
                                    <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 131-136 unless ( $logged_in_user->has_permission( { parameters => 'manage_background_job Link Here
131
$template->param(
132
$template->param(
132
    holds_with_cancellation_requests => Koha::Holds->waiting->filter_by_has_cancellation_requests->count );
133
    holds_with_cancellation_requests => Koha::Holds->waiting->filter_by_has_cancellation_requests->count );
133
134
135
my $holds_to_pull_start_date = C4::Context->preference('HoldsToPullStartDate') || 2;
136
my $reserves_to_pull_from    = dt_from_string()->subtract( days => $holds_to_pull_start_date );
137
138
my $holds_to_pull = Koha::Holds->search(
139
    {
140
        found       => undef,
141
        reservedate => { '>=' => $reserves_to_pull_from->ymd() }
142
    }
143
)->count;
144
145
#get local holds to pull by looking for holds with an item homebranch that matches the loggedinuser's location
146
my $local_holds_to_pull = Koha::Holds->search(
147
    {
148
        'me.found'        => undef,
149
        'item.homebranch' => C4::Context->userenv()->{'branch'},
150
        'me.reservedate'  => { '>=' => $reserves_to_pull_from->ymd() }
151
    },
152
    { join => 'item' }
153
)->count;
154
134
if ( C4::Context->preference('CurbsidePickup') ) {
155
if ( C4::Context->preference('CurbsidePickup') ) {
135
    $template->param(
156
    $template->param(
136
        new_curbside_pickups => Koha::CurbsidePickups->search(
157
        new_curbside_pickups => Koha::CurbsidePickups->search(
Lines 160-165 $template->param( Link Here
160
    pending_discharge_requests     => $pending_discharge_requests,
181
    pending_discharge_requests     => $pending_discharge_requests,
161
    pending_article_requests       => $pending_article_requests,
182
    pending_article_requests       => $pending_article_requests,
162
    pending_problem_reports        => $pending_problem_reports,
183
    pending_problem_reports        => $pending_problem_reports,
184
    holds_to_pull                  => $holds_to_pull,
185
    local_holds_to_pull            => $local_holds_to_pull,
163
);
186
);
164
187
165
output_html_with_http_headers $query, $cookie, $template->output;
188
output_html_with_http_headers $query, $cookie, $template->output;
166
- 

Return to bug 36063