Sha256: 8276ccd5e73753ea909df0982ab5da0df482d69400b18b38b0e7876b5a9d51be

Contents?: true

Size: 960 Bytes

Versions: 3

Compression:

Stored size: 960 Bytes

Contents

Add Order
- form_for [:admin, @shop_order] do |f|
  %p
    = f.label :customer, 'Customer:'
    = f.select :customer_id, ShopCustomer.scoped_by_access('front').all.collect {|c| [c.name, c.id]}
  %p
    = f.label :email, 'Status:'
    = f.text_field :status

  %p
    - f.fields_for :line_items do |li_f|
      = li_f.label :product
      = li_f.select :shop_product_id, ShopProduct.all.collect {|p| [p.title, p.id]}
      = li_f.label :quantity
      = li_f.text_field :quantity

      - unless li_f.object.new_record?
        <%= li_f.check_box '_delete'
        <%= li_f.label '_delete', 'Remove'

  %p
    = f.submit "Save"
    

- if @shop_orders.empty?
  %p There are no customers.
- else
  %form
    - @shop_orders.each do |order|
      %p
        = order.balance
        = order.customer.name if order.customer
        = link_to "Delete Order", "/admin/shop/orders/#{order.id}", :confirm => "Are you sure?", :method => :delete, :style => "color: blue;"

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
radiant-shop-extension-0.10.0 app/views/admin/shop/orders/index.html.haml
radiant-shop-extension-0.9.3 app/views/admin/shop/orders/index.html.haml
radiant-shop-extension-0.9.2 app/views/admin/shop/orders/index.html.haml