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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt (+3 lines)
Lines 215-220 Link Here
215
                                    [% IF total_owing && total_owing > 0 %]
215
                                    [% IF total_owing && total_owing > 0 %]
216
                                        <li><a href="/cgi-bin/koha/opac-account.pl"><span class="user_fines_count count_label">[% total_owing | $Price with_symbol => 1 %]</span> due in fines and charges</a></li>
216
                                        <li><a href="/cgi-bin/koha/opac-account.pl"><span class="user_fines_count count_label">[% total_owing | $Price with_symbol => 1 %]</span> due in fines and charges</a></li>
217
                                    [% END %]
217
                                    [% END %]
218
                                    [% IF patron_messages && patron_messages.count > 0 %]
219
                                        <li><a href="/cgi-bin/koha/opac-user.pl"><span class="count_label">[% patron_messages.count %]</span> message(s)</a></li>
220
                                    [% END %]
218
                                </ul>
221
                                </ul>
219
                            </div>
222
                            </div>
220
                        [% END %]
223
                        [% END %]
(-)a/opac/opac-main.pl (-2 / +4 lines)
Lines 30-35 use C4::Overdues; Link Here
30
use Koha::Checkouts;
30
use Koha::Checkouts;
31
use Koha::Holds;
31
use Koha::Holds;
32
use Koha::News;
32
use Koha::News;
33
use Koha::Patron::Messages;
33
34
34
my $input = new CGI;
35
my $input = new CGI;
35
my $dbh   = C4::Context->dbh;
36
my $dbh   = C4::Context->dbh;
Lines 83-92 if ( $patron ) { Link Here
83
    my ( $overdues_count, $overdues ) = checkoverdues($borrowernumber);
84
    my ( $overdues_count, $overdues ) = checkoverdues($borrowernumber);
84
    my $holds_pending = Koha::Holds->search({ borrowernumber => $borrowernumber, found => undef })->count;
85
    my $holds_pending = Koha::Holds->search({ borrowernumber => $borrowernumber, found => undef })->count;
85
    my $holds_waiting = Koha::Holds->search({ borrowernumber => $borrowernumber })->waiting->count;
86
    my $holds_waiting = Koha::Holds->search({ borrowernumber => $borrowernumber })->waiting->count;
87
    my $patron_messages = Koha::Patron::Messages->search({borrowernumber => $borrowernumber});
86
88
87
    my $total = $patron->account->balance;
89
    my $total = $patron->account->balance;
88
90
89
    if  ( $checkouts > 0 || $overdues_count > 0 || $holds_pending > 0 || $holds_waiting > 0 || $total > 0 ) {
91
    if  ( $checkouts > 0 || $overdues_count > 0 || $holds_pending > 0 || $holds_waiting > 0 || $total > 0 || $patron_messages > 0 ) {
90
        $template->param(
92
        $template->param(
91
            dashboard_info => 1,
93
            dashboard_info => 1,
92
            checkouts           => $checkouts,
94
            checkouts           => $checkouts,
Lines 94-99 if ( $patron ) { Link Here
94
            holds_pending       => $holds_pending,
96
            holds_pending       => $holds_pending,
95
            holds_waiting       => $holds_waiting,
97
            holds_waiting       => $holds_waiting,
96
            total_owing         => $total,
98
            total_owing         => $total,
99
            patron_messages     => $patron_messages,
97
        );
100
        );
98
    }
101
    }
99
}
102
}
100
- 

Return to bug 26123