Sha256: ff3f89fd93373155a1c8c0abb426d2a25efd2b977b0c2913d9312dea3be0102d

Contents?: true

Size: 1.89 KB

Versions: 38

Compression:

Stored size: 1.89 KB

Contents

<% form_prefix = f.object_name.parameterize("_") %>
<%= field_set_tag do %>
  <%= f.check_box(:display) %>
<% end if f.object.is_a? Spotlight::Masthead %>
<%= field_set_tag(t(:'.source.header')) do %>
  <div>
    <%= f.radio_button(:source, :exhibit, label: t(:'.source.exhibit.label')) %>
    <div>
      <%= f.hidden_field(:document_global_id) %>
      <%= f.hidden_field(:remote_image_url, data: jcrop_options) %>
      <%= text_field_tag(:document_title, (presenter(f.object.document).document_show_html_title if f.object.document), class: "form-control", data: {input_select_target: "##{form_prefix}_source_exhibit", masthead_typeahead: true, target_panel: "##{form_prefix}-target-panel", :'id-field' => "##{form_prefix}_document_global_id", remote_url_field: "##{form_prefix}_remote_image_url" }) %>
      <div id="<%= form_prefix %>-target-panel" style="display:none">
        <div class="panel-heading">
          <div data-item-title="true"></div>
          <div data-panel-image-pagination="true"></div>
        </div>
      </div>
      <p class="help-block"><%= t(:'.source.exhibit.help') %></p>
    </div>
  </div>
  <div>
    <%= f.radio_button(:source, :remote, label: t(:'.source.remote.label')) %>
    <%= f.file_field_without_bootstrap(:image, data: jcrop_options.merge(input_select_target: "##{form_prefix}_source_remote")) %>
  </div>
<% end %>
<%= field_set_tag(t(:'.source.remote.header')) do %>
  <p class="instructions"><%= t(:'.source.remote.help') %></p>
  <div class="form-group croppable-loading-area <%= "missing-croppable" unless f.object.try(:image).present? %>">
    <%= hidden_field_tag :"#{jcrop_options.fetch(:selector, "image")}_crop", ([f.object.image_crop_x.to_i, f.object.image_crop_y.to_i, f.object.image_crop_x.to_i + f.object.image_crop_w.to_i, f.object.image_crop_y.to_i + f.object.image_crop_h.to_i].to_json if f.object.try(:image_crop_x)) %>
    <%= f.cropbox :image %>
  </div>
<% end %>

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
blacklight-spotlight-0.23.0 app/views/spotlight/featured_images/_form.html.erb
blacklight-spotlight-0.22.0 app/views/spotlight/featured_images/_form.html.erb
blacklight-spotlight-0.21.0 app/views/spotlight/featured_images/_form.html.erb
blacklight-spotlight-0.20.3 app/views/spotlight/featured_images/_form.html.erb
blacklight-spotlight-0.20.2 app/views/spotlight/featured_images/_form.html.erb
blacklight-spotlight-0.20.1 app/views/spotlight/featured_images/_form.html.erb
blacklight-spotlight-0.20.0 app/views/spotlight/featured_images/_form.html.erb
blacklight-spotlight-0.19.2 app/views/spotlight/featured_images/_form.html.erb
blacklight-spotlight-0.19.1 app/views/spotlight/featured_images/_form.html.erb
blacklight-spotlight-0.19.0 app/views/spotlight/featured_images/_form.html.erb
blacklight-spotlight-0.18.0 app/views/spotlight/featured_images/_form.html.erb
blacklight-spotlight-0.17.1 app/views/spotlight/featured_images/_form.html.erb
blacklight-spotlight-0.17.0 app/views/spotlight/featured_images/_form.html.erb
blacklight-spotlight-0.16.0 app/views/spotlight/featured_images/_form.html.erb
blacklight-spotlight-0.15.0 app/views/spotlight/featured_images/_form.html.erb
blacklight-spotlight-0.14.2 app/views/spotlight/featured_images/_form.html.erb
blacklight-spotlight-0.14.1 app/views/spotlight/featured_images/_form.html.erb
blacklight-spotlight-0.14.0 app/views/spotlight/featured_images/_form.html.erb
blacklight-spotlight-0.13.0 app/views/spotlight/featured_images/_form.html.erb
blacklight-spotlight-0.12.1 app/views/spotlight/featured_images/_form.html.erb