Make media assets show a placeholder thumbnail when the image is missing. This can happen if the upload is still processing, or if the media asset's image was expunged, or if the asset failed during upload (usually because of some temporary network failure when trying to distribute thumbnails to the backend image servers). Fixes a problem where new images on the My Uploads or All Uploads pages could have broken thumbnails if they were still in the uploading phase.
21 lines
699 B
Plaintext
21 lines
699 B
Plaintext
<%= table_for @media_assets, class: "striped autofit" do |t| %>
|
|
<% t.column "File", td: { class: "text-center" } do |media_asset| %>
|
|
<% if policy(media_asset).can_see_image? %>
|
|
<%= render MediaAssetPreviewComponent.new(media_asset: media_asset, save_data: CurrentUser.save_data) %>
|
|
<% end %>
|
|
<% end %>
|
|
|
|
<% t.column :image_width %>
|
|
<% t.column :image_height %>
|
|
<% t.column :file_size %>
|
|
<% t.column :file_ext %>
|
|
|
|
<% t.column "Metadata" do |media_asset| %>
|
|
<%= link_to pluralize(media_asset.metadata.size, "tags"), media_asset %>
|
|
<% end %>
|
|
|
|
<% t.column "Created" do |media_asset| %>
|
|
<%= time_ago_in_words_tagged(media_asset.created_at) %>
|
|
<% end %>
|
|
<% end %>
|