appeals: only show current appeal on appealed posts.
* Only show the current pending appeal in the "This post was appealed" notice. Don't show old appeals. * Don't show both the "This post was deleted" and the "This post was appealed" notice on appealed posts. Only show the "This post was appealed" notice. * Show "no reason" if no appeal reason was given.
This commit is contained in:
@@ -107,7 +107,6 @@
|
|||||||
--post-flagged-notice-background: var(--error-background-color);
|
--post-flagged-notice-background: var(--error-background-color);
|
||||||
--post-banned-notice-background: var(--error-background-color);
|
--post-banned-notice-background: var(--error-background-color);
|
||||||
--post-deleted-notice-background: var(--error-background-color);
|
--post-deleted-notice-background: var(--error-background-color);
|
||||||
--post-appealed-notice-background: #D8F2FC;
|
|
||||||
--post-resized-notice-background: #EED8FC;
|
--post-resized-notice-background: #EED8FC;
|
||||||
--post-search-notice-background: #EEE;
|
--post-search-notice-background: #EEE;
|
||||||
|
|
||||||
@@ -386,7 +385,6 @@ body[data-current-user-theme="dark"] {
|
|||||||
--post-flagged-notice-background: var(--red-0);
|
--post-flagged-notice-background: var(--red-0);
|
||||||
--post-deleted-notice-background: var(--red-0);
|
--post-deleted-notice-background: var(--red-0);
|
||||||
--post-banned-notice-background: var(--red-0);
|
--post-banned-notice-background: var(--red-0);
|
||||||
--post-appealed-notice-background: var(--blue-0);
|
|
||||||
|
|
||||||
--post-tooltip-background-color: var(--grey-3);
|
--post-tooltip-background-color: var(--grey-3);
|
||||||
--post-tooltip-border-color: var(--grey-4);
|
--post-tooltip-border-color: var(--grey-4);
|
||||||
|
|||||||
@@ -269,7 +269,6 @@ div#c-posts {
|
|||||||
&.post-notice-flagged { background: var(--post-flagged-notice-background); }
|
&.post-notice-flagged { background: var(--post-flagged-notice-background); }
|
||||||
&.post-notice-banned { background: var(--post-banned-notice-background); }
|
&.post-notice-banned { background: var(--post-banned-notice-background); }
|
||||||
&.post-notice-deleted { background: var(--post-deleted-notice-background); }
|
&.post-notice-deleted { background: var(--post-deleted-notice-background); }
|
||||||
&.post-notice-appealed { background: var(--post-appealed-notice-background); }
|
|
||||||
&.post-notice-resized { background: var(--post-resized-notice-background); }
|
&.post-notice-resized { background: var(--post-resized-notice-background); }
|
||||||
&.post-notice-search { background: var(--post-search-notice-background); }
|
&.post-notice-search { background: var(--post-search-notice-background); }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,10 +68,10 @@
|
|||||||
</span>
|
</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% if (post.is_flagged? || post.is_deleted?) && post.appeals.any? %>
|
<% if post.is_appealed? %>
|
||||||
<span class="info">
|
<span class="info">
|
||||||
<strong>Appeals</strong>
|
<strong>Appeals</strong>
|
||||||
<%= render "post_appeals/reasons", appeals: post.appeals %>
|
<%= render "post_appeals/reasons", appeal: post.appeals.select(&:pending?).last %>
|
||||||
</span>
|
</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
<ul class="post-appeal-reasons list-bulleted">
|
<ul class="post-appeal-reason list-bulleted">
|
||||||
<% appeals.each do |appeal| %>
|
<li>
|
||||||
<li class="post-appeal-reason">
|
<% if appeal.reason.present? %>
|
||||||
<span class="prose"><%= format_text(appeal.reason, inline: true) %></span>
|
<span class="prose"><%= format_text(appeal.reason, inline: true) %></span>
|
||||||
- <%= link_to_user(appeal.creator) %>
|
<% else %>
|
||||||
- <%= time_ago_in_words_tagged(appeal.created_at) %>
|
<span class="prose"><em>no reason</em></span>
|
||||||
</li>
|
<% end %>
|
||||||
<% end %>
|
|
||||||
|
(<%= link_to_user(appeal.creator) %>, <%= time_ago_in_words_tagged(appeal.created_at) %>)
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% if post.is_deleted? %>
|
<% if post.is_deleted? && !post.is_appealed? %>
|
||||||
<div class="notice notice-small post-notice post-notice-deleted">
|
<div class="notice notice-small post-notice post-notice-deleted">
|
||||||
<% if post.flags.any? %>
|
<% if post.flags.any? %>
|
||||||
<p>This post was deleted for the following reasons: </p>
|
<p>This post was deleted for the following reasons: </p>
|
||||||
@@ -38,6 +38,7 @@
|
|||||||
This post was flagged and is pending approval (<%= link_to_wiki "learn more", "about:mod_queue" %>)
|
This post was flagged and is pending approval (<%= link_to_wiki "learn more", "about:mod_queue" %>)
|
||||||
<% elsif post.is_appealed? %>
|
<% elsif post.is_appealed? %>
|
||||||
This post was appealed and is pending approval (<%= link_to_wiki "learn more", "about:mod_queue" %>)
|
This post was appealed and is pending approval (<%= link_to_wiki "learn more", "about:mod_queue" %>)
|
||||||
|
<%= render "post_appeals/reasons", appeal: post.appeals.select(&:pending?).last %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= render "post_disapprovals/counts", :disapprovals => post.disapprovals, :post => post %>
|
<%= render "post_disapprovals/counts", :disapprovals => post.disapprovals, :post => post %>
|
||||||
@@ -49,14 +50,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% #XXX %>
|
|
||||||
<% if post.is_deleted? && post.appeals.any? %>
|
|
||||||
<div class="notice notice-small post-notice post-notice-appealed">
|
|
||||||
<p>This post was appealed:</p>
|
|
||||||
<%= render "post_appeals/reasons", appeals: post.appeals %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% if post.parent.present? %>
|
<% if post.parent.present? %>
|
||||||
<div class="notice notice-small post-notice post-notice-child">
|
<div class="notice notice-small post-notice post-notice-child">
|
||||||
<%= render "posts/partials/show/parent_notice", parent: post.parent, children: @sibling_posts.to_a %>
|
<%= render "posts/partials/show/parent_notice", parent: post.parent, children: @sibling_posts.to_a %>
|
||||||
|
|||||||
Reference in New Issue
Block a user