tap/app/views/users/show.html.erb

25 lines
765 B
Text
Raw Normal View History

<%= render partial: 'flash' %>
2014-11-09 22:53:39 +01:00
<div class="row">
<div class="user_info">
2015-02-12 16:19:41 +01:00
<h5><%= link_to "[Edit profile]" , edit_user_registration_path if current_user == @user%></h5>
2015-02-19 15:41:12 +01:00
<h2><%= @user.nickname %> (<%= @user.full_name %>)</h2>
<div class="balance">BALANCE: <%= euro(@user.balance) %></div>
</div>
2015-02-19 15:41:12 +01:00
<% if @user.orders.any? %>
2015-02-19 15:41:12 +01:00
<div class="stats">
<h4>Total products</h4>
Total: <br/><ul><li><%=@categories.map{|c| pluralize(c.count, c.category)}.join(", ")%></li></ul>
<br/>
Specifics:<br/>
<%= render partial: "products/product_row", collection: @products, as: :product %>
<h4>All orders (<%= @user.orders_count %>)</h4>
<%= render @orders %>
<%= will_paginate @orders %>
</div>
<% end %>
2015-02-19 15:41:12 +01:00
2014-11-23 21:12:31 +01:00
</div>