Merge pull request #3302 from r888888888/akismet

akismet integration
This commit is contained in:
Albert Yi
2017-09-14 14:02:15 -07:00
committed by GitHub
14 changed files with 94 additions and 3 deletions

View File

@@ -4,6 +4,7 @@
<li><%= link_to "All", all_dmails_path(set_default_folder: true) %></li>
<li><%= link_to "Received", received_dmails_path(set_default_folder: true) %></li>
<li><%= link_to "Sent", sent_dmails_path(set_default_folder: true) %></li>
<li><%= link_to "Spam", spam_dmails_path %></li>
<li>|</li>
<li><%= link_to "New", new_dmail_path %></li>
<li><%= link_to "Mark all as read", {:controller => "dmails", :action => "mark_all_as_read"}, :method => :post, :remote => true %></li>

View File

@@ -0,0 +1,2 @@
Danbooru.notice("Message marked as not spam");
$("#spam-links").hide();

View File

@@ -29,6 +29,15 @@
| <%= link_to "Forward", new_dmail_path(:respond_to_id => @dmail, :forward => true) %>
| <%= link_to "Filter messages like these", edit_maintenance_user_dmail_filter_path(:dmail_id => @dmail.id) %>
| <%= link_to "Permalink", dmail_path(@dmail, :key => @dmail.key), :title => "Use this URL to privately share with a moderator" %>
<% if CurrentUser.is_gold? %>
<span id="spam-links">
<% if @dmail.is_spam? %>
| <%= link_to "Not spam", ham_dmail_path(@dmail), remote: :true, method: :post %>
<% else %>
| <%= link_to "Mark as spam", spam_dmail_path(@dmail), remote: :true, method: :post %>
<% end %>
</span>
<% end %>
</p>
</div>
</div>

View File

@@ -0,0 +1,2 @@
Danbooru.notice("Message marked as spam");
$("#spam-links").hide();