modqueue: add sidebar.

Add a sidebar to the modqueue page that shows the following information:

* Number of pending and flagged posts.
* Number of posts disapproved for poor quality or breaking rules.
* Top uploaders in the queue.
* Top artist, copyright, and character tags in the queue.
This commit is contained in:
evazion
2020-02-29 17:04:39 -06:00
parent 475d6ae7cf
commit 9ddf408ec5
8 changed files with 128 additions and 45 deletions

View File

@@ -13,14 +13,14 @@ class RelatedTagCalculatorTest < ActiveSupport::TestCase
end
context "RelatedTagCalculator" do
context "#frequent_tags_for_posts" do
context "#frequent_tags_for_post_array" do
should "calculate the most frequent tags for a set of posts" do
create(:post, tag_string: "aaa bbb ccc ddd")
create(:post, tag_string: "aaa bbb ccc")
create(:post, tag_string: "aaa bbb")
posts = Post.tag_match("aaa")
assert_equal(%w[aaa bbb ccc ddd], RelatedTagCalculator.frequent_tags_for_posts(posts))
assert_equal(%w[aaa bbb ccc ddd], RelatedTagCalculator.frequent_tags_for_post_array(posts))
end
end