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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt (-3 / +11 lines)
Lines 284-293 Link Here
284
                                </div>
284
                                </div>
285
                            [% END %]
285
                            [% END %]
286
286
287
                            [% IF holds_to_pull && CAN_user_circulate_circulate_remaining_permissions %]
287
                            [% IF CAN_user_circulate_circulate_remaining_permissions && holds_to_pull %]
288
                                <div class="pending-info" id="holds_to_pull">
288
                                <div class="pending-info" id="holds_to_pull">
289
                                    <a href="/cgi-bin/koha/circ/pendingreserves.pl">New holds to pull</a>:
289
                                    Holds to pull:
290
                                    <span class="pending-number-link">[% holds_to_pull | html %]</span>
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>
291
                                </div>
299
                                </div>
292
                            [% END %]
300
                            [% END %]
293
301
(-)a/mainpage.pl (-3 / +23 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 134-140 unless ( $logged_in_user->has_permission( { parameters => 'manage_background_job Link Here
134
135
135
$template->param(
136
$template->param(
136
    holds_with_cancellation_requests => Koha::Holds->waiting->filter_by_has_cancellation_requests->count );
137
    holds_with_cancellation_requests => Koha::Holds->waiting->filter_by_has_cancellation_requests->count );
137
my $holds_to_pull = Koha::Holds->search( found => undef )->count;
138
139
my $holds_to_pull_start_date = C4::Context->preference('HoldsToPullStartDate') || 2;
140
my $reserves_to_pull_from    = dt_from_string()->subtract( days => $holds_to_pull_start_date );
141
142
my $holds_to_pull = Koha::Holds->search(
143
    {
144
        found       => undef,
145
        reservedate => { '>=' => $reserves_to_pull_from->ymd() }
146
    }
147
)->count;
148
149
#get local holds to pull by looking for holds with an item homebranch that matches the loggedinuser's location
150
my $local_holds_to_pull = Koha::Holds->search(
151
    {
152
        'me.found'        => undef,
153
        'item.homebranch' => C4::Context->userenv()->{'branch'},
154
        'me.reservedate'  => { '>=' => $reserves_to_pull_from->ymd() }
155
    },
156
    { join => 'item' }
157
)->count;
138
158
139
if ( C4::Context->preference('CurbsidePickup') ) {
159
if ( C4::Context->preference('CurbsidePickup') ) {
140
    $template->param(
160
    $template->param(
Lines 167-172 $template->param( Link Here
167
    pending_article_requests       => $pending_article_requests,
187
    pending_article_requests       => $pending_article_requests,
168
    pending_problem_reports        => $pending_problem_reports,
188
    pending_problem_reports        => $pending_problem_reports,
169
    holds_to_pull                  => $holds_to_pull,
189
    holds_to_pull                  => $holds_to_pull,
190
    local_holds_to_pull            => $local_holds_to_pull,
170
);
191
);
171
192
172
output_html_with_http_headers $query, $cookie, $template->output;
193
output_html_with_http_headers $query, $cookie, $template->output;
173
- 

Return to bug 36063