conditionally hide spam/ham links
This commit is contained in:
@@ -1 +1,2 @@
|
|||||||
Danbooru.notice("Message marked as not spam");
|
Danbooru.notice("Message marked as not spam");
|
||||||
|
$("#spam-links").hide();
|
||||||
@@ -30,11 +30,13 @@
|
|||||||
| <%= link_to "Filter messages like these", edit_maintenance_user_dmail_filter_path(:dmail_id => @dmail.id) %>
|
| <%= 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" %>
|
| <%= link_to "Permalink", dmail_path(@dmail, :key => @dmail.key), :title => "Use this URL to privately share with a moderator" %>
|
||||||
<% if CurrentUser.is_gold? %>
|
<% if CurrentUser.is_gold? %>
|
||||||
<% if @dmail.is_spam? %>
|
<span id="spam-links">
|
||||||
| <%= link_to "Not spam", ham_dmail_path(@dmail) %>
|
<% if @dmail.is_spam? %>
|
||||||
<% else %>
|
| <%= link_to "Not spam", ham_dmail_path(@dmail), remote: :true, method: :post %>
|
||||||
| <%= link_to "Mark as spam", spam_dmail_path(@dmail) %>
|
<% else %>
|
||||||
<% end %>
|
| <%= link_to "Mark as spam", spam_dmail_path(@dmail), remote: :true, method: :post %>
|
||||||
|
<% end %>
|
||||||
|
</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
Danbooru.notice("Message marked as spam");
|
Danbooru.notice("Message marked as spam");
|
||||||
|
$("#spam-links").hide();
|
||||||
Reference in New Issue
Block a user