dmails: remove ability to mark dmails as spam.

Instead of marking messages as spam, users can either report the message
or mark it as deleted.
This commit is contained in:
evazion
2020-02-02 23:43:38 -06:00
parent b8aa223ecb
commit 170a0e8a48
4 changed files with 3 additions and 12 deletions

View File

@@ -4,7 +4,6 @@
<%= subnav_link_to "Received", dmails_path(search: { folder: "received" }) %>
<%= subnav_link_to "Unread", dmails_path(search: { folder: "unread" }) %>
<%= subnav_link_to "Sent", dmails_path(search: { folder: "sent" }) %>
<%= subnav_link_to "Spam", dmails_path(search: { folder: "spam" }) %>
<%= subnav_link_to "Deleted", dmails_path(search: { folder: "deleted" }) %>
<li>|</li>
<%= subnav_link_to "New", new_dmail_path %>

View File

@@ -28,11 +28,6 @@
<%= link_to "Respond", new_dmail_path(:respond_to_id => @dmail) %>
| <%= link_to "Forward", new_dmail_path(:respond_to_id => @dmail, :forward => true) %>
| <%= link_to "Share", dmail_path(@dmail, key: @dmail.key), title: "Anyone with this link will be able to view this dmail." %>
<% if @dmail.is_spam? %>
| <%= link_to "Not spam", dmail_path(@dmail, format: :js), remote: :true, method: :put, "data-params": "dmail[is_spam]=false" %>
<% else %>
| <%= link_to "Spam", dmail_path(@dmail, format: :js), remote: :true, method: :put, "data-params": "dmail[is_spam]=true" %>
<% end %>
<% if @dmail.reportable_by?(CurrentUser.user) %>
| <%= link_to "Report", new_moderation_report_path(moderation_report: { model_type: "Dmail", model_id: @dmail.id }), remote: true, title: "Report this dmail to the moderators" %>
<% end %>