Sha256: ec5b64e19e1dc1150dda1566b7df9d317d65dd43e691fe524d115322aba1d991

Contents?: true

Size: 846 Bytes

Versions: 4

Compression:

Stored size: 846 Bytes

Contents

= haml "orders/menu".to_sym

%h1 Orders

- if Order.current.present?
  %a(href="/order/#{Order.current.id}")
    Current Order
- else
  %a(href="/order/new") New Order

%br
- if @orders.count > 0
  %br

  %table.pure-table
    %thead
      %tr
        %th Date
        %th Number of Items
        %th Action
        %th State
    %tbody
      - @orders.each do |order|
        %tr
          %td=order.created_at
          %td
            = order.order_items.count
            (
            = order.order_items.processible.count
            )
          %td
            %a.pure-button(href="/order/#{order.id}")
              %i.fa.fa-eye
              View
            - if order.state == "ordered"
              %a.pure-button(href="/order/#{order.id}/packlist")
                %i.fa.fa-paper
                Packlist

          %td=order.state

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rawbotz-0.1.5 lib/rawbotz/views/orders/index.haml
rawbotz-0.1.4 lib/rawbotz/views/orders/index.haml
rawbotz-0.1.3 lib/rawbotz/views/orders/index.haml
rawbotz-0.1.2 lib/rawbotz/views/orders/index.haml