flags: only show current flag on flagged posts.
* Only show the current pending flag on flagged posts. Don't show old flags. * Don't show both the "This post was flagged for review" and the "This post was flagged and is pending" notices.
This commit is contained in:
@@ -1,18 +1,29 @@
|
||||
<% if post.is_flagged? %>
|
||||
<div class="notice notice-small post-notice post-notice-flagged">
|
||||
<p>This post was flagged for review (<%= link_to_wiki "learn more", "howto:flag" %>): </p>
|
||||
|
||||
<%= render "post_flags/reasons", flags: post.flags %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if post.is_banned? %>
|
||||
<div class="notice notice-small post-notice post-notice-banned">
|
||||
The artist requested removal of this page
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if post.is_deleted? && !post.is_appealed? %>
|
||||
<% if post.in_modqueue? %>
|
||||
<div class="notice notice-small post-notice post-notice-pending">
|
||||
<% if post.is_pending? %>
|
||||
This post is pending approval. (<%= link_to_wiki "learn more", "about:mod_queue" %>)
|
||||
<% elsif post.is_flagged? %>
|
||||
This post was flagged and is pending approval (<%= link_to_wiki "learn more", "howto:flag" %>)
|
||||
<%= render "post_flags/reasons", flag: post.flags.select(&:pending?).last %>
|
||||
<% elsif post.is_appealed? %>
|
||||
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 %>
|
||||
|
||||
<%= render "post_disapprovals/counts", :disapprovals => post.disapprovals, :post => post %>
|
||||
|
||||
<% if policy(PostDisapproval).create? && !post.disapproved_by?(CurrentUser.user) %>
|
||||
<%= render "modqueue/quick_mod", post: post %>
|
||||
<%= render "post_disapprovals/detailed_rejection_dialog" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% elsif post.is_deleted? %>
|
||||
<div class="notice notice-small post-notice post-notice-deleted">
|
||||
<% if post.flags.any? %>
|
||||
<p>This post was deleted for the following reasons: </p>
|
||||
@@ -30,26 +41,6 @@
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if post.in_modqueue? %>
|
||||
<div class="notice notice-small post-notice post-notice-pending">
|
||||
<% if post.is_pending? %>
|
||||
This post is pending approval. (<%= link_to_wiki "learn more", "about:mod_queue" %>)
|
||||
<% elsif post.is_flagged? %>
|
||||
This post was flagged and is pending approval (<%= link_to_wiki "learn more", "about:mod_queue" %>)
|
||||
<% elsif post.is_appealed? %>
|
||||
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 %>
|
||||
|
||||
<%= render "post_disapprovals/counts", :disapprovals => post.disapprovals, :post => post %>
|
||||
|
||||
<% if policy(PostDisapproval).create? && !post.disapproved_by?(CurrentUser.user) %>
|
||||
<%= render "modqueue/quick_mod", post: post %>
|
||||
<%= render "post_disapprovals/detailed_rejection_dialog" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if post.parent.present? %>
|
||||
<div class="notice notice-small post-notice post-notice-child">
|
||||
<%= render "posts/partials/show/parent_notice", parent: post.parent, children: @sibling_posts.to_a %>
|
||||
|
||||
Reference in New Issue
Block a user