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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt (-6 / +32 lines)
Lines 186-192 Link Here
186
            <div class="row">
186
            <div class="row">
187
                <div class="col-sm-12">
187
                <div class="col-sm-12">
188
                    [%# Following statement must be in one line for translatability %]
188
                    [%# Following statement must be in one line for translatability %]
189
                    [% IF ( CAN_user_tools_moderate_comments  && pendingcomments ) || ( CAN_user_tools_moderate_tags && pendingtags ) || ( CAN_user_borrowers_edit_borrowers && pending_borrower_modifications ) || ( CAN_user_suggestions_suggestions_manage && ( pendingsuggestions || all_pendingsuggestions )) || ( CAN_user_borrowers_edit_borrowers && pending_discharge_requests ) || pending_article_requests || ( Koha.Preference('AllowCheckoutNotes') && CAN_user_circulate_manage_checkout_notes && pending_checkout_notes.count ) || ( ( Koha.Preference('OpacCatalogConcerns') || Koha.Preference('CatalogConcerns') ) && pending_biblio_tickets && CAN_user_editcatalogue_edit_catalogue ) || ( Koha.Preference('OPACReportProblem') && CAN_user_problem_reports && pending_problem_reports.count ) || already_ran_jobs || new_curbside_pickups.count || ( holds_with_cancellation_requests && CAN_user_circulate_circulate_remaining_permissions ) || self_registered_count %]
189
                    [% IF ( CAN_user_tools_moderate_comments  && pendingcomments ) || ( CAN_user_tools_moderate_tags && pendingtags ) || ( CAN_user_borrowers_edit_borrowers && pending_borrower_modifications ) || ( CAN_user_suggestions_suggestions_manage && ( pendingsuggestions || all_pendingsuggestions )) || ( CAN_user_borrowers_edit_borrowers && pending_discharge_requests ) || pending_article_requests || ( Koha.Preference('AllowCheckoutNotes') && CAN_user_circulate_manage_checkout_notes && pending_checkout_notes.count ) || ( ( Koha.Preference('OpacCatalogConcerns') || Koha.Preference('CatalogConcerns') ) && pending_biblio_tickets && CAN_user_editcatalogue_edit_catalogue ) || ( Koha.Preference('OPACReportProblem') && CAN_user_problem_reports && pending_problem_reports.count ) || already_ran_jobs || new_curbside_pickups.count || ( holds_with_cancellation_requests && CAN_user_circulate_circulate_remaining_permissions ) || self_registered_count || ( holds_to_pull && CAN_user_circulate_circulate_remaining_permissions ) %]
190
                        <div id="area-pending" class="page-section">
190
                        <div id="area-pending" class="page-section">
191
                            [% IF pending_article_requests %]
191
                            [% IF pending_article_requests %]
192
                                <div class="pending-info" id="article_requests_pending">
192
                                <div class="pending-info" id="article_requests_pending">
Lines 224-234 Link Here
224
                                </div>
224
                                </div>
225
                            [% END %]
225
                            [% END %]
226
226
227
                            [% IF ( CAN_user_borrowers_edit_borrowers && pending_borrower_modifications ) %]
227
                            [% IF CAN_user_borrowers_edit_borrowers && pending_borrower_modifications %]
228
                                <div class="pending-info" id="patron_updates_pending">
228
                                [% IF Koha.Preference('IndependentBranchesPatronModifications') && !CAN_user_superlibrarian %]
229
                                    <a href="/cgi-bin/koha/members/members-update.pl">Patrons requesting modifications</a>:
229
                                    [% IF pending_local_borrowermods %]
230
                                    <span class="pending-number-link">[% pending_borrower_modifications | html %]</span>
230
                                        <div class="pending-info" id="patron_updates_pending">
231
                                </div>
231
                                            Patrons requesting modifications:
232
                                            <a href="/cgi-bin/koha/members/members-update.pl">
233
                                                <span class="pending-number-link">[% Branches.GetLoggedInBranchname | html %]: [% pending_local_borrowermods | html %]</span>
234
                                            </a>
235
                                        </div>
236
                                    [% END %]
237
                                [% ELSE %]
238
                                    <div class="pending-info" id="patron_updates_pending">
239
                                        Patrons requesting modifications:
240
                                        [% IF pending_local_borrowermods %]
241
                                            <a href="/cgi-bin/koha/members/members-update.pl">
242
                                                <span class="pending-number-link">[% Branches.GetLoggedInBranchname | html %]: [% pending_local_borrowermods | html %]</span>
243
                                            </a>
244
                                            /
245
                                        [% END %]
246
                                        <a href="/cgi-bin/koha/members/members-update.pl">
247
                                            <span class="pending-number-link">All libraries: [% pending_borrower_modifications | html %]</span>
248
                                        </a>
249
                                    </div>
250
                                [% END %]
232
                            [% END %]
251
                            [% END %]
233
252
234
                            [% IF CAN_user_borrowers_edit_borrowers && pending_discharge_requests %]
253
                            [% IF CAN_user_borrowers_edit_borrowers && pending_discharge_requests %]
Lines 265-270 Link Here
265
                                </div>
284
                                </div>
266
                            [% END %]
285
                            [% END %]
267
286
287
                            [% IF holds_to_pull && CAN_user_circulate_circulate_remaining_permissions %]
288
                                <div class="pending-info" id="holds_to_pull">
289
                                    <a href="/cgi-bin/koha/circ/pendingreserves.pl">New holds to pull</a>:
290
                                    <span class="pending-number-link">[% holds_to_pull | html %]</span>
291
                                </div>
292
                            [% END %]
293
268
                            [% IF new_curbside_pickups.count %]
294
                            [% IF new_curbside_pickups.count %]
269
                                <div class="pending-info" id="new_curbside_pickups">
295
                                <div class="pending-info" id="new_curbside_pickups">
270
                                    <a href="/cgi-bin/koha/circ/curbside_pickups.pl">New curbside pickups</a>:
296
                                    <a href="/cgi-bin/koha/circ/curbside_pickups.pl">New curbside pickups</a>:
(-)a/mainpage.pl (-4 / +10 lines)
Lines 37-42 use Koha::Suggestions; Link Here
37
use Koha::BackgroundJobs;
37
use Koha::BackgroundJobs;
38
use Koha::CurbsidePickups;
38
use Koha::CurbsidePickups;
39
use Koha::Tickets;
39
use Koha::Tickets;
40
use Koha::Token;
41
use Koha::Holds;
40
42
41
my $query = CGI->new;
43
my $query = CGI->new;
42
44
Lines 102-110 if ( C4::Context->only_my_library ) { Link Here
102
    );
104
    );
103
}
105
}
104
106
105
my $pending_borrower_modifications = Koha::Patron::Modifications->pending_count($branch);
107
my $pending_borrower_modifications   = Koha::Patron::Modifications->pending_count($branch);
106
my $pending_discharge_requests     = Koha::Patron::Discharge::count( { pending => 1 } );
108
my $local_pendingmodifications_count = Koha::Patron::Modifications->pending_count( C4::Context->userenv()->{'branch'} );
107
my $pending_article_requests       = Koha::ArticleRequests->search_limited(
109
110
my $pending_discharge_requests = Koha::Patron::Discharge::count( { pending => 1 } );
111
my $pending_article_requests   = Koha::ArticleRequests->search_limited(
108
    {
112
    {
109
        status => Koha::ArticleRequest::Status::Requested,
113
        status => Koha::ArticleRequest::Status::Requested,
110
        $branch ? ( 'me.branchcode' => $branch ) : (),
114
        $branch ? ( 'me.branchcode' => $branch ) : (),
Lines 130-135 unless ( $logged_in_user->has_permission( { parameters => 'manage_background_job Link Here
130
134
131
$template->param(
135
$template->param(
132
    holds_with_cancellation_requests => Koha::Holds->waiting->filter_by_has_cancellation_requests->count );
136
    holds_with_cancellation_requests => Koha::Holds->waiting->filter_by_has_cancellation_requests->count );
137
my $holds_to_pull = Koha::Holds->search( found => undef )->count;
133
138
134
if ( C4::Context->preference('CurbsidePickup') ) {
139
if ( C4::Context->preference('CurbsidePickup') ) {
135
    $template->param(
140
    $template->param(
Lines 157-165 $template->param( Link Here
157
    pendingcomments                => $pendingcomments,
162
    pendingcomments                => $pendingcomments,
158
    pendingtags                    => $pendingtags,
163
    pendingtags                    => $pendingtags,
159
    pending_borrower_modifications => $pending_borrower_modifications,
164
    pending_borrower_modifications => $pending_borrower_modifications,
165
    pending_local_borrowermods     => $local_pendingmodifications_count,
160
    pending_discharge_requests     => $pending_discharge_requests,
166
    pending_discharge_requests     => $pending_discharge_requests,
161
    pending_article_requests       => $pending_article_requests,
167
    pending_article_requests       => $pending_article_requests,
162
    pending_problem_reports        => $pending_problem_reports,
168
    pending_problem_reports        => $pending_problem_reports,
169
    holds_to_pull                  => $holds_to_pull,
163
);
170
);
164
171
165
output_html_with_http_headers $query, $cookie, $template->output;
172
output_html_with_http_headers $query, $cookie, $template->output;
166
- 

Return to bug 30849