26 lines
1,001 B
Text
26 lines
1,001 B
Text
<%= render partial: 'flash' %>
|
|
<div class="row">
|
|
<div class="user_info">
|
|
<h5>
|
|
<%= link_to "[Edit dagschotel]" , user_edit_dagschotel_path(@user) if current_user == @user %>
|
|
<%= link_to "[Edit profile]" , edit_user_registration_path if current_user == @user %>
|
|
</h5>
|
|
<h2><%= @user.nickname %> (<%= @user.full_name %>)</h2>
|
|
<%= button_to "PLACE ORDER!", new_user_order_path(@user), method: :get if current_user == @user %>
|
|
<div class="debt">DEBT: <%= euro(@user.debt) %></div>
|
|
</div>
|
|
|
|
<% if @orders.any? %>
|
|
<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>
|
|
<table class="orders"><%= render @orders %></table>
|
|
<%= will_paginate @orders %>
|
|
</div>
|
|
<% end %>
|
|
</div>
|