Sha256: bef71a00e5bc2d3225e2303fba04d351c1881195e8ab1df6e532f49db136b3f1

Contents?: true

Size: 1.09 KB

Versions: 5

Compression:

Stored size: 1.09 KB

Contents

- @page_title = 'Orders'

= content_for :header do
  %p.buttons
    = link_to "New Order", :new_order, :class => 'button green'
    = link_to "Search Orders", '#', :class => 'button', :rel => 'searchOrders'
  %h2.orders
    Orders
    %span= page_entries_info @orders

= render 'search_form'

.table
  %table.data
    %thead
      %tr
        %th Number
        %th Customer
        %th Status
        %th Products
        %th Total
        %th Payment
    %tbody
      - if @orders.empty?
        %tr.empty
          %td{:colspan => 6} No orders to display.
      - else
        - for order in @orders
          %tr
            %td= link_to order.number, order
            %td= order.customer_name
            %td= status_tag order.status
            %td
              %ul
                - for item in order.order_items
                  %li #{item.quantity} x #{item.ordered_item.full_name}
            %td= number_to_currency order.total
            %td= boolean_tag order.paid_in_full?, nil, :true_text => number_to_currency(order.amount_paid), :false_text => number_to_currency(order.amount_paid)
= paginate @orders

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
shoppe-1.0.2 app/views/shoppe/orders/index.html.haml
shoppe-1.0.1 app/views/shoppe/orders/index.html.haml
shoppe-1.0.0 app/views/shoppe/orders/index.html.haml
shoppe-0.0.21 app/views/shoppe/orders/index.html.haml
shoppe-0.0.20 app/views/shoppe/orders/index.html.haml