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

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

Return to bug 26123