Sha256: 01cae5557047d44ea45e6305131196292646b77cf0ce4c4fbfd60d4aa02acf51

Contents?: true

Size: 1.44 KB

Versions: 11

Compression:

Stored size: 1.44 KB

Contents

- @page_title = "#{t('shoppe.variants.variants')} - #{@product.name}"

= content_for :header do
  %p.buttons
    = link_to t('shoppe.variants.edit_product'), [:edit, @product], :class => 'button'
    = link_to t('shoppe.variants.new_variant'), [:new, @product, :variant], :class => 'button green'

  %h2.products= t('shoppe.variants.variants_of', product: @product.name)

.table
  %table.data
    %thead
      %tr
        %th{:width => '20%'}= t('shoppe.variants.sku')
        %th{:width => '50%'}= t('shoppe.variants.name')
        %th{:width => '15%'}= t('shoppe.variants.price')
        %th{:width => '15%'}= t('shoppe.variants.stock')
    %tbody
      - if @variants.empty?
        %tr.empty
          %td{:colspan => 4}= t('shoppe.variants.no_products')
      - 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 t('shoppe.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 => t('shoppe.variants.no_stock'))
              - else
                ∞

Version data entries

11 entries across 11 versions & 3 rubygems

Version Path
shoppe-1.1.2 app/views/shoppe/variants/index.html.haml
shoppe-1.1.1 app/views/shoppe/variants/index.html.haml
shoppe-1.1.0 app/views/shoppe/variants/index.html.haml
shoppe-1.0.9 app/views/shoppe/variants/index.html.haml
shoppe-1.0.8 app/views/shoppe/variants/index.html.haml
kylekthompson-shoppe-1.0.7 app/views/shoppe/variants/index.html.haml
shoppe-1.0.7 app/views/shoppe/variants/index.html.haml
shoppe-1.0.6 app/views/shoppe/variants/index.html.haml
shoppe-paypal-1.1.0 vendor/bundle/ruby/2.1.0/gems/shoppe-1.0.5/app/views/shoppe/variants/index.html.haml
shoppe-1.0.5 app/views/shoppe/variants/index.html.haml
shoppe-1.0.3 app/views/shoppe/variants/index.html.haml