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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt (-5 / +3 lines)
Lines 216-227 Link Here
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 opacnote %]
218
                                    [% IF opacnote %]
219
                                    [% message_note_count = patron_messages.count + 1 %]
219
                                        <li><a href="/cgi-bin/koha/opac-user.pl"><span class="count_label">1</span> note</a></li>
220
                                    [% ELSE %]
221
                                    [% message_note_count = patron_mssages.count %]
222
                                    [% END %]
220
                                    [% END %]
223
                                    [% IF (patron_messages && patron_messages.count > 0) || opacnote %]
221
                                    [% IF patron_messages && patron_messages.count > 0 %]
224
                                        <li><a href="/cgi-bin/koha/opac-user.pl"><span class="count_label">[% message_note_count | html %]</span> message(s)</a></li>
222
                                        <li><a href="/cgi-bin/koha/opac-user.pl"><span class="count_label">[% patron_messages.count | html %]</span> message(s)</a></li>
225
                                    [% END %]
223
                                    [% END %]
226
                                </ul>
224
                                </ul>
227
                            </div>
225
                            </div>
(-)a/opac/opac-main.pl (-3 / +1 lines)
Lines 76-82 if (defined $news_id){ Link Here
76
76
77
# For dashboard
77
# For dashboard
78
my $patron = Koha::Patrons->find( $borrowernumber );
78
my $patron = Koha::Patrons->find( $borrowernumber );
79
my $borr = $patron->unblessed;
80
79
81
if ( $patron ) {
80
if ( $patron ) {
82
    my $checkouts = Koha::Checkouts->search({ borrowernumber => $borrowernumber })->count;
81
    my $checkouts = Koha::Checkouts->search({ borrowernumber => $borrowernumber })->count;
Lines 84-90 if ( $patron ) { Link Here
84
    my $holds_pending = Koha::Holds->search({ borrowernumber => $borrowernumber, found => undef })->count;
83
    my $holds_pending = Koha::Holds->search({ borrowernumber => $borrowernumber, found => undef })->count;
85
    my $holds_waiting = Koha::Holds->search({ borrowernumber => $borrowernumber })->waiting->count;
84
    my $holds_waiting = Koha::Holds->search({ borrowernumber => $borrowernumber })->waiting->count;
86
    my $patron_messages = Koha::Patron::Messages->search({borrowernumber => $borrowernumber});
85
    my $patron_messages = Koha::Patron::Messages->search({borrowernumber => $borrowernumber});
87
    my $patron_note = $borr->{opacnote};
86
    my $patron_note = $patron->opacnote;
88
    my $total = $patron->account->balance;
87
    my $total = $patron->account->balance;
89
88
90
    if  ( $checkouts > 0 || $overdues_count > 0 || $holds_pending > 0 || $holds_waiting > 0 || $total > 0 || $patron_messages > 0 ) {
89
    if  ( $checkouts > 0 || $overdues_count > 0 || $holds_pending > 0 || $holds_waiting > 0 || $total > 0 || $patron_messages > 0 ) {
91
- 

Return to bug 26123