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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt (-1 / +1 lines)
Lines 187-193 Link Here
187
                                    <a href="/cgi-bin/koha/suggestion/suggestion.pl?branchcode=[% Branches.GetLoggedInBranchcode | url %]#ASKED">
187
                                    <a href="/cgi-bin/koha/suggestion/suggestion.pl?branchcode=[% Branches.GetLoggedInBranchcode | url %]#ASKED">
188
                                    <span id="pendingsuggestions" class="pending-number-link">[% Branches.GetLoggedInBranchname | html %]: [% pendingsuggestions | html %]</span>
188
                                    <span id="pendingsuggestions" class="pending-number-link">[% Branches.GetLoggedInBranchname | html %]: [% pendingsuggestions | html %]</span>
189
                                    </a>
189
                                    </a>
190
                                    [% IF (all_pendingsuggestions > 0) %]
190
                                    [% IF (pendingsuggestions && all_pendingsuggestions > 0 && all_pendingsuggestions != pendingsuggestions ) %]
191
                                        /
191
                                        /
192
                                        <a href="/cgi-bin/koha/suggestion/suggestion.pl?branchcode=__ANY__#ASKED">
192
                                        <a href="/cgi-bin/koha/suggestion/suggestion.pl?branchcode=__ANY__#ASKED">
193
                                            <span id="all_pendingsuggestions" class="pending-number-link">All libraries: [% all_pendingsuggestions | html %]</span>
193
                                            <span id="all_pendingsuggestions" class="pending-number-link">All libraries: [% all_pendingsuggestions | html %]</span>
(-)a/mainpage.pl (-4 / +6 lines)
Lines 85-95 if( C4::Context->only_my_library ){ Link Here
85
    $template->param( pendingsuggestions => $local_pendingsuggestions_count );
85
    $template->param( pendingsuggestions => $local_pendingsuggestions_count );
86
} else {
86
} else {
87
    my $pendingsuggestions = Koha::Suggestions->search({ status => "ASKED" });
87
    my $pendingsuggestions = Koha::Suggestions->search({ status => "ASKED" });
88
    my $local_pendingsuggestions_count = $pendingsuggestions->search({ 'me.branchcode' => C4::Context->userenv()->{'branch'} })->count();
88
    if( C4::Context->userenv() && C4::Context->userenv()->{branch} ){
89
        my $local_pendingsuggestions_count = $pendingsuggestions->search({ 'me.branchcode' => C4::Context->userenv()->{'branch'} })->count();
90
        $template->param( pendingsuggestions => $local_pendingsuggestions_count );
91
    }
92
89
    my $pendingsuggestions_count = $pendingsuggestions->count();
93
    my $pendingsuggestions_count = $pendingsuggestions->count();
90
    $template->param(
94
    $template->param(
91
        all_pendingsuggestions => $pendingsuggestions_count != $local_pendingsuggestions_count ? $pendingsuggestions_count : 0,
95
        all_pendingsuggestions => $pendingsuggestions_count,
92
        pendingsuggestions => $local_pendingsuggestions_count
93
    );
96
    );
94
}
97
}
95
98
96
- 

Return to bug 31908