Sha256: 1dfb58bb0a8134e24224fac099aa19b3cc65a50ecb2698e2e19d9efe6a9d07ce
Contents?: true
Size: 1020 Bytes
Versions: 5
Compression:
Stored size: 1020 Bytes
Contents
- @page_title = "Products" = content_for :header do %p.buttons= link_to "New product", :new_product, :class => 'button green' %h2.products Products .table %table.data %thead %tr %th{:width => '20%'} SKU %th{:width => '50%'} Name %th{:width => '15%'} Price %th{:width => '15%'} Stock %tbody - if @products.empty? %tr.empty %td{:colspan => 4} No products to display. - else - for category, products in @products %tr %th{:colspan => 4}= category.name - for product in products %tr %td= product.sku %td= link_to product.title, [:edit, product] %td= number_to_currency product.price %td %span.float-right= link_to "Edit", stock_levels_product_path(product), :class => 'edit' = product.stock_control? ? boolean_tag(product.in_stock?, nil, :true_text => product.stock, :false_text => 'No stock') : ''
Version data entries
5 entries across 5 versions & 1 rubygems