Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

AO3-5234: Add links, fix false errors on spam page #3176

Merged
merged 1 commit into from Nov 21, 2017
Jump to file or symbol
Failed to load files and symbols.
+10 −3
Split
@@ -37,7 +37,7 @@ def self.processed_bulk_ids(params = {})
end
def self.bulk_review(ids)
- return unless ids.present?
+ return true unless ids.present?
where(id: ids).update_all("reviewed = 1")
admin_settings = Rails.cache.fetch("admin_settings"){ AdminSetting.first }
# If spam isn't hidden by default, hide it now
@@ -49,7 +49,7 @@ def self.bulk_review(ids)
end
def self.bulk_approve(ids)
- return unless ids.present?
+ return true unless ids.present?
where(id: ids).update_all("approved = 1")
Work.joins(:moderated_work).where("moderated_works.id IN (?)", ids).each do |work|
work.mark_as_ham!
@@ -3,11 +3,18 @@
<!--/descriptions-->
<!--subnav-->
+<ul class="navigation actions" role="navigation">
+ <li>
+ <%= span_if_current ts("Reviewed Works"), { show: "reviewed" } %>
+ </li>
+ <li>
+ <%= span_if_current ts("Approved Works"), { show: "approved" } %>
+ </li>
+</ul>
<!--/subnav-->
<!--main content-->
<%= form_tag "/admin/spam/bulk_update", method: :post do %>
- <%= submit_button nil, ts("Update Works") %>
<table id="spam_works" summary="<%= ts("Titles, creators, and revision dates for works that have been automatically marked as spam, along with options to verify or correct their spam status.") %>">
<caption><%= ts("Works Marked as Spam") %></caption>
<thead>