<%= f.label :name %>
<%= f.text_field :name %>
<% if @asset.upload.present? %>
Current File
<%= @asset.upload.url %> (<%= number_to_human_size(@asset.upload.size) %>)
<% end %>
<%= f.label :upload, "Replace file" %>
<%= f.file_field :upload %>
…or drop a file here.
<%= f.label :creator %>
<%= f.text_field :creator %>
<%= f.label :source_url, "Source URL" %>
<%= f.text_field :source_url %>
<%= f.label :license_key, "License" %>
<%= f.select :license_key,
options_for_select(
[["— none —", ""]] + AssetLicense.keys.map { |key| [t("asset_licenses.#{key}"), key] },
@asset.license_key
) %>
attach to page
<%= text_field_tag :asset_node_search_term, @attach_node&.title,
:placeholder => "Search for a page…", :autocomplete => "off" %>
<%= hidden_field_tag :node_id, @attach_node&.id %>
Optional — attaches this asset to that page, all pending versions included.
Applies only if the page has no headline yet.
Actions
<%= f.submit 'Update' %>
<%= link_to 'Show', @asset %>
<%= link_to 'Back', assets_path %>