* Removed unapprovals, added post flags and post appeals (still need to update tests)
* Restyled text
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<div id="artists">
|
||||
<div id="edit">
|
||||
<div id="c-artists">
|
||||
<div id="a-edit">
|
||||
<h3>Edit Artist</h3>
|
||||
<%= render "form" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<div id="artists">
|
||||
<div id="new">
|
||||
<div id="c-artists">
|
||||
<div id="a-new">
|
||||
<h2>New Artist</h2>
|
||||
<%= render "form" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div id="c-artists">
|
||||
<div id="a-search">
|
||||
<h1>Search Artists</h1>
|
||||
<h3>Search Artists</h3>
|
||||
|
||||
<div id="search-form" style="margin-bottom: 1em;">
|
||||
<%= simple_form_for(@search) do |f| %>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div id="artists">
|
||||
<div id="show">
|
||||
<h1>Artist: <%= @artist.name.tr("_", " ") %></h1>
|
||||
<div id="c-artists">
|
||||
<div id="a-show">
|
||||
<h3>Artist: <%= @artist.name.tr("_", " ") %></h3>
|
||||
|
||||
<% unless @artist.notes.blank? %>
|
||||
<div style="margin-bottom: 1em;">
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<% content_for(:secondary_links) do %>
|
||||
<menu>
|
||||
<li><%= link_to "Listing", comments_path(:group_by => "post") %></li>
|
||||
<li><%= link_to "Search", search_comments_path %></li>
|
||||
<li><%= link_to "Help", wiki_pages_path(:title => "help:comments") %></li>
|
||||
</menu>
|
||||
<% end %>
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
<div id="c-comments">
|
||||
<div id="a-index">
|
||||
<% @comments.each do |comment| %>
|
||||
<%= render :partial => "comments/partials/index/list", :locals => {:post => comment.post, :comments => [comment], :show_header => false} %>
|
||||
<% end %>
|
||||
<div class="comments-for-post">
|
||||
<div class="list-of-comments">
|
||||
<% @comments.each do |comment| %>
|
||||
<%= render :partial => "comments/partials/show/comment", :locals => {:post => comment.post, :comment => comment, :show_header => false} %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= render "comments/secondary_links" %>
|
||||
<%= render "comments/secondary_links" %>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<article data-comment-id="<%= comment.id %>">
|
||||
<div class="author">
|
||||
<h1><%= link_to comment.creator_name, user_path(comment.creator_id) %></h1>
|
||||
<h4><%= link_to comment.creator_name, user_path(comment.creator_id) %></h4>
|
||||
<p>
|
||||
<%= time_ago_in_words(comment.created_at) %> ago
|
||||
</p>
|
||||
|
||||
13
app/views/comments/search.html.erb
Normal file
13
app/views/comments/search.html.erb
Normal file
@@ -0,0 +1,13 @@
|
||||
<div id="c-comments">
|
||||
<div id="a-search">
|
||||
<h1>Search Comments</h1>
|
||||
<%= simple_form_for(@search) do |f| %>
|
||||
<%= hidden_field_tag "group_by", "comment" %>
|
||||
<%= f.input :body_matches, :label => "Body" %>
|
||||
<%= f.input :creator_name_equals, :label => "User" %>
|
||||
<%= f.input :post_tag_match, :label => "Tags" %>
|
||||
|
||||
<%= f.button :submit, "Search" %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,10 +1,8 @@
|
||||
<article data-forum-post-id="<%= forum_post.id %>">
|
||||
<div class="author">
|
||||
<h1><%= link_to forum_post.creator.name, user_path(forum_post.creator_id) %></h1>
|
||||
<h4><%= link_to forum_post.creator.name, user_path(forum_post.creator_id) %></h4>
|
||||
<p>
|
||||
<time datetime="<%= forum_post.created_at %>">
|
||||
<%= time_ago_in_words(forum_post.created_at) %> ago
|
||||
</time>
|
||||
<%= time_ago_in_words(forum_post.created_at) %> ago
|
||||
</p>
|
||||
</div>
|
||||
<div class="content">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div id="c-forum-topics">
|
||||
<div id="a-edit">
|
||||
<h1>Edit Forum Post</h1>
|
||||
<h3>Edit Forum Post</h3>
|
||||
|
||||
<%= render "form" %>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div id="c-forum-topics">
|
||||
<div id="a-new">
|
||||
<h1>New Forum Post</h1>
|
||||
<h3>New Forum Post</h3>
|
||||
<%= render "form" %>
|
||||
<%= error_messages_for "forum_post" %>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div id="c-forum-topics">
|
||||
<div id="a-search">
|
||||
<h1>Search Forum Posts</h1>
|
||||
<h3>Search Forum Posts</h3>
|
||||
<%= simple_form_for @search do |f| %>
|
||||
<%= f.input :topic_title_matches, :label => "Title" %>
|
||||
<%= f.input :body_matches, :label => "Body" %>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div id="c-forum-topics">
|
||||
<div id="a-edit">
|
||||
<h1>Edit Forum Topic</h1>
|
||||
<h3>Edit Forum Topic</h3>
|
||||
|
||||
<%= render "form" %>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<h1>Forum</h1>
|
||||
<h3>Forum</h3>
|
||||
|
||||
<table width="100%" class="striped">
|
||||
<thead>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div id="c-forum-topics">
|
||||
<div id="a-new">
|
||||
<h1>New Forum Topic</h1>
|
||||
<h3>New Forum Topic</h3>
|
||||
|
||||
<%= render "form" %>
|
||||
</div>
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
<div id="c-forum-topics">
|
||||
<div id="a-show">
|
||||
<h1 id="forum-topic-title">
|
||||
<%= @forum_topic.title %>
|
||||
<% if @forum_topic.is_locked? %>
|
||||
<span class="info">(locked)</span>
|
||||
<% end %>
|
||||
<% if @forum_topic.is_sticky? %>
|
||||
<span class="info">(sticky)</span>
|
||||
<% end %>
|
||||
</h1>
|
||||
<% if @forum_topic.is_locked? %>
|
||||
<div class="notice">
|
||||
<p>This topic has been locked.</p>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= render :partial => "forum_posts/listing", :locals => {:forum_posts => @forum_posts} %>
|
||||
<%= render "paginator" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= render "secondary_links" %>
|
||||
<%= render "secondary_links" %>
|
||||
|
||||
<%= content_for(:page_title) do %>
|
||||
forum/<%= @forum_topic.title %>
|
||||
<% end %>
|
||||
@@ -48,12 +48,12 @@
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<% if flash[:notice] %>
|
||||
<%- if flash[:notice] -%>
|
||||
<div class="ui-corner-all ui-state-highlight" id="notice"><span class="ui-icon ui-icon-info"></span> <%= flash[:notice] %></div>
|
||||
<% else %>
|
||||
<%- else -%>
|
||||
<div class="ui-corner-all ui-state-highlight" id="notice" style="display: none;"><span class="ui-icon ui-icon-info"></span> </div>
|
||||
<% end %>
|
||||
|
||||
<%- end -%>
|
||||
|
||||
<div id="page">
|
||||
<%= yield :layout %>
|
||||
</div>
|
||||
|
||||
17
app/views/post_appeals/new.html.erb
Normal file
17
app/views/post_appeals/new.html.erb
Normal file
@@ -0,0 +1,17 @@
|
||||
<p>If this post was automatically deleted, <strong>then it means at least ten janitors all thought it didn't belong on the site</strong>. If you still believe this image was wrongfully deleted, then you can appeal its deletion.</p>
|
||||
|
||||
<p>Some valid reasons for appealing include:</p>
|
||||
|
||||
<ul>
|
||||
<li>Funny</li>
|
||||
<li>Weird</li>
|
||||
<li>Translated</li>
|
||||
<li>Part of a pool</li>
|
||||
</ul>
|
||||
|
||||
<p>All users are limited to 5 appeals a day. For more details, please read the <%= link_to "wiki", wiki_pages_path(:title => "help:deletion_appeals") %>.</p>
|
||||
|
||||
<%= simple_form_for(@post_appeal, :remote => true, :format => :js) do |f| %>
|
||||
<%= hidden_field_tag "post_appeal[post_id]", @post_appeal.post_id %>
|
||||
<%= f.text_field :reason, :size => "40x5" %>
|
||||
<% end %>
|
||||
@@ -2,8 +2,8 @@ var errors = <%= @unapproval.errors.full_messages.to_json.html_safe %>;
|
||||
if (errors.length > 0) {
|
||||
Danbooru.j_error(errors.join("; "));
|
||||
} else {
|
||||
Danbooru.j_alert("Unapproval", "Unapproval successful");
|
||||
Danbooru.j_alert("Flag", "Post flagged");
|
||||
$("a#approve").show();
|
||||
$("a#disapprove").show();
|
||||
$("a#unapprove").hide();
|
||||
$("a#flag").hide();
|
||||
}
|
||||
25
app/views/post_flags/new.html.erb
Normal file
25
app/views/post_flags/new.html.erb
Normal file
@@ -0,0 +1,25 @@
|
||||
<p>If you believe a post does not belong on this site, you can flag for its deletion. As a reminder, the following are some common reasons for flagging a post:</p>
|
||||
|
||||
<ul>
|
||||
<li>Not anime-related</li>
|
||||
<li>Furry: a character has body fur or an animal face</li>
|
||||
<li>Watermark: text or logo inserted by someone besides the original artist</li>
|
||||
<li>Poor compression: JPEG artifacts</li>
|
||||
<li>Guro: mutilation, extreme bodily distension</li>
|
||||
<li>Bad proportions: extremely large breasts or penises</li>
|
||||
<li>Manga: Multiple pages of a manga, doujinshi, or comic that don't stand up to individual scrutiny</li>
|
||||
<li>Fake translations: Made up translations are banned</li>
|
||||
</ul>
|
||||
|
||||
<p>The following are <strong>NOT</strong> valid reasons for flagging a post:</p>
|
||||
|
||||
<ul>
|
||||
<li>Duplicate: just parent to the original</li>
|
||||
</ul>
|
||||
|
||||
<p>Enter a reason:</p>
|
||||
|
||||
<%= simple_form_for(@post_flag, :remote => true, :format => :js) do |f| %>
|
||||
<%= hidden_field_tag "post_flag[post_id]", @post_flag.post_id %>
|
||||
<%= f.text_field :reason %>
|
||||
<% end %>
|
||||
@@ -1,5 +1,5 @@
|
||||
$("#c-posts a#approve").hide();
|
||||
$("#c-posts a#disapprove").hide();
|
||||
$("#c-posts a#unapprove").show();
|
||||
$("#c-posts a#flag").show();
|
||||
|
||||
$("#c-post-moderation #post-<%= @post.id %>").hide();
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
$("#c-posts a#approve").hide();
|
||||
$("#c-posts a#disapprove").hide();
|
||||
$("#c-posts a#unapprove").hide();
|
||||
|
||||
$("#c-post-moderation #post-<%= @post.id %>").hide();
|
||||
|
||||
@@ -23,7 +23,10 @@
|
||||
<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.unapproval.reason %> by <%= post.unapproval.unapprover.name %></li>
|
||||
<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>
|
||||
|
||||
@@ -17,6 +17,5 @@
|
||||
<% if CurrentUser.user.is_janitor? %>
|
||||
<option value="approve">Approve</option>
|
||||
<% end %>
|
||||
<option value="unapprove">Unapprove</option>
|
||||
</select>
|
||||
</form>
|
||||
@@ -4,8 +4,11 @@
|
||||
<% if post.approver %>
|
||||
<li>Approver: <%= link_to(post.approver.name, user_path(post.approver_id)) %></li>
|
||||
<% end %>
|
||||
<% if post.unapproval %>
|
||||
<li>Unapproved: <%= post.unapproval.reason %> (by <%= post.unapproval.unapprover.name %>)</li>
|
||||
<% if post.is_flagged? %>
|
||||
<li>Flagged: <%= post_flag_reason(post) %></li>
|
||||
<% end %>
|
||||
<% if (post.is_flagged? || post.is_deleted?) && post.appeals.any? %>
|
||||
<li>Appealed: <%= post_appeal_reason(post) %></li>
|
||||
<% end %>
|
||||
<li>
|
||||
Size: <%= number_to_human_size(post.file_size) %>
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
<li><%= link_to "Favorite", favorite_path(post), :remote => true, :method => :post, :id => "add-to-favorites" %></li>
|
||||
<li><%= link_to "Unfavorite", favorite_path(post), :remote => true, :method => :delete, :id => "remove-from-favorites" %></li>
|
||||
<li><%= link_to "Translate", "#" %></li>
|
||||
<li><%= link_to "Unapprove", new_unapproval_path(:post_id => post.id), :id => "unapprove" %></li>
|
||||
<li><%= link_to "Flag", new_post_flag_path(:post_id => post.id), :id => "flag" %></li>
|
||||
<li><%= link_to "Appeal", new_post_appeal_path(:post_id => post.id), :id => "appeal" %></li>
|
||||
<% if CurrentUser.is_janitor? %>
|
||||
<li><%= link_to "Approve", post_moderation_approve_path(:post_id => post.id), :remote => true, :method => :put, :id => "approve" %></li>
|
||||
<li><%= link_to "Disapprove", post_moderation_disapprove_path(:post_id => post.id), :remote => true, :method => :put, :id => "disapprove" %></li>
|
||||
|
||||
@@ -60,8 +60,12 @@
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div id="unapprove-dialog" title="Unapprove Post">
|
||||
<%= render :template => "unapprovals/new" %>
|
||||
<div id="flag-dialog" title="Flag Post">
|
||||
<%= render :template => "post_flags/new" %>
|
||||
</div>
|
||||
|
||||
<div id="appeal-dialog" title="Appeal Post">
|
||||
<%= render :template => "post_appeals/new" %>
|
||||
</div>
|
||||
|
||||
<div id="add-to-pool-dialog" title="Add to Pool">
|
||||
@@ -78,7 +82,6 @@
|
||||
<meta name="favorites" content="<%= @post.fav_string %>">
|
||||
<meta name="pools" content="<%= @post.pool_string %>">
|
||||
<meta name="post-id" content="<%= @post.id %>">
|
||||
<meta name="post-is-unapprovable" content="<%= @post.is_unapprovable? %>">
|
||||
<meta name="post-is-approvable" content="<%= @post.is_approvable? %>">
|
||||
<meta name="post-is-deleted" content="<%= @post.is_deleted? %>">
|
||||
<% end %>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div id="c-tag-aliases">
|
||||
<div id="a-new">
|
||||
<h1>New Tag Alias</h1>
|
||||
<h3>New Tag Alias</h3>
|
||||
<%= simple_form_for(@tag_alias) do |f| %>
|
||||
<%= f.input :antecedent_name, :label => "From" %>
|
||||
<%= f.input :consequent_name, :label => "To" %>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div id="c-tag-aliases">
|
||||
<div id="a-new">
|
||||
<h1>New Tag Implication</h1>
|
||||
<h3>New Tag Implication</h3>
|
||||
<%= simple_form_for(@tag_implication) do |f| %>
|
||||
<%= f.input :antecedent_name, :label => "From" %>
|
||||
<%= f.input :consequent_name, :label => "To" %>
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
<menu>
|
||||
<li><%= link_to "Listing", tags_path %></li>
|
||||
<li><%= link_to "Search", search_tags_path %></li>
|
||||
<li><%= link_to "Aliases", tag_aliases_path %></li>
|
||||
<li><%= link_to "Implications", tag_implications_path %></li>
|
||||
<li><%= link_to "Help", wiki_pages_path(:search => {:title_equals => "help:tags"}) %></li>
|
||||
</menu>
|
||||
<% end %>
|
||||
|
||||
@@ -8,3 +8,5 @@
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= render "secondary_links" %>
|
||||
@@ -1,5 +0,0 @@
|
||||
<p>You can unapprove a post if you believe it breaks the rules or doesn't belong on this site. You must provide a reason.</p>
|
||||
<%= form_for(@unapproval, :remote => true, :format => :js) do |f| %>
|
||||
<%= hidden_field_tag "unapproval[post_id]", @unapproval.post_id %>
|
||||
<%= f.text_area :reason, :size => "40x5" %>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user