controllers: move /moderator/post/disapprovals to /post_disapprovals.
This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
<% if @post_disapproval.errors.any? %>
|
||||
Danbooru.error("Error: " + <%= @post_disapproval.errors.full_messages.join("; ").to_json.html_safe %>);
|
||||
<% else %>
|
||||
if ($("#c-posts #a-show").length) {
|
||||
location.reload();
|
||||
} else if ($("#c-moderator-post-queues").length) {
|
||||
$("#c-moderator-post-queues #post-<%= @post_disapproval.post.id %>").hide();
|
||||
$(window).trigger("danbooru:modqueue_increment_processed");
|
||||
Danbooru.notice("Post was hidden");
|
||||
}
|
||||
<% end %>
|
||||
@@ -1,40 +0,0 @@
|
||||
<div id="c-moderator-post-disapprovals">
|
||||
<div id="a-index">
|
||||
<h1>Disapprovals</h1>
|
||||
|
||||
<%= search_form_for(moderator_post_disapprovals_path) do |f| %>
|
||||
<%= f.input :user_name, label: "Creator", input_html: { value: params[:search][:user_name] } %>
|
||||
<%= f.input :post_id, label: "Post ID", input_html: { value: params[:search][:post_id] } %>
|
||||
<%= f.input :post_tags_match, label: "Tags", input_html: { value: params[:search][:post_tags_match], data: { autocomplete: "tag-query" } } %>
|
||||
<%= f.input :message_matches, label: "Message", input_html: { value: params[:search][:message_matches] } %>
|
||||
<%= f.input :reason, label: "Reason", collection: %w[breaks_rules disinterest poor_quality].map { |x| [x.humanize, x] }, include_blank: true, selected: params[:search][:reason] %>
|
||||
<%= f.input :has_message, label: "Has Message?", collection: %w[Yes No], include_blank: true, selected: params[:search][:has_message] %>
|
||||
<%= f.input :order, collection: [["ID", "id_desc"], ["Post ID", "post_id_desc"]], selected: params[:search][:order] %>
|
||||
<%= f.submit "Search" %>
|
||||
<% end %>
|
||||
|
||||
<%= table_for @post_disapprovals, {class: "striped autofit", width: "100%"} do |t| %>
|
||||
<% t.column "Post" do |post_disapproval| %>
|
||||
<%= link_to "post ##{post_disapproval.post_id}", post_path(post_disapproval.post_id) %>
|
||||
<%= link_to "»", moderator_post_disapprovals_path(search: params[:search].merge(post_id: post_disapproval.post_id)) %>
|
||||
<% end %>
|
||||
<% t.column "Message", td: {class: "col-expand"} do |post_disapproval| %>
|
||||
<div class="prose">
|
||||
<%= format_text(post_disapproval.message) %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% t.column "Reason" do |post_disapproval| %>
|
||||
<%= link_to post_disapproval.reason.humanize, moderator_post_disapprovals_path(search: params[:search].merge(reason: post_disapproval.reason)) %>
|
||||
<% end %>
|
||||
<% t.column "Created" do |post_disapproval| %>
|
||||
<%= link_to_user post_disapproval.user %>
|
||||
<%= link_to "»", moderator_post_disapprovals_path(search: params[:search].merge(creator_name: post_disapproval.user&.name)) %>
|
||||
<p>
|
||||
<%= compact_time(post_disapproval.updated_at) %>
|
||||
</p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<%= numbered_paginator(@post_disapprovals) %>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,7 +1,7 @@
|
||||
<div class="quick-mod">
|
||||
<%= 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_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 "Breaks Rules", post_disapprovals_path(post_disapproval: { post_id: post.id, reason: "breaks_rules" }), method: :post, remote: true, class: "disapprove-link btn" %> |
|
||||
<%= link_to "Poor Quality", post_disapprovals_path(post_disapproval: { post_id: post.id, reason: "poor_quality" }), method: :post, remote: true, class: "disapprove-link btn" %> |
|
||||
<%= link_to "No Interest", 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" %>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user