media assets: add thumbnail view to /media_assets page.
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.
This commit is contained in:
15
app/views/media_assets/_gallery.html.erb
Normal file
15
app/views/media_assets/_gallery.html.erb
Normal file
@@ -0,0 +1,15 @@
|
||||
<%= render(MediaAssetGalleryComponent.new) do |gallery| %>
|
||||
<% @media_assets.each do |media_asset| %>
|
||||
<% if policy(media_asset).can_see_image? %>
|
||||
<% gallery.media_asset(media_asset: media_asset, size: gallery.size, link_target: media_asset) do |preview| %>
|
||||
<% preview.footer do %>
|
||||
<div class="text-center text-xs h-8">
|
||||
<% if media_asset.post.present? %>
|
||||
<%= link_to "post ##{media_asset.post.id}", media_asset.post %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user