Files
danbooru/app/views/media_assets/show.html.erb
evazion 92a4d045e2 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.
2022-02-02 01:12:56 -06:00

35 lines
911 B
Plaintext

<div id="c-media-assets">
<div id="a-show" class="fixed-width-container">
<h1 class="mb-4">Media Asset</h1>
<% if policy(@media_asset).can_see_image? %>
<%= render MediaAssetComponent.new(media_asset: @media_asset) %>
<% end %>
<table class="striped aligned-vertical">
<% if @post.present? %>
<tr>
<th>Post</th>
<td><%= link_to "##{@post.id}", @post %></td>
</tr>
<% end %>
<% if policy(@media_asset).can_see_image? %>
<tr>
<th>MD5</th>
<td><%= @media_asset.md5 %></td>
</tr>
<% end %>
<% @media_asset.metadata.sort.each do |key, value| %>
<tr>
<th><%= key %></th>
<td><%= link_to value, media_assets_path(search: { metadata: { key => value }}) %></td>
</tr>
<% end %>
</table>
</div>
</div>
<%= render "uploads/secondary_links" %>