tap/app/views/orders/new.html.erb

35 lines
1.1 KiB
Text
Raw Normal View History

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| %>
<%= render 'application/errors', model: @order %>
2014-12-04 17:02:08 +01:00
<% @order_products.each do |op| %>
<%= f.fields_for :products do |products| %>
<%= products.fields_for op.product.id.to_s do |product_field| %>
<div class="input-group">
<span class="input-group-btn">
<button class="btn btn-default btn-dec" type="button">
<span class="glyphicon glyphicon-minus"></span>
</button>
</span>
<%= product_field.text_field :count, class: 'form-control', value: 0 %>
<%= image_tag op.product.avatar %>
2014-12-04 17:02:08 +01:00
<span class="input-group-btn">
<button class="btn btn-default btn-inc" type="button">
<span class="glyphicon glyphicon-plus"></span>
</button>
</span>
</div>
<% end %>
<% end %>
<% 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>
Nothing ordered yet!
</p>
</div>