Sha256: 4ff4d8c38114a347b956164bb05f28916a46128f43dd38b7b382466c6531a32d

Contents?: true

Size: 1.59 KB

Versions: 23

Compression:

Stored size: 1.59 KB

Contents

<tr id="<%= spree_dom_id image %>" data-hook="images_row">
  <td>
    <% if can?(:update_positions, Spree::Image) %>
      <span class="handle"></span>
    <% end %>
  </td>

  <td>
    <span class="modal-image-trigger" data-toggle="modal" data-target="#modal-image-<%= image.id %>">
      <%= render 'spree/admin/shared/image', image: image, size: :mini %>
    </span>
    <%= render(
      "spree/admin/shared/modal",
      target: "modal-image-#{image.id}",
      title: image.alt,
      content: %{
        <div class='align-center'>
          #{image_tag(image.url(:large))}
        </div>
      }.html_safe
    ) %>
  </td>

  <% if @product.has_variants? %>
    <td>
      <%= fields_for image do |f| %>
        <%= f.select :viewable_id, options_for_select(@variants, image.viewable_id), {}, class: 'select2 fullwidth', autocomplete: "off" %>
      <% end %>
    </td>
  <% end %>

  <td>
    <%= fields_for image do |f| %>
      <%= f.text_field :alt %>
    <% end %>
  </td>

  <td class="actions">
    <% if can?(:update, image) %>
      <%= link_to_with_icon 'check', t('spree.actions.save'), api_product_image_path(@product, image), no_text: true, data: {action: 'save'} %>

      <%= link_to_with_icon 'cancel', t('spree.actions.cancel'), nil, no_text: true, data: {action: 'cancel'} %>

      <%= link_to_with_icon 'edit', t('spree.actions.edit'), edit_admin_product_image_path(@product, image), no_text: true, data: {action: 'edit'} %>
    <% end %>

    <% if can?(:destroy, image) %>
      <%= link_to_delete image, { url: admin_product_image_url(@product, image), no_text: true } %>
    <% end %>
  </td>
</tr>

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
solidus_backend-4.2.4 app/views/spree/admin/images/_image_row.html.erb
solidus_backend-4.1.5 app/views/spree/admin/images/_image_row.html.erb
solidus_backend-4.1.4 app/views/spree/admin/images/_image_row.html.erb
solidus_backend-4.2.3 app/views/spree/admin/images/_image_row.html.erb
solidus_backend-4.1.3 app/views/spree/admin/images/_image_row.html.erb
solidus_backend-4.0.4 app/views/spree/admin/images/_image_row.html.erb
solidus_backend-3.4.6 app/views/spree/admin/images/_image_row.html.erb
solidus_backend-4.0.3 app/views/spree/admin/images/_image_row.html.erb
solidus_backend-4.1.2 app/views/spree/admin/images/_image_row.html.erb
solidus_backend-4.2.2 app/views/spree/admin/images/_image_row.html.erb
solidus_backend-3.4.5 app/views/spree/admin/images/_image_row.html.erb
solidus_backend-4.2.1 app/views/spree/admin/images/_image_row.html.erb
solidus_backend-4.2.0 app/views/spree/admin/images/_image_row.html.erb
solidus_backend-4.1.1 app/views/spree/admin/images/_image_row.html.erb
solidus_backend-4.0.2 app/views/spree/admin/images/_image_row.html.erb
solidus_backend-3.4.4 app/views/spree/admin/images/_image_row.html.erb
solidus_backend-3.4.3 app/views/spree/admin/images/_image_row.html.erb
solidus_backend-4.0.1 app/views/spree/admin/images/_image_row.html.erb
solidus_backend-4.1.0 app/views/spree/admin/images/_image_row.html.erb
solidus_backend-4.0.0 app/views/spree/admin/images/_image_row.html.erb