<% if post.is_flagged? && !post.is_deleted? && post.flags.any? %>
  <div class="ui-corner-all ui-state-highlight notice notice-flagged">
    <p>This post was flagged for deletion: </p>

    <%= post_flag_reasons(post) %>
  </div>
<% end %>

<% if (post.is_banned? || post.is_deleted?) && post.flags.empty? %>
  <div class="ui-corner-all ui-state-highlight notice notice-deleted">
    <% if post.is_banned? %>
      This post was deleted because it was requested by the artist
    <% else %>
      This post was deleted
    <% end %>
  </div>
<% end %>

<% if post.is_deleted? && post.flags.any? %>
  <div class="ui-corner-all ui-state-highlight notice notice-deleted">
    <p>This post was deleted for the following reasons: </p>

    <%= post_flag_reasons(post) %>
  </div>
<% end %>

<% if post.is_pending? %>
  <div class="ui-corner-all ui-state-highlight notice notice-pending" id="pending-approval-notice">
    This post is pending approval (<%= link_to "learn more", wiki_pages_path(:title => "about:mod_queue") %>)

    <% if CurrentUser.is_janitor? && !post.disapproved_by?(CurrentUser.user) %>
      <div class="quick-mod">
        <% unless post.is_status_locked? %>
          <%= link_to "Approve", moderator_post_approval_path(:post_id => post.id), :method => :post, :remote => true, :class => "btn" %> |
        <% end %>
        <%= link_to "Hide from queue", moderator_post_disapproval_path(:post_id => post.id), :method => :post, :remote => true, :class => "btn" %>
      </div>
    <% end %>
  </div>
<% end %>

<% if (post.is_flagged? || post.is_deleted?) && post.appeals.any? %>
  <div class="ui-corner-all ui-state-highlight notice notice-appealed">
    <p>This post was appealed:</p>
    <%= post_appeal_reasons(post) %>
  </div>
<% end %>

<% if post.parent_id && post.parent_exists? %>
  <div class="ui-corner-all ui-state-highlight notice notice-child">
    <%= has_parent_message(post, @parent_post_set) %>
    <div id="has-parent-relationship-preview"><%= @parent_post_set.presenter.post_previews_html(self) %></div>
  </div>
<% end %>

<% if post.has_children? %>
  <div class="ui-corner-all ui-state-highlight notice notice-parent">
    <%= has_children_message(post, @children_post_set) %>
    <div id="has-children-relationship-preview"><%= @children_post_set.presenter.post_previews_html(self) %></div>
  </div>
<% end %>

<% if post.has_large? && CurrentUser.default_image_size == "large" %>
  <div class="ui-corner-all ui-state-highlight notice notice-resized" id="image-resize-notice">
    Resized to <%= number_to_percentage post.resize_percentage, :precision => 0 %> of original (<%= link_to "view original", post.file_url, :id => "image-resize-link" %>)
  </div>
<% end %>
