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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt (-5 / +24 lines)
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 %]
(-)a/mainpage.pl (-4 / +6 lines)
Lines 102-110 if ( C4::Context->only_my_library ) { Link Here
102
    );
102
    );
103
}
103
}
104
104
105
my $pending_borrower_modifications = Koha::Patron::Modifications->pending_count($branch);
105
my $pending_borrower_modifications   = Koha::Patron::Modifications->pending_count($branch);
106
my $pending_discharge_requests     = Koha::Patron::Discharge::count( { pending => 1 } );
106
my $local_pendingmodifications_count = Koha::Patron::Modifications->pending_count( C4::Context->userenv()->{'branch'} );
107
my $pending_article_requests       = Koha::ArticleRequests->search_limited(
107
108
my $pending_discharge_requests = Koha::Patron::Discharge::count( { pending => 1 } );
109
my $pending_article_requests   = Koha::ArticleRequests->search_limited(
108
    {
110
    {
109
        status => Koha::ArticleRequest::Status::Requested,
111
        status => Koha::ArticleRequest::Status::Requested,
110
        $branch ? ( 'me.branchcode' => $branch ) : (),
112
        $branch ? ( 'me.branchcode' => $branch ) : (),
Lines 157-162 $template->param( Link Here
157
    pendingcomments                => $pendingcomments,
159
    pendingcomments                => $pendingcomments,
158
    pendingtags                    => $pendingtags,
160
    pendingtags                    => $pendingtags,
159
    pending_borrower_modifications => $pending_borrower_modifications,
161
    pending_borrower_modifications => $pending_borrower_modifications,
162
    pending_local_borrowermods     => $local_pendingmodifications_count,
160
    pending_discharge_requests     => $pending_discharge_requests,
163
    pending_discharge_requests     => $pending_discharge_requests,
161
    pending_article_requests       => $pending_article_requests,
164
    pending_article_requests       => $pending_article_requests,
162
    pending_problem_reports        => $pending_problem_reports,
165
    pending_problem_reports        => $pending_problem_reports,
163
- 

Return to bug 30849