Sha256: 940a6e322ef40334c8fe345e42ae2253dc3647121a569c47c9dbed7290f0ce80

Contents?: true

Size: 1.44 KB

Versions: 4

Compression:

Stored size: 1.44 KB

Contents

.effective-order
  %table.table
    - include_download_column = order.purchased? && order.order_items.any? { |order_item| order_item.purchased_download_url.present? rescue false }
    %thead
      %tr
        %th.quantity Quantity
        %th.item Item
        - if include_download_column
          %th.download Download
        %th.price Price
    %tbody
      - order.order_items.each do |item|
        %tr
          %td.quantity
            = item.quantity
          %td.item
            = item.title.html_safe
            - if order.new_record? && item.purchasable.kind_of?(Effective::Subscription)
              = render :partial => 'effective/orders/stripe/subscription_fields', :locals => {:form => form, :subscription => item.purchasable }

          - if include_download_column
            %td.download
              - if item.purchased? && (item.purchased_download_url rescue nil).present?
                = link_to 'download', item.purchased_download_url
              - else
                = '-'
          %td.price
            = price_to_currency(item.subtotal)
    %tfoot
      %tr
        %th{:colspan => (include_download_column ? 3 : 2)} Subtotal
        %td.price= price_to_currency(order.subtotal)
      %tr
        %th{:colspan => (include_download_column ? 3 : 2)} Tax
        %td.price= price_to_currency(order.tax)
      %tr
        %th{:colspan => (include_download_column ? 3 : 2)} Total Due
        %td.price= price_to_currency(order.total)

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
effective_orders-1.1.2 app/views/effective/orders/_order_items.html.haml
effective_orders-1.1.1 app/views/effective/orders/_order_items.html.haml
effective_orders-1.1.0 app/views/effective/orders/_order_items.html.haml
effective_orders-1.0.0 app/views/effective/orders/_order_items.html.haml