Sha256: c54ca0b248a0eba0b94f1a777241b0bd149145b8f7da4311ee2514d6308a1383

Contents?: true

Size: 1.88 KB

Versions: 47

Compression:

Stored size: 1.88 KB

Contents

- include_download_column = order.purchased? && order.order_items.any? { |order_item| order_item.purchased_download_url.present? rescue false }

.effective-order
  %table.table{:style => 'width: 600px;margin-bottom:25px;'}

    %thead
      %tr
        %th.quantity{:style => 'text-align: left;'} Qty
        %th.item{:style => 'text-align: left;'} Item
        - if include_download_column
          %th.download{:style => 'text-align: left;'} Download
        %th.price{:style => 'text-align: right;'} Price

    %tbody
      - order.order_items.each do |item|
        %tr
          %td.quantity{:style => 'text-align: left;'}= item.quantity
          %td.item{:style => 'text-align: left;'}
            = 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{:style => 'text-align: left;'}
              - if item.purchased? && (item.purchased_download_url rescue nil).present?
                = link_to 'download', item.purchased_download_url
              - else
                = '-'
          %td.price{:style => 'text-align: right;'}= price_to_currency(item.subtotal)

    %tfoot
      %tr
        %th{:style => 'text-align: right;', :colspan => (include_download_column ? 3 : 2)} Subtotal
        %td.price{:style => 'text-align: right;'}= price_to_currency(order.subtotal)
      %tr
        %th{:style => 'text-align: right;', :colspan => (include_download_column ? 3 : 2)} Tax
        %td.price{:style => 'text-align: right;'}= price_to_currency(order.tax)
      %tr
        %th{:style => 'text-align: right;', :colspan => (include_download_column ? 3 : 2)} Total Due
        %td.price{:style => 'text-align: right;'}= price_to_currency(order.total)

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
effective_orders-1.6.0 app/views/effective/orders/_order_items.html.haml
effective_orders-1.5.9 app/views/effective/orders/_order_items.html.haml
effective_orders-1.5.8 app/views/effective/orders/_order_items.html.haml
effective_orders-1.5.7 app/views/effective/orders/_order_items.html.haml
effective_orders-1.5.5 app/views/effective/orders/_order_items.html.haml
effective_orders-1.5.4 app/views/effective/orders/_order_items.html.haml
effective_orders-1.5.3 app/views/effective/orders/_order_items.html.haml
effective_orders-1.5.2 app/views/effective/orders/_order_items.html.haml
effective_orders-1.5.1 app/views/effective/orders/_order_items.html.haml
effective_orders-1.5.0 app/views/effective/orders/_order_items.html.haml
effective_orders-1.4.8 app/views/effective/orders/_order_items.html.haml
effective_orders-1.4.7 app/views/effective/orders/_order_items.html.haml
effective_orders-1.4.6 app/views/effective/orders/_order_items.html.haml
effective_orders-1.4.5 app/views/effective/orders/_order_items.html.haml
effective_orders-1.4.4 app/views/effective/orders/_order_items.html.haml
effective_orders-1.4.3 app/views/effective/orders/_order_items.html.haml
effective_orders-1.4.2 app/views/effective/orders/_order_items.html.haml
effective_orders-1.4.1 app/views/effective/orders/_order_items.html.haml
effective_orders-1.4.0 app/views/effective/orders/_order_items.html.haml
effective_orders-1.3.13 app/views/effective/orders/_order_items.html.haml