dmails: allow marking dmails as unread.
* Add ability to mark dmails as unread. * Fix users.unread_dmail_count to not count deleted dmails. * Fix show action so that API calls don't mark dmails as read. * Don't show the unread dmail notice on the /dmails page itself. * Stop using users.has_mail flag.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<div class="notice notice-info notice-large" id="dmail-notice" data-id="<%= CurrentUser.dmails.unread.first.id %>">
|
||||
<h2>You have <%= link_to "unread mail", dmails_path(search: {owner_id: CurrentUser.id, to_id: CurrentUser.id}, folder: "received") %>.</h2>
|
||||
<div class="notice notice-info notice-large" id="dmail-notice" data-id="<%= latest_unread_dmail(CurrentUser.user) %>">
|
||||
<h2>You have <%= link_to "unread mail", dmails_path(search: { folder: "received" }) %>.</h2>
|
||||
<div><%= link_to "Close this", "#", id: "hide-dmail-notice" %></div>
|
||||
</div>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<% if @user.id == CurrentUser.user.id %>
|
||||
<%= subnav_link_to "Profile", profile_path %>
|
||||
<%= subnav_link_to "Settings", settings_path %>
|
||||
<%= subnav_link_to "Messages #{CurrentUser.user.dmail_count}", dmails_path %>
|
||||
<%= subnav_link_to "Messages #{unread_dmail_indicator(CurrentUser.user)}", dmails_path(search: { folder: "received" }) %>
|
||||
|
||||
<% if !@user.is_platinum? %>
|
||||
<%= subnav_link_to "Upgrade", new_user_upgrade_path %>
|
||||
|
||||
Reference in New Issue
Block a user