tap/app/views/users/show.html.erb
Caroline De Brouwer 5b5c454e0e Merge conflict
2015-02-12 16:19:41 +01:00

23 lines
732 B
Text

<%= render partial: 'flash' %>
<div class="row">
<div class="user_info">
<h2><%= @user.nickname %> (<%= @user.full_name %>)</h2>
<h5><%= link_to "[Edit profile]" , edit_user_registration_path if current_user == @user%></h5>
<h4>Balance: <%= euro(@user.balance) %></h4>
</div>
<% if @user.orders.any? %>
<div class="col-md-6">
<h3>Orders (<%= @user.orders_count %>)</h3>
<%= render @orders %>
<%= will_paginate @orders %>
</div>
<% end %>
<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>
</div>