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

(-)a/Koha/Suggestions.pm (-4 / +3 lines)
Lines 55-65 check users ability to view suggestions Link Here
55
=cut
55
=cut
56
56
57
sub filter_by_user_branch {
57
sub filter_by_user_branch {
58
    my ($self, $option) = @_;
58
    my ($self, $strict) = @_;
59
59
60
    # filter on user branch
60
    # filter on user branch
61
    if (
61
    if (
62
        $option ||
62
        $strict ||
63
        C4::Context->preference('IndependentBranches')
63
        C4::Context->preference('IndependentBranches')
64
        && !C4::Context->IsSuperLibrarian()
64
        && !C4::Context->IsSuperLibrarian()
65
    )
65
    )
Lines 70-78 sub filter_by_user_branch { Link Here
70
        if ($userenv) {
70
        if ($userenv) {
71
            return $self->search({ 'me.branchcode' => $userenv->{branch} });
71
            return $self->search({ 'me.branchcode' => $userenv->{branch} });
72
        }
72
        }
73
    } else {
74
        return $self;
75
    }
73
    }
74
    return $self;
76
}
75
}
77
76
78
77
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt (-2 / +2 lines)
Lines 56-67 Link Here
56
        <legend>Pending suggestions</legend>
56
        <legend>Pending suggestions</legend>
57
        <p>
57
        <p>
58
            Manage suggestions:
58
            Manage suggestions:
59
            <a href="/cgi-bin/koha/suggestion/suggestion.pl?branchcode=[% Branches.GetLoggedInBranchcode | url %]">
59
            <a href="/cgi-bin/koha/suggestion/suggestion.pl?branchcode=[% Branches.GetLoggedInBranchcode | url %]#ASKED">
60
                <span id="pendingsuggestions" class="pending-number-link">[% LoginBranchname | html %]: [% suggestions_count | html %]</span>
60
                <span id="pendingsuggestions" class="pending-number-link">[% LoginBranchname | html %]: [% suggestions_count | html %]</span>
61
            </a>
61
            </a>
62
            [% IF (all_pendingsuggestions > 0) %]
62
            [% IF (all_pendingsuggestions > 0) %]
63
                /
63
                /
64
                <a href="/cgi-bin/koha/suggestion/suggestion.pl?branchcode=__ANY__">
64
                <a href="/cgi-bin/koha/suggestion/suggestion.pl?branchcode=__ANY__#ASKED">
65
                    <span id="all_pendingsuggestions" class="pending-number-link">All libraries: [% all_pendingsuggestions | html %]</span>
65
                    <span id="all_pendingsuggestions" class="pending-number-link">All libraries: [% all_pendingsuggestions | html %]</span>
66
                </a>
66
                </a>
67
            [% END %]
67
            [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt (-3 / +2 lines)
Lines 149-160 Link Here
149
                                <div class="pending-info" id="suggestions_pending">
149
                                <div class="pending-info" id="suggestions_pending">
150
150
151
                                    Suggestions pending approval:
151
                                    Suggestions pending approval:
152
                                    <a href="/cgi-bin/koha/suggestion/suggestion.pl?branchcode=[% Branches.GetLoggedInBranchcode | url %]">
152
                                    <a href="/cgi-bin/koha/suggestion/suggestion.pl?branchcode=[% Branches.GetLoggedInBranchcode | url %]#ASKED">
153
                                    <span id="pendingsuggestions" class="pending-number-link">[% LoginBranchname | html %]: [% pendingsuggestions | html %]</span>
153
                                    <span id="pendingsuggestions" class="pending-number-link">[% LoginBranchname | html %]: [% pendingsuggestions | html %]</span>
154
                                    </a>
154
                                    </a>
155
                                    [% IF (all_pendingsuggestions > 0) %]
155
                                    [% IF (all_pendingsuggestions > 0) %]
156
                                        /
156
                                        /
157
                                        <a href="/cgi-bin/koha/suggestion/suggestion.pl?branchcode=__ANY__">
157
                                        <a href="/cgi-bin/koha/suggestion/suggestion.pl?branchcode=__ANY__#ASKED">
158
                                            <span id="all_pendingsuggestions" class="pending-number-link">All libraries: [% all_pendingsuggestions | html %]</span>
158
                                            <span id="all_pendingsuggestions" class="pending-number-link">All libraries: [% all_pendingsuggestions | html %]</span>
159
                                        </a>
159
                                        </a>
160
                                    [% END %]
160
                                    [% END %]
161
- 

Return to bug 25033