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