Add a thumbnail view to the /media_assets page. This page lets you see all images uploaded to Danbooru by all users (although you can't see who the uploader is). Also add a link to this page in the subnav bar on the upload page.
21 lines
721 B
Plaintext
21 lines
721 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, shrink_to_fit: false) %>
|
|
<% 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 %>
|