2015-01-06 20:33:11 +01:00
|
|
|
<%= render partial: 'flash' %>
|
2014-11-09 22:53:39 +01:00
|
|
|
<div class="row">
|
2015-01-09 19:15:48 +01:00
|
|
|
<div class="user_info">
|
|
|
|
<h2>
|
|
|
|
<%= @user.full_name %> - <%= @user.nickname %>
|
2015-02-12 14:39:58 +01:00
|
|
|
<%= link_to "edit", edit_user_registration_path if current_user == @user %>
|
2015-01-09 19:15:48 +01:00
|
|
|
</h2>
|
|
|
|
<h4>Balance: <%= euro(@user.balance) %></h4>
|
|
|
|
</div>
|
2014-11-23 21:12:31 +01:00
|
|
|
|
2015-01-09 19:15:48 +01:00
|
|
|
<% if @user.orders.any? %>
|
2015-01-13 13:06:42 +01:00
|
|
|
<div class="col-md-6">
|
|
|
|
<h3>Orders (<%= @user.orders_count %>)</h3>
|
2015-02-09 13:23:38 +01:00
|
|
|
<%= render @orders %>
|
|
|
|
<%= will_paginate @orders %>
|
2015-01-09 19:15:48 +01:00
|
|
|
</div>
|
|
|
|
<% end %>
|
2015-01-13 13:06:42 +01:00
|
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
<h3>Products</h3>
|
|
|
|
<%= render partial: "products/product_row", collection: @products, as: :product %>
|
|
|
|
<h4>Categories</h4>
|
|
|
|
<%= render partial: "products/category", collection: @categories %>
|
|
|
|
</div>
|
2014-11-23 21:12:31 +01:00
|
|
|
</div>
|