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 227-232 Link Here
227
                                    [% IF total_owing && total_owing > 0 %]
227
                                    [% IF total_owing && total_owing > 0 %]
228
                                        <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>
228
                                        <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>
229
                                    [% END %]
229
                                    [% END %]
230
                                    [% IF patron_messages && patron_messages.count > 0 || opacnote %]
231
                                        [% IF opacnote %]
232
                                            <li><a href="/cgi-bin/koha/opac-user.pl"><span class="count_label">[% patron_messages.count + 1 | html %]</span> message(s)</a></li>
233
                                        [% ELSE %]
234
                                            <li><a href="/cgi-bin/koha/opac-user.pl"><span class="count_label">[% patron_messages.count | html %]</span> message(s)</a></li>
235
                                        [% END %]
236
                                    [% END %]
230
                                </ul>
237
                                </ul>
231
                            </div>
238
                            </div>
232
                        [% END %]
239
                        [% END %]
(-)a/opac/opac-main.pl (-3 / +6 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 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({borrowernumber => $borrowernumber});
86
    my $patron_note = $patron->opacnote;
85
    my $total = $patron->account->balance;
87
    my $total = $patron->account->balance;
86
88
87
    if  ( $checkouts > 0 || $overdues_count > 0 || $holds_pending > 0 || $holds_waiting > 0 || $total > 0 ) {
89
    if  ( $checkouts > 0 || $overdues_count > 0 || $holds_pending > 0 || $holds_waiting > 0 || $total > 0 || $patron_messages > 0 || $patron_note > 0 ) {
88
        $template->param(
90
        $template->param(
89
            dashboard_info => 1,
91
            dashboard_info => 1,
90
            checkouts           => $checkouts,
92
            checkouts           => $checkouts,
Lines 92-97 if ( $patron ) { Link Here
92
            holds_pending       => $holds_pending,
94
            holds_pending       => $holds_pending,
93
            holds_waiting       => $holds_waiting,
95
            holds_waiting       => $holds_waiting,
94
            total_owing         => $total,
96
            total_owing         => $total,
97
            patron_messages     => $patron_messages,
98
            opacnote            => $patron_note,
95
        );
99
        );
96
    }
100
    }
97
}
101
}
98
- 

Return to bug 26123