Show the length of videos and animated posts in the thumbnail. The length is shown the top left corner in MM:SS format. This replaces the play button icon. Show a speaker icon instead of a music note icon for posts with sound. Doing this requires doing `.includes(:media_asset)` in a bunch of places to avoid N+1 queries when we access the post's duration.
31 lines
990 B
Plaintext
31 lines
990 B
Plaintext
<% page_title "Order Pool" %>
|
|
<%= render "pools/secondary_links" %>
|
|
|
|
<div id="c-pool-orders">
|
|
<div id="a-edit">
|
|
<h1>Order Pool: <%= @pool.pretty_name %></h1>
|
|
|
|
<%= edit_form_for(@pool, format: :js, html: { id: "ordering-form" }) do |f| %>
|
|
<% if @pool.post_count <= Pool::POOL_ORDER_LIMIT %>
|
|
<p>Drag and drop the list below to determine ordering.</p>
|
|
|
|
<%= render "posts/partials/common/inline_blacklist" %>
|
|
|
|
<ul id="sortable">
|
|
<% @pool.posts.includes(:media_asset).each do |post| %>
|
|
<%= tag.li id: "pool[post_ids]_#{post.id}" do -%>
|
|
<%= post_preview(post, show_deleted: true).presence || "Hidden: Post ##{post.id}" -%>
|
|
<% end -%>
|
|
<% end %>
|
|
</ul>
|
|
<% else %>
|
|
<p>Reorder the post IDs in the text box below to reorder the pool.</p>
|
|
|
|
<%= f.input :post_ids_string, as: :text, label: "Posts" %>
|
|
<% end %>
|
|
|
|
<%= f.submit "Save" %>
|
|
<% end %>
|
|
</div>
|
|
</div>
|