<%= link_to "Unban", unban_moderator_post_post_path(@post), method: :post, "data-confirm": "Are you sure you want to unban this post?" %>
<% elsif policy(@post).ban? %>
<%= link_to "Ban", ban_moderator_post_post_path(@post), method: :post, "data-confirm": "Are you sure you want to ban this post?" %>
<% end %>
<% if policy(@post).expunge? %>
<%= link_to "Expunge", expunge_moderator_post_post_path(post_id: @post.id), remote: true, method: :post, "data-confirm": "This will permanently delete this post (meaning the file will be deleted). Are you sure you want to delete this post?" %>
<% end %>
<% end %>
<% if policy(PostReplacement).create? %>
<% end %>
<% content_for(:content) do %>
<% if !CurrentUser.user.new_post_navigation_layout %>
<%= render_post_navbar(@post, current_user: CurrentUser.user, search: params[:q]) %>
<% end %>
<% if @post.is_banned? %>
The artist requested removal of this page
<% end %>
<% if @post.in_modqueue? %>
<% 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.order(id: :asc), post: @post %>
<% if CurrentUser.user.is_approver? %>
<%= render "modqueue/quick_mod", post: @post %>
<%= render "post_disapprovals/detailed_rejection_dialog" %>
<% end %>
<% end %>
<% if policy(@post).visible? && @post.has_large? && !@post.is_ugoira? && @post.resize_percentage.floor < 100 %>
Resized to <%= number_to_percentage @post.resize_percentage.floor, precision: 0 %> of original (<%= link_to "view original", @post.tagged_file_url, class: "image-view-original-link" %>)
<% end %>
<%= tag.section class: ["image-container", "note-container", ("danbirthday" if is_danbirthday?(@post))], **image_container_data_attributes(@post, CurrentUser.user) do -%>
<% if @post.banblocked? -%>
The artist requested removal of this image.
<% elsif @post.levelblocked? -%>
<%= link_to "You need a gold account to see this image", new_user_upgrade_path %>.
<% elsif @post.safeblocked? -%>
This image is unavailable on <%= Danbooru.config.app_name %>. Go to <%= link_to "Danbooru", "https://danbooru.donmai.us" %> or disable safe mode to view (<%= link_to_wiki "learn more", "help:safe_mode" %>).
<% end %>
<% if CurrentUser.user.new_post_navigation_layout %>
<%= render_post_navbar(@post, current_user: CurrentUser.user, search: params[:q]) %>
<% end %>
<% if RecommenderService.available_for_post?(@post) %>
Loading...
<% end %>
<% if Danbooru.config.comments_enabled?.to_s.truthy? %>
<%= render_comment_section(@post, current_user: CurrentUser.user) %>
<% end %>
<% if @post.has_notes? %>
<% @post.notes.active.each do |note| %>
<%= raw NoteSanitizer.sanitize(note.body) %>
<% end %>
<% end %>
<% if policy(@post).update? %>
<%= render "posts/partials/show/edit", :post => @post %>
<% end %>
<% end %>
<% if policy(Pool).create? %>
<%= render "pool_elements/new" %>
<% end %>
<% if policy(ArtistCommentary).create_or_update? %>
<% end %>
<% if reportbooru_enabled? %>
<% end %>
<% content_for(:html_header) do %>
<%= render OpenGraphComponent.new(media_asset: @post.media_asset, current_user: CurrentUser.user) %>
<% if @post.rating == "e" %>
<% end %>
<% end %>