* Add a "View original" sidebar option. * Rename the "View large" sidebar option to "View smaller". * Remove the "Loading..." message when switching image sizes. * Fix the V hotkey not working after using it once. * Change #image-resize-link to .image-view-original link (note that there are two of these links now, one in the notice bar and one in the sidebar). * Add a `data-post-current-image-size` attribute on the <body> element and use it to control visibility of links and notices.
75 lines
2.8 KiB
Plaintext
75 lines
2.8 KiB
Plaintext
<% if post.is_flagged? && !post.is_deleted? && post.flags.any? %>
|
|
<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? %>
|
|
<div class="notice notice-small post-notice post-notice-deleted">
|
|
<% if post.flags.any? %>
|
|
<p>This post was deleted for the following reasons: </p>
|
|
<%= render "post_flags/reasons", flags: post.flags %>
|
|
<% else %>
|
|
<p>This post was deleted</p>
|
|
<% end %>
|
|
|
|
<%= render "post_disapprovals/counts", :disapprovals => post.disapprovals, :post => post %>
|
|
|
|
<% if CurrentUser.id == post.uploader_id %>
|
|
<p>If you don't understand why your upload was deleted, you can ask for
|
|
advice in the Upload Feedback Thread on the forum.</p>
|
|
<% end %>
|
|
</div>
|
|
<% end %>
|
|
|
|
<% if post.is_pending? || post.is_flagged? %>
|
|
<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" %>)
|
|
<% else %>
|
|
This post was flagged and is pending approval (<%= link_to_wiki "learn more", "about:mod_queue" %>)
|
|
<% 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.is_flagged? || 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? %>
|
|
<div class="notice notice-small post-notice post-notice-child">
|
|
<%= render "posts/partials/show/parent_notice", parent: post.parent, children: @sibling_posts.to_a %>
|
|
</div>
|
|
<% end %>
|
|
|
|
<% if post.has_visible_children? %>
|
|
<div class="notice notice-small post-notice post-notice-parent">
|
|
<%= render "posts/partials/show/child_notice", parent: post, children: @child_posts.to_a %>
|
|
</div>
|
|
<% end %>
|
|
|
|
<% if policy(post).visible? && post.has_large? && !post.is_ugoira? %>
|
|
<div class="notice notice-small post-notice post-notice-resized" id="image-resize-notice">
|
|
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" %>)
|
|
</div>
|
|
<% end %>
|