diff --git a/app/controllers/moderator/post/disapprovals_controller.rb b/app/controllers/moderator/post/disapprovals_controller.rb
index 9795bea50..dcb2d76d6 100644
--- a/app/controllers/moderator/post/disapprovals_controller.rb
+++ b/app/controllers/moderator/post/disapprovals_controller.rb
@@ -11,6 +11,10 @@ module Moderator
respond_with(@post_disapproval)
end
+ def index
+ @post_disapprovals = PostDisapproval.paginate(params[:page])
+ end
+
private
def post_disapproval_params
diff --git a/app/views/moderator/post/disapprovals/index.html.erb b/app/views/moderator/post/disapprovals/index.html.erb
new file mode 100644
index 000000000..3f240668a
--- /dev/null
+++ b/app/views/moderator/post/disapprovals/index.html.erb
@@ -0,0 +1,30 @@
+
+
+
Disapprovals
+
+
+
+
+ | Post |
+ Reason |
+ Creator |
+
+
+
+ <% @post_disapprovals.each do |post_disapproval| %>
+
+ | <%= link_to post_disapproval.post_id, post_path(post_disapproval.post_id) %> |
+ <%= post_disapproval.reason %>: <%= post_disapproval.message %> |
+ <%= post_disapproval.user.name %> |
+
+ <% end %>
+
+
+
+ <%= numbered_paginator(@post_disapprovals) %>
+
+
+
+<% content_for(:page_title) do %>
+ Post Disapprovals - <%= Danbooru.config.app_name %>
+<% end %>
diff --git a/app/views/moderator/post/queues/_quick_mod.html.erb b/app/views/moderator/post/queues/_quick_mod.html.erb
index 246ba4e95..6d82b03cc 100644
--- a/app/views/moderator/post/queues/_quick_mod.html.erb
+++ b/app/views/moderator/post/queues/_quick_mod.html.erb
@@ -1,7 +1,7 @@
<%= link_to_if post.is_approvable?, "Approve", moderator_post_approval_path(post_id: post.id), method: :post, remote: true, class: "approve-link btn" %> |
- <%= link_to "Breaks Rules", moderator_post_disapproval_path(post_disapproval: { post_id: post.id, reason: "breaks_rules" }), method: :post, remote: true, class: "disapprove-link btn" %> |
- <%= link_to "Poor Quality", moderator_post_disapproval_path(post_disapproval: { post_id: post.id, reason: "poor_quality" }), method: :post, remote: true, class: "disapprove-link btn" %> |
- <%= link_to "No Interest", moderator_post_disapproval_path(post_disapproval: { post_id: post.id, reason: "disinterest" }), method: :post, remote: true, class: "disapprove-link btn" %> |
+ <%= link_to "Breaks Rules", moderator_post_disapprovals_path(post_disapproval: { post_id: post.id, reason: "breaks_rules" }), method: :post, remote: true, class: "disapprove-link btn" %> |
+ <%= link_to "Poor Quality", moderator_post_disapprovals_path(post_disapproval: { post_id: post.id, reason: "poor_quality" }), method: :post, remote: true, class: "disapprove-link btn" %> |
+ <%= link_to "No Interest", moderator_post_disapprovals_path(post_disapproval: { post_id: post.id, reason: "disinterest" }), method: :post, remote: true, class: "disapprove-link btn" %> |
<%= link_to "Detailed Rejection", "#", "data-post-id" => post.id, class: "detailed-rejection-link btn" %>
diff --git a/app/views/post_disapprovals/_detailed_rejection_dialog.html.erb b/app/views/post_disapprovals/_detailed_rejection_dialog.html.erb
index 1529032b0..4e1462359 100644
--- a/app/views/post_disapprovals/_detailed_rejection_dialog.html.erb
+++ b/app/views/post_disapprovals/_detailed_rejection_dialog.html.erb
@@ -1,7 +1,7 @@
You can supply a short message to the uploader explaining why you rejected this upload.
- <%= simple_form_for(PostDisapproval.new, url: moderator_post_disapproval_path, remote: true, id: "detailed-rejection-form") do |f| %>
+ <%= simple_form_for(PostDisapproval.new, url: moderator_post_disapprovals_path, remote: true, id: "detailed-rejection-form") do |f| %>
<%= f.hidden_field :post_id, value: "x" %>
<%= f.input :reason, collection: [["Breaks Rules", "breaks_rules"], ["Poor Quality", "poor_quality"], ["No interest", "disinterest"]] %>
<%= f.input :message, as: :string %>
diff --git a/app/views/posts/partials/show/_options.html.erb b/app/views/posts/partials/show/_options.html.erb
index 44522f69c..b69c4c299 100644
--- a/app/views/posts/partials/show/_options.html.erb
+++ b/app/views/posts/partials/show/_options.html.erb
@@ -42,7 +42,7 @@
<% if post.is_approvable? && !post.is_deleted? %>
<%= link_to "Approve", moderator_post_approval_path(:post_id => post.id), :remote => true, :method => :post, :id => "approve", :"data-shortcut" => "shift+o", :"data-confirm" => "Are you sure you want to approve this post?" %>
-
<%= link_to "Hide from queue", moderator_post_disapproval_path(post_disapproval: { post_id: post.id, reason: "disinterest" }), remote: true, method: :post, id: "disapprove" %>
+
<%= link_to "Hide from queue", moderator_post_disapprovals_path(post_disapproval: { post_id: post.id, reason: "disinterest" }), remote: true, method: :post, id: "disapprove" %>
<% end %>
<% if post.is_banned? %>
diff --git a/app/views/static/site_map.html.erb b/app/views/static/site_map.html.erb
index 25c30c7d0..36cb9fb64 100644
--- a/app/views/static/site_map.html.erb
+++ b/app/views/static/site_map.html.erb
@@ -16,6 +16,7 @@
<%= link_to("Mass Edit", edit_moderator_tag_path) %>
<% end %>
<%= link_to("Similar Images Search", iqdb_queries_path) %>
+
<%= link_to("Disapprovals", moderator_post_disapprovals_path) %>
Post Events
diff --git a/config/routes.rb b/config/routes.rb
index ad3bbea85..079ce3215 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -22,7 +22,7 @@ Rails.application.routes.draw do
end
end
resource :approval, :only => [:create]
- resource :disapproval, :only => [:create]
+ resources :disapprovals, :only => [:create, :index]
resources :posts, :only => [:delete, :undelete, :expunge, :confirm_delete] do
member do
get :confirm_delete
diff --git a/test/functional/moderator/post/disapprovals_controller_test.rb b/test/functional/moderator/post/disapprovals_controller_test.rb
index bd7af7f09..ec9ead0a7 100644
--- a/test/functional/moderator/post/disapprovals_controller_test.rb
+++ b/test/functional/moderator/post/disapprovals_controller_test.rb
@@ -14,7 +14,7 @@ module Moderator
context "create action" do
should "render" do
assert_difference("PostDisapproval.count", 1) do
- post_auth moderator_post_disapproval_path, @admin, params: { post_disapproval: { post_id: @post.id, reason: "breaks_rules" }, format: "js" }
+ post_auth moderator_post_disapprovals_path, @admin, params: { post_disapproval: { post_id: @post.id, reason: "breaks_rules" }, format: "js" }
end
assert_response :success
end