Sha256: 3076186b9e716dfa24887c85026d8c26022c488398aefd3f7fb8183c69d9ce1c

Contents?: true

Size: 1.79 KB

Versions: 3

Compression:

Stored size: 1.79 KB

Contents

<% default_field_label = local_assigns.dig(:config, :original, :label) %>

<tr data-id="<%= key.parameterize %>" class="dd-item" data-behavior="restore-default">
  <%= f.fields_for key do |field| %>
    <td>
      <%= field.hidden_field :weight, 'data-property' => 'weight' %>
      <div class="handle-wrap d-flex">
        <div class="dd-handle dd3-handle"><%= t :drag %></div>
        <div class="flex-grow-1 align-self-center">
          <span data-in-place-edit-target=".edit-in-place" data-in-place-edit-field-target="[data-edit-field-target='true']">
            <a href="#edit-in-place" class="field-label edit-in-place align-self-center"><%= config.display_label %></a>
            <%= field.hidden_field :label, value: config.display_label, class: 'metadata-label-edit form-control form-control-sm', data: {:"edit-field-target" => 'true', default_value: default_field_label} %>
          </span>
        </div>
        <% if default_field_label %>
          <div class="restore-default">
            <%= button_tag t(:'.restore_default'), data: {:"restore-default" => true}, class: "btn btn-secondary btn-sm #{'d-none' if config.display_label == default_field_label}" %>
          </div>
        <% end %>
      </div>
    </td>
    <td class="checkbox-cell text-center">
      <%= field.check_box_without_bootstrap :show, checked: config.show, disabled: !config.immutable.show.nil?, hide_label: true %>
    </td>
    <% available_view_fields.keys.each do |type| %>
      <td class="checkbox-cell text-center">
        <%= field.check_box_without_bootstrap type, checked: config.send(type), disabled: !config.immutable.send(type).nil?, hide_label: true %>
      </td>
    <% end %>
    <td class="text-center">
      <% if config.type %>
        <%= t(:".types.#{config.type}") %>
      <% end %>
    </td>


  <% end %>
</tr>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
blacklight-spotlight-4.6.1 app/views/spotlight/metadata_configurations/_metadata_field.html.erb
blacklight-spotlight-4.6.0 app/views/spotlight/metadata_configurations/_metadata_field.html.erb
blacklight-spotlight-4.5.0 app/views/spotlight/metadata_configurations/_metadata_field.html.erb