<%= f.label :name %>
<%= f.text_field :name %>
<%= f.label :upload, "File" %>
<%= f.file_field :upload %>
<%= 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 'Create' %>
<%= link_to 'Back', assets_path %>