approvers: remove "you haven't moderated in awhile" notice.

Remove the nag message when an approver hasn't approved anything
recently. Also remove the modqueue random posts page. As of 3d410398a,
inactive approvers are now warned via dmails.
This commit is contained in:
evazion
2020-02-26 23:42:47 -06:00
parent 41103cb6b5
commit cded0f763b
12 changed files with 1 additions and 95 deletions

View File

@@ -1,15 +1,11 @@
module Moderator
module Post
class QueuesController < ApplicationController
RANDOM_COUNT = 12
respond_to :html, :json
before_action :approver_only
skip_before_action :api_check
def show
cookies.permanent[:moderated] = Time.now.to_i
if search_params[:per_page]
cookies.permanent["mq_per_page"] = search_params[:per_page]
end
@@ -21,23 +17,6 @@ module Moderator
respond_with(@posts)
end
def random
cookies.permanent[:moderated] = Time.now.to_i
::Post.without_timeout do
@posts = ::Post.includes(:disapprovals, :uploader).order("posts.id asc").pending_or_flagged.available_for_moderation(false).reorder("random()").limit(RANDOM_COUNT)
@posts.each # hack to force rails to eager load
if @posts.empty?
flash[:notice] = "Nothing left to moderate!"
redirect_to(params[:return_to] || posts_path)
return
end
end
respond_with(@posts)
end
protected
def per_page

View File

@@ -3,7 +3,6 @@ class PostApprovalsController < ApplicationController
respond_to :html, :xml, :json, :js
def create
cookies.permanent[:moderated] = Time.now.to_i
post = Post.find(params[:post_id])
@approval = post.approve!
respond_with(@approval)

View File

@@ -4,7 +4,6 @@ class PostDisapprovalsController < ApplicationController
respond_to :js, :html, :json, :xml
def create
cookies.permanent[:moderated] = Time.now.to_i
@post_disapproval = PostDisapproval.create(user: CurrentUser.user, **post_disapproval_params)
respond_with(@post_disapproval)
end