Sha256: e3b672144b6b3e2940d829ddceef2cfaa2d318c4bbf5fc676f4bb0ec9547a78e

Contents?: true

Size: 1.21 KB

Versions: 12

Compression:

Stored size: 1.21 KB

Contents

<%= bootstrap_form_for([current_exhibit, @resource.becomes(Spotlight::Resources::Upload)], layout: :horizontal, label_col: 'col-md-2', control_col: 'col-sm-6 col-md-6', html: { class: 'item-upload-form', multipart: true } ) do |f| %>
  <%= f.url_field :url, type: "file", help: t('.url-field.help', extensions: Spotlight::Engine.config.allowed_upload_extensions.join(' ')), label: "File" %>
  <%= f.fields_for :data do |d| %>
    <% Spotlight::Resources::Upload.fields(current_exhibit).each do |config| %>
      <%= d.send(config.form_field_type, config.field_name, label: uploaded_field_label(config)) %>
    <% end %>

    <% current_exhibit.custom_fields.each do |custom_field| %>
      <%= render partial: "spotlight/custom_fields/form_group/#{custom_field.field_type}", locals: { inline: true, f: d, field: custom_field, value: nil }  %>
    <% end %>
  <% end %>
  <div class="form-actions">
    <div class="primary-actions">
      <%= hidden_field_tag :tab, 'upload' %>
      <%= cancel_link @resource, :back, class: 'btn btn-secondary' %>
      <%= f.submit t('.add_item_and_continue'), name: 'add-and-continue', class: 'btn btn-secondary' %>
      <%= f.submit t('.add_item'), class: 'btn btn-primary' %>
    </div>
  </div>
<% end %>

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
blacklight-spotlight-3.0.0.rc4 app/views/spotlight/resources/upload/_form.html.erb
blacklight-spotlight-3.0.0.rc3 app/views/spotlight/resources/upload/_form.html.erb
blacklight-spotlight-3.0.0.rc2 app/views/spotlight/resources/upload/_form.html.erb
blacklight-spotlight-3.0.0.rc1 app/views/spotlight/resources/upload/_form.html.erb
blacklight-spotlight-3.0.0.alpha.10 app/views/spotlight/resources/upload/_form.html.erb
blacklight-spotlight-3.0.0.alpha.9 app/views/spotlight/resources/upload/_form.html.erb
blacklight-spotlight-3.0.0.alpha.8 app/views/spotlight/resources/upload/_form.html.erb
blacklight-spotlight-3.0.0.alpha.7 app/views/spotlight/resources/upload/_form.html.erb
blacklight-spotlight-3.0.0.alpha.6 app/views/spotlight/resources/upload/_form.html.erb
blacklight-spotlight-3.0.0.alpha.5 app/views/spotlight/resources/upload/_form.html.erb
blacklight-spotlight-3.0.0.alpha.4 app/views/spotlight/resources/upload/_form.html.erb
blacklight-spotlight-3.0.0.alpha.3 app/views/spotlight/resources/upload/_form.html.erb