Sha256: 5527d8e76b7d81bfee1560c3d71b54b8414e52b2b23772e662e74997ae988062

Contents?: true

Size: 1.62 KB

Versions: 88

Compression:

Stored size: 1.62 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 # @product.has_variants? %>

  <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

88 entries across 88 versions & 2 rubygems

Version Path
solidus_backend-3.3.4 app/views/spree/admin/images/_image_row.html.erb
solidus_backend-3.2.9 app/views/spree/admin/images/_image_row.html.erb
solidus_backend-3.2.8 app/views/spree/admin/images/_image_row.html.erb
solidus_backend-3.3.3 app/views/spree/admin/images/_image_row.html.erb
solidus_backend-3.2.7 app/views/spree/admin/images/_image_row.html.erb
solidus_backend-3.3.2 app/views/spree/admin/images/_image_row.html.erb
solidus_backend-3.3.1 app/views/spree/admin/images/_image_row.html.erb
solidus_backend-3.2.6 app/views/spree/admin/images/_image_row.html.erb
solidus_backend-3.1.9 app/views/spree/admin/images/_image_row.html.erb
solidus_backend-3.3.0 app/views/spree/admin/images/_image_row.html.erb
solidus_backend-3.2.5 app/views/spree/admin/images/_image_row.html.erb
solidus_backend-3.2.4 app/views/spree/admin/images/_image_row.html.erb
solidus_backend-3.2.3 app/views/spree/admin/images/_image_row.html.erb
solidus_backend-3.1.8 app/views/spree/admin/images/_image_row.html.erb
solidus_backend-3.0.8 app/views/spree/admin/images/_image_row.html.erb
solidus_backend-3.2.2 app/views/spree/admin/images/_image_row.html.erb
solidus_backend-3.2.1 app/views/spree/admin/images/_image_row.html.erb
solidus_backend-3.2.0 app/views/spree/admin/images/_image_row.html.erb
solidus_backend-3.2.0.alpha app/views/spree/admin/images/_image_row.html.erb
solidus_backend-3.0.7 app/views/spree/admin/images/_image_row.html.erb