Sha256: 1a8d87aafee966aa0768eb67626d56f24c2a455d64a7d72d45454a149da1695f

Contents?: true

Size: 786 Bytes

Versions: 35

Compression:

Stored size: 786 Bytes

Contents

%h2 My Sales

%table.table
  %thead
    %tr
      %th Product
      %th Order
      %th Buyer
      %th Date of Sale
      %th Description
  %tbody
    - (@order_items || {}).group_by(&:purchasable).each do |purchasable, order_items|
      - order_items.each_with_index do |order_item, x|
        %tr
          - if x == 0
            %td{:rowspan => order_items.size}
              = link_to purchasable.title, acts_as_purchasable_path(purchasable)

          %td= "##{order_item.order.to_param}"
          %td= order_item.order.try(:user).try(:to_s)
          %td= order_item.order.purchased_at.strftime("%Y-%m-%d %H:%M")
          %td= order_item_summary(order_item)

- unless @order_items.present?
  %p You have no sales

%hr
= link_to 'Home', root_url, :class => 'btn btn-primary'

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
effective_orders-1.4.2 app/views/effective/orders/my_sales.html.haml
effective_orders-1.4.1 app/views/effective/orders/my_sales.html.haml
effective_orders-1.4.0 app/views/effective/orders/my_sales.html.haml
effective_orders-1.3.13 app/views/effective/orders/my_sales.html.haml
effective_orders-1.3.12 app/views/effective/orders/my_sales.html.haml
effective_orders-1.3.11 app/views/effective/orders/my_sales.html.haml
effective_orders-1.3.10 app/views/effective/orders/my_sales.html.haml
effective_orders-1.3.9 app/views/effective/orders/my_sales.html.haml
effective_orders-1.3.8 app/views/effective/orders/my_sales.html.haml
effective_orders-1.3.7 app/views/effective/orders/my_sales.html.haml
effective_orders-1.3.6 app/views/effective/orders/my_sales.html.haml
effective_orders-1.3.5 app/views/effective/orders/my_sales.html.haml
effective_orders-1.3.4 app/views/effective/orders/my_sales.html.haml
effective_orders-1.3.3 app/views/effective/orders/my_sales.html.haml
effective_orders-1.3.2 app/views/effective/orders/my_sales.html.haml
effective_orders-1.3.1 app/views/effective/orders/my_sales.html.haml
effective_orders-1.3.0 app/views/effective/orders/my_sales.html.haml
effective_orders-1.2.13 app/views/effective/orders/my_sales.html.haml
effective_orders-1.2.12 app/views/effective/orders/my_sales.html.haml
effective_orders-1.2.11 app/views/effective/orders/my_sales.html.haml