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.
23 lines
777 B
Plaintext
23 lines
777 B
Plaintext
<div id="c-favorite-group-orders">
|
|
<div id="a-edit">
|
|
<h1>Order Favorite Group: <%= @favorite_group.pretty_name %></h1>
|
|
<p>Drag and drop the list below to determine ordering.</p>
|
|
|
|
<%= render "posts/partials/common/inline_blacklist" %>
|
|
|
|
<ul id="sortable">
|
|
<% @favorite_group.posts.includes(:media_asset).limit(1_000).each do |post| %>
|
|
<%= tag.li id: "favorite_group[post_ids]_#{post.id}" do -%>
|
|
<%= post_preview(post, show_deleted: true).presence || "Hidden: Post ##{post.id}" -%>
|
|
<% end -%>
|
|
<% end %>
|
|
</ul>
|
|
|
|
<%= edit_form_for(@favorite_group, :format => :js, :html => {:id => "ordering-form"}) do |f| %>
|
|
<%= submit_tag "Save" %>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
|
|
<%= render "favorite_groups/secondary_links" %>
|