27 lines
761 B
Text
27 lines
761 B
Text
<%= render partial: 'flash' %>
|
|
<div class="row">
|
|
<%= render 'sidebar' %>
|
|
<div id="user_info" class="col-sm-9">
|
|
<% if (all_orders = @user.all_orders(params[:page])).any? %>
|
|
<h4>Previously ordered</h4>
|
|
Total:
|
|
<ul>
|
|
<li>
|
|
<%= @user.products_group_by_category.map{|c| pluralize(c.count, c.category)}.to_sentence %>
|
|
</li>
|
|
</ul>
|
|
|
|
Specifics:
|
|
<%= content_tag :ul do %>
|
|
<% @user.products_group_by_id.each do |p| %>
|
|
<%= content_tag :li, pluralize(p.count, p.name) %>
|
|
<% end %>
|
|
<% end %>
|
|
|
|
<h4>All orders (<%= @user.orders_count %>)</h4>
|
|
<table class="orders"><%= render all_orders %></table>
|
|
<%= will_paginate all_orders %>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
</div>
|