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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt (+7 lines)
Lines 232-237 Link Here
232
                                    [% IF total_owing && total_owing > 0 %]
232
                                    [% IF total_owing && total_owing > 0 %]
233
                                        <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>
233
                                        <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>
234
                                    [% END %]
234
                                    [% END %]
235
                                    [% IF patron_messages && patron_messages.count > 0 || opacnote %]
236
                                        [% IF opacnote %]
237
                                            <li><a href="/cgi-bin/koha/opac-user.pl"><span class="count_label">[% patron_messages.count + 1 | html %]</span> message(s)</a></li>
238
                                        [% ELSE %]
239
                                            <li><a href="/cgi-bin/koha/opac-user.pl"><span class="count_label">[% patron_messages.count | html %]</span> message(s)</a></li>
240
                                        [% END %]
241
                                    [% END %]
235
                                </ul>
242
                                </ul>
236
                            </div>
243
                            </div>
237
                        [% END %]
244
                        [% END %]
(-)a/opac/opac-main.pl (-4 / +10 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 = CGI->new;
35
my $input = CGI->new;
35
my $dbh   = C4::Context->dbh;
36
my $dbh   = C4::Context->dbh;
Lines 81-90 if ( $patron ) { Link Here
81
    my ( $overdues_count, $overdues ) = checkoverdues($borrowernumber);
82
    my ( $overdues_count, $overdues ) = checkoverdues($borrowernumber);
82
    my $holds_pending = Koha::Holds->search({ borrowernumber => $borrowernumber, found => undef })->count;
83
    my $holds_pending = Koha::Holds->search({ borrowernumber => $borrowernumber, found => undef })->count;
83
    my $holds_waiting = Koha::Holds->search({ borrowernumber => $borrowernumber })->waiting->count;
84
    my $holds_waiting = Koha::Holds->search({ borrowernumber => $borrowernumber })->waiting->count;
84
85
    my $patron_messages = Koha::Patron::Messages->search(
86
            {
87
                borrowernumber => $borrowernumber,
88
                message_type => 'B',
89
            });
90
    my $patron_note = $patron->opacnote;
85
    my $total = $patron->account->balance;
91
    my $total = $patron->account->balance;
86
92
    if  ( $checkouts > 0 || $overdues_count > 0 || $holds_pending > 0 || $holds_waiting > 0 || $total > 0 || $patron_note || $patron_messages->count ) {
87
    if  ( $checkouts > 0 || $overdues_count > 0 || $holds_pending > 0 || $holds_waiting > 0 || $total > 0 ) {
88
        $template->param(
93
        $template->param(
89
            dashboard_info => 1,
94
            dashboard_info => 1,
90
            checkouts           => $checkouts,
95
            checkouts           => $checkouts,
Lines 92-97 if ( $patron ) { Link Here
92
            holds_pending       => $holds_pending,
97
            holds_pending       => $holds_pending,
93
            holds_waiting       => $holds_waiting,
98
            holds_waiting       => $holds_waiting,
94
            total_owing         => $total,
99
            total_owing         => $total,
100
            patron_messages     => $patron_messages,
101
            opacnote            => $patron_note,
95
        );
102
        );
96
    }
103
    }
97
}
104
}
98
- 

Return to bug 26123