Sha256: bd172fc427196beecc8681781688308dcfb2d7ef270f05554ccdaf32c2dd7298
Contents?: true
Size: 1.23 KB
Versions: 10
Compression:
Stored size: 1.23 KB
Contents
- @page_title = "Variants - #{@product.name}" = content_for :header do %p.buttons = link_to "Edit product", [:edit, @product], :class => 'button' = link_to "New variant", [:new, @product, :variant], :class => 'button green' %h2.products Variants of #{@product.name} .table %table.data %thead %tr %th{:width => '20%'} SKU %th{:width => '50%'} Name %th{:width => '15%'} Price %th{:width => '15%'} Stock %tbody - if @variants.empty? %tr.empty %td{:colspan => 4} No products to display. - else - for variant in @variants %tr %td= variant.sku %td= link_to variant.name, edit_product_variant_path(@product, variant) %td= number_to_currency variant.price %td - if variant.stock_control? %span.float-right= link_to "Edit", stock_level_adjustments_path(:item_type => variant.class, :item_id => variant.id), :class => 'edit', :rel => 'dialog', :data => {:dialog_width => 700, :dialog_behavior => 'stockLevelAdjustments'} = boolean_tag(variant.in_stock?, nil, :true_text => variant.stock, :false_text => 'No stock') - else ∞
Version data entries
10 entries across 10 versions & 1 rubygems