<%= render 'spree/admin/shared/image',
image: variant.gallery.images.first,
size: :small %>
<% @variant_display_attributes.each do |display_attribute| %>
<%= t(display_attribute[:translation_key], scope: 'spree') %> |
<%= variant.send(display_attribute[:attr_name]) %>
|
<% end %>
|
<% variant.option_values.sort_by(&:option_type_name).each do |option_value| %>
<%= option_value.option_type_presentation %>
|
<%= option_value.presentation %> |
<% end %>
|
<% variant.stock_items.each do |item| %>
<% if @stock_item_stock_locations.include?(item.stock_location) %>
<%# This is rendered in JS %>
<% end %>
<% end %>
<% locations_without_items = @stock_item_stock_locations - variant.stock_items.flat_map(&:stock_location) %>
<% if locations_without_items.any? && can?(:create, Spree::StockItem) %>
<% end %>
|