28 lines
761 B
Plaintext
28 lines
761 B
Plaintext
<%= 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>
|