Sha256: 53df79cc8ec23e41fa8bfb16959600bf5f2aac407ed720ff09f3797eeb895f21

Contents?: true

Size: 896 Bytes

Versions: 10

Compression:

Stored size: 896 Bytes

Contents

- discounted_type = product.class.to_s

- discounted_id   = discounted_type == "ShopProduct" ? product.id          : product.discounted_id
- discountable_id = discounted_type == "ShopProduct" ? nil                 : product.id
- success_element = discounted_type == "ShopProduct" ? 'discount_products' : 'available_products'
- class_type      = discounted_type == "ShopProduct" ? "available"         : "discounted"

%li.product{:class => "discountable #{class_type} product", :id => "#{class_type}_#{product.id}", :'data-discounted_id' => discounted_id, :'data-discounted_type' => discounted_type, :'data-discounted_type_human' => 'Product', :'data-discountable_id' => discountable_id, :'data-success_element' => success_element }
  %span.name= truncate((product.name rescue product.discounted.name), 30, '...')
  %span.sku= (product.sku rescue product.discounted.sku)
  .actions
    %span.delete

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
radiant-shop_discounts-extension-0.0.11 app/views/admin/shop/discounts/edit/shared/_product.html.haml
radiant-shop_discounts-extension-0.0.10 app/views/admin/shop/discounts/edit/shared/_product.html.haml
radiant-shop_discounts-extension-0.0.9 app/views/admin/shop/discounts/edit/shared/_product.html.haml
radiant-shop_discounts-extension-0.0.8 app/views/admin/shop/discounts/edit/shared/_product.html.haml
radiant-shop_discounts-extension-0.0.7 app/views/admin/shop/discounts/edit/shared/_product.html.haml
radiant-shop_discounts-extension-0.0.6 app/views/admin/shop/discounts/edit/shared/_product.html.haml
radiant-shop_discounts-extension-0.0.4 app/views/admin/shop/discounts/edit/shared/_product.html.haml
radiant-shop_discounts-extension-0.0.3 app/views/admin/shop/discounts/edit/shared/_product.html.haml
radiant-shop_discounts-extension-0.0.1 app/views/admin/shop/discounts/edit/shared/_product.html.haml
radiant-shop-extension-0.11.6 app/views/admin/shop/discounts/edit/shared/_product.html.haml