Files
danbooru/app/views/media_assets/index.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

28 lines
727 B
Plaintext

<div id="c-media-assets">
<div id="a-index">
<h1>All Uploads</h1>
<% if params[:search].present? %>
<%= search_form_for(media_assets_path) do |f| %>
<%= f.simple_fields_for :metadata do |meta| %>
<% params.dig(:search, :metadata).to_h.each do |key, value| %>
<%= meta.input key, label: key, input_html: { value: value } %>
<% end %>
<% end %>
<%= f.submit "Search" %>
<% end %>
<% end %>
<% if params[:mode] == "table" %>
<%= render "media_assets/table" %>
<% else %>
<%= render "media_assets/gallery" %>
<% end %>
<%= numbered_paginator(@media_assets) %>
</div>
</div>
<%= render "uploads/secondary_links" %>