Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
$out->{"total_out"} = reduce { $a + $out->{$b} } 0, qw/out overdue long_overdue/;
+ my $unread_msgs = $e->search_actor_usr_message([
+ {usr => $user_id, read_date => undef, deleted => 'f'},
+ {idlist => 1}
+ ]);
+
return {
user => {
first_given_name => $user->first_given_name,
},
fines => $fines->to_bare_hash,
checkouts => $out,
- holds => $holds
+ holds => $holds,
+ messages => { unread => scalar(@$unread_msgs) }
};
}
for now until a better color is picked - if needed.
*/
#dash_fines { color: [% css_colors.text_attention %]; }
+#dash_messages { color: [% css_colors.text_attention %]; }
#header-wrap {
background: linear-gradient([% css_colors.primary %], [% css_colors.primary_fade %]);
%]"><span id="dash_fines">[% money(ctx.user_stats.fines.balance_owed)
%]</span> [% l("Fines") %]</a>
</span>
+ <span class="dash_divider">|</span>
+ <span class="dash-align">
+ <a class="dash-link" href="[% mkurl(ctx.opac_root _ '/myopac/messages')
+ %]"><span id="dash_messages">[% ctx.user_stats.messages.unread
+ %]</span> [% l("Unread Messages") %]</a>
+ </span>
</div>
</div>
[% END %]