Sha256: 5fd025e5ff5f6e8846586979e12b29e02e2ee50695d0dfb1fb7a24797ba95f7e

Contents?: true

Size: 1.68 KB

Versions: 5

Compression:

Stored size: 1.68 KB

Contents

- @page_title = "Customer - #{@customer.name}"
= content_for :header do
  %p.buttons
    = link_to "New Address", [:new, @customer, :address], class: "button"
    = link_to "Edit", [:edit, @customer], class: "button"
  %h2.users
    Customer - #{@customer.name}

#customer
  .details
    .left
      %dl
        %dt Name
        %dd= @customer.full_name
        %dt Company
        %dd= @customer.company.blank? ? '-' : @customer.company
    .right
      %dl
        %dt Email Address
        %dd= mail_to @customer.email
        %dt Telephone
        %dd= @customer.phone
        %dt Mobile
        %dd= @customer.mobile

  = field_set_tag "Addresses", :class => 'padded' do
    = render "addresses"

  = field_set_tag t('shoppe.orders.orders'), :class => 'padded' do
    .table
      %table.data
        %thead
          %tr
            %th= t('shoppe.orders.number')
            %th= t('shoppe.orders.status')
            %th= t('shoppe.orders.products')
            %th= t('shoppe.orders.total')
            %th= t('shoppe.orders.payment')
        %tbody
          - if @orders.empty?
            %tr.empty
              %td{:colspan => 6}= t('shoppe.orders.no_orders')
          - else
            - for order in @orders
              %tr
                %td= link_to order.number, order
                %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)

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
shoppe-1.1.1 app/views/shoppe/customers/show.html.haml
shoppe-1.1.0 app/views/shoppe/customers/show.html.haml
shoppe-1.0.9 app/views/shoppe/customers/show.html.haml
shoppe-1.0.8 app/views/shoppe/customers/show.html.haml
kylekthompson-shoppe-1.0.7 app/views/shoppe/customers/show.html.haml