refactored post mod queue
This commit is contained in:
1
app/views/moderator/post/approvals/create.js.erb
Normal file
1
app/views/moderator/post/approvals/create.js.erb
Normal file
@@ -0,0 +1 @@
|
||||
$("#post-<%= @post.id %>").remove();
|
||||
40
app/views/moderator/post/dashboards/show.html.erb
Normal file
40
app/views/moderator/post/dashboards/show.html.erb
Normal file
@@ -0,0 +1,40 @@
|
||||
<div id="c-moderator-post-dashboards">
|
||||
<div id="a-show">
|
||||
<div id="search">
|
||||
<%= form_tag(moderator_post_dashboard_path, :method => :get) do %>
|
||||
<%= text_field_tag "query", params[:query], :size => 40 %>
|
||||
<%= submit_tag "Search" %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h1>Moderation Queue</h1>
|
||||
|
||||
<% @posts.each do |post| %>
|
||||
<article id="post-<%= post.id %>">
|
||||
<aside>
|
||||
<%= link_to(image_tag(post.medium_file_url), post_path(post)) %>
|
||||
</aside>
|
||||
|
||||
<section>
|
||||
<ul>
|
||||
<li><%= link_to "Approve", moderator_post_approval_path(:post_id => post.id), :remote => true, :method => :post %> | <%= link_to "Disapprove", moderator_post_disapproval_path(:post_id => post.id), :remote => true, :method => :post %></li>
|
||||
<li>Rating: <%= post.rating %></li>
|
||||
<li>Score: <%= post.score %></li>
|
||||
<li>Uploader: <%= link_to(post.uploader.name, user_path(post.uploader_id)) %> <%= time_ago_in_words(post.created_at) %> ago</li>
|
||||
<% if post.is_flagged? %>
|
||||
<li>Flagged: <%= post_flag_reason(post) %></li>
|
||||
<% end %>
|
||||
<% if (post.is_flagged? || post.is_deleted?) && post.appeals.any? %>
|
||||
<li>Appeals: <%= post_appeal_reason(post) %></li>
|
||||
<% end %>
|
||||
<li>Disapprovals: <%= post.disapprovals.count %></li>
|
||||
<li>Tags: <%= post.tag_string %></li>
|
||||
</ul>
|
||||
</section>
|
||||
</article>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
1
app/views/moderator/post/disapprovals/create.js.erb
Normal file
1
app/views/moderator/post/disapprovals/create.js.erb
Normal file
@@ -0,0 +1 @@
|
||||
$("#post-<%= @post.id %>").remove();
|
||||
1
app/views/moderator/post/posts/delete.js.erb
Normal file
1
app/views/moderator/post/posts/delete.js.erb
Normal file
@@ -0,0 +1 @@
|
||||
$("#post-<%= @post.id %>").remove();
|
||||
0
app/views/moderator/post/posts/undelete.js.erb
Normal file
0
app/views/moderator/post/posts/undelete.js.erb
Normal file
5
app/views/post_votes/create.js.erb
Normal file
5
app/views/post_votes/create.js.erb
Normal file
@@ -0,0 +1,5 @@
|
||||
<% if @error %>
|
||||
alert("<%= escape_javascript @error.to_s %>");
|
||||
<% else %>
|
||||
$("#score-for-post-<%= @post.id %> span").text(<%= @post.score %>);
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user