fixes #134: Appeal option missing
This commit is contained in:
@@ -7,8 +7,8 @@
|
||||
}
|
||||
|
||||
Danbooru.PostAppeal.hide_or_show_appeal_link = function() {
|
||||
if (Danbooru.meta("post-is-deleted") != "true") {
|
||||
$("a#appeal").hide();
|
||||
if (Danbooru.meta("post-is-flagged") !== "true") {
|
||||
$("#c-posts #appeal").hide();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
5
app/assets/stylesheets/specific/post_appeals.css.scss
Normal file
5
app/assets/stylesheets/specific/post_appeals.css.scss
Normal file
@@ -0,0 +1,5 @@
|
||||
div#c-post-appeals {
|
||||
li {
|
||||
list-style-type: disc;
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,7 @@ class PostAppeal < ActiveRecord::Base
|
||||
validate :validate_post_is_inactive
|
||||
validate :validate_creator_is_not_limited
|
||||
before_validation :initialize_creator, :on => :create
|
||||
validates_uniqueness_of :creator_id, :scope => :post_id, :message => "has already appealed this post"
|
||||
validates_uniqueness_of :creator_id, :scope => :post_id, :message => "have already appealed this post"
|
||||
scope :for_user, lambda {|user_id| where(["creator_id = ?", user_id])}
|
||||
scope :recent, lambda {where(["created_at >= ?", 1.day.ago])}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
var errors = <%= @post_appeal.errors.full_messages.to_json.html_safe %>;
|
||||
var errors = "<%= j @post_appeal.errors.full_messages.join("; ") %>";
|
||||
if (errors.length > 0) {
|
||||
Danbooru.j_error(errors.join("; "));
|
||||
Danbooru.j_error(errors);
|
||||
} else {
|
||||
Danbooru.j_alert("Appeal", "Post appeal");
|
||||
Danbooru.j_alert("Appeal", "Post appealed");
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if post.is_deleted? && post.appeals.any? %>
|
||||
<% if post.appeals.any? %>
|
||||
<div class="ui-corner-all ui-state-highlight notice">
|
||||
<span class="ui-icon ui-icon-info"></span>
|
||||
This post has been appealed: <%= post_appeal_reasons(post) %>
|
||||
|
||||
@@ -91,6 +91,7 @@
|
||||
<meta name="post-id" content="<%= @post.id %>">
|
||||
<meta name="post-is-approvable" content="<%= @post.is_approvable? %>">
|
||||
<meta name="post-is-deleted" content="<%= @post.is_deleted? %>">
|
||||
<meta name="post-is-flagged" content="<%= @post.is_flagged? %>">
|
||||
<meta name="config-medium-width" content="<%= Danbooru.config.medium_image_width %>">
|
||||
<meta name="config-large-width" content="<%= Danbooru.config.large_image_width %>">
|
||||
<% end %>
|
||||
|
||||
@@ -11,3 +11,6 @@ en:
|
||||
post_vote:
|
||||
user: "You"
|
||||
user_id: "You"
|
||||
post_appeal:
|
||||
creator: "You"
|
||||
creator_id: "You"
|
||||
|
||||
Reference in New Issue
Block a user