Sha256: ffad1c2f65b346d429a2761549d57fdc2202d7f3c8e077a715aa7bdbef7ab510
Contents?: true
Size: 1.76 KB
Versions: 6
Compression:
Stored size: 1.76 KB
Contents
<%= render 'spree/admin/shared/product_tabs', current: 'Variants' %> <% if @variants.any? || @product.variants.only_deleted.any?%> <%= render "table_filter", product: @product %> <%= render "table", variants: @variants %> <% else %> <% if !Spree::OptionType.any? %> <p class='first_add_option_types no-objects-found' data-hook="first_add_option_types"> <%= Spree.t(:to_add_variants_you_must_first_define) %> <% if can?(:display, Spree::OptionType) %> <%= link_to Spree::OptionType.model_name.human(count: :other), admin_option_types_path%> <% else %> <%= Spree::OptionType.model_name.human(count: :other) %> <% end %> </p> <% elsif @product.empty_option_values? %> <div class="alpha twelve columns no-objects-found"> <%= Spree.t :no_option_values_on_product_html, link: link_to(Spree.t(:product_details), [:edit, :admin, @product]) %> </div> <% else %> <div class="alpha twelve columns no-objects-found"> <%= Spree.t(:no_resource, resource: Spree::Variant.model_name.human(count: :other)) %> <% if can? :create, Spree::Variant %> <%= link_to Spree.t(:create_one), new_object_url, remote: true %> <% end %> </div> <% end %> <% end %> <% if !@product.empty_option_values? %> <% content_for :page_actions do %> <ul class="inline-menu" data-hook="toolbar"> <% if can?(:create, Spree::Variant) %> <li id="new_var_link" data-hook> <%= link_to_with_icon 'plus', Spree.t(:new_variant), new_admin_product_variant_url(@product), :remote => :true, :class => 'button' %> </li> <% end %> </ul> <% end %> <% end %>
Version data entries
6 entries across 6 versions & 1 rubygems