Sha256: 3c166ca2649977cf8be1ff3c4c423f99ef6cae989982ba1b349adae6b7c81eaf

Contents?: true

Size: 722 Bytes

Versions: 2

Compression:

Stored size: 722 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 SKU
        %th Name
        %th Price
        %th 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= product.stock

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
shoppe-0.0.9 app/views/shoppe/products/index.html.haml
shoppe-0.0.8 app/views/shoppe/products/index.html.haml