changes to flags/appeals
This commit is contained in:
@@ -4,7 +4,13 @@ module PostFlagsHelper
|
|||||||
html << '<ul>'
|
html << '<ul>'
|
||||||
|
|
||||||
post.flags.each do |flag|
|
post.flags.each do |flag|
|
||||||
html << '<li>' + flag.reason + ' - ' + link_to(flag.creator.name, user_path(flag.creator)) + ' ' + time_ago_in_words(flag.created_at) + ' ago</li>'
|
html << '<li>' + flag.reason
|
||||||
|
|
||||||
|
if CurrentUser.is_janitor?
|
||||||
|
html << ' - ' + link_to(flag.creator.name, user_path(flag.creator))
|
||||||
|
end
|
||||||
|
|
||||||
|
html << ' ' + time_ago_in_words(flag.created_at) + ' ago</li>'
|
||||||
end
|
end
|
||||||
|
|
||||||
html << '</ul>'
|
html << '</ul>'
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ class PostAppeal < ActiveRecord::Base
|
|||||||
scope :recent, lambda {where(["created_at >= ?", 1.day.ago])}
|
scope :recent, lambda {where(["created_at >= ?", 1.day.ago])}
|
||||||
|
|
||||||
def validate_creator_is_not_limited
|
def validate_creator_is_not_limited
|
||||||
if appeal_count_for_creator >= 5
|
if appeal_count_for_creator >= 1
|
||||||
errors[:creator] << "can appeal 5 posts a day"
|
errors[:creator] << "can appeal one post a day"
|
||||||
false
|
false
|
||||||
else
|
else
|
||||||
true
|
true
|
||||||
|
|||||||
@@ -2,16 +2,7 @@
|
|||||||
<div id="a-index">
|
<div id="a-index">
|
||||||
<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>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>
|
<p>All users are limited to one appeal a day. For more details, please read the <%= link_to "wiki", wiki_pages_path(:title => "help:deletion_appeals") %>.</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| %>
|
<%= simple_form_for(@post_appeal, :remote => true, :format => :js) do |f| %>
|
||||||
<%= hidden_field_tag "post_appeal[post_id]", @post_appeal.post_id %>
|
<%= hidden_field_tag "post_appeal[post_id]", @post_appeal.post_id %>
|
||||||
|
|||||||
Reference in New Issue
Block a user