%= render partial: 'spree/admin/shared/product_tabs', locals: { current: :images } %> <% content_for :page_actions do %> <%= button_link_to(Spree.t(:new_image), spree.new_admin_product_image_url(@product), { class: "btn-success", icon: 'add', id: 'new_image_link' }) if can? :create, Spree::Image %> <% end %> <% has_variants = @product.has_variants? %> <% unless @product.variant_images.any? %>
<%= Spree.t(:thumbnail) %> | <% if has_variants %><%= Spree::Variant.model_name.human %> | <% end %><%= Spree.t(:alt_text) %> | ||
---|---|---|---|---|
<% if can? :edit, image %> <% end %> | <%= link_to image_tag(main_app.url_for(image.url(:mini))), main_app.url_for(image.url(:product)) %> | <% if has_variants %><%= options_text_for(image) %> | <% end %><%= image.alt %> | <%= link_to_with_icon('edit', Spree.t(:edit), spree.edit_admin_product_image_url(@product, image), class: 'btn btn-primary btn-sm', no_text: true, data: { action: 'edit' }) if can? :edit, image %> <%= link_to_delete(image, { url: spree.admin_product_image_url(@product, image), no_text: true }) if can? :destroy, image %> |