<%= render partial: 'flash' %>

<%= @user.nickname %> <%= link_to content_tag(:small, content_tag(:span, "", class: "glyphicon glyphicon-cog")), edit_user_path(@user) %>

<% 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 %>)

<%= render @orders %>
<%= will_paginate @orders %>
<% end %>