2014-11-25 15:27:12 +01:00
|
|
|
<%= @user.name %>
|
|
|
|
|
2014-11-25 16:38:08 +01:00
|
|
|
<%= form_for( @order, url: user_orders_path(@user)) do |f| %>
|
2014-12-05 07:55:28 +01:00
|
|
|
<%= render 'application/errors', model: @order %>
|
|
|
|
|
2014-12-05 16:15:07 +01:00
|
|
|
<%= f.fields_for :order_products do |op_field| %>
|
|
|
|
<div class="input-group">
|
|
|
|
<%= render partial: 'btn_dec' %>
|
|
|
|
<%= op_field.text_field :count, class: 'form-control', value: 0 %>
|
|
|
|
<%= render partial: 'btn_inc' %>
|
|
|
|
<%= op_field.hidden_field :product_id %>
|
|
|
|
</div>
|
2014-12-04 17:02:08 +01:00
|
|
|
<% end %>
|
2014-11-25 15:27:12 +01:00
|
|
|
<%= f.submit "Order", class: "btn btn-primary " %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
|
|
<div style="padding-top: 50px;" class="order_list ">
|
|
|
|
<p>
|
2014-12-05 16:15:07 +01:00
|
|
|
Nothing ordered yet!
|
2014-11-25 15:27:12 +01:00
|
|
|
</p>
|
|
|
|
</div>
|