<% if can? :edit, @user %>
<% end %>
<%= link_to "PLACE ORDER!", new_user_order_path(@user) if current_user == @user %>
DEBT: <%= euro(@user.debt) %>
<% if @orders.any? %>
Total products
Total:
-
<%= @categories.map{|c| pluralize(c.count, c.category)}.to_sentence %>
Specifics:
<%= content_tag :ul do %>
<% @products.each do |p| %>
<%= content_tag :li, pluralize(p.count, p.name) %>
<% end %>
<% end %>
All orders (<%= @user.orders_count %>)
<%= will_paginate @orders %>
<% end %>