tap/app/views/users/show.html.erb

30 lines
749 B
Text
Raw Normal View History

2014-11-09 22:53:39 +01:00
<div class="row">
<aside class="col-md-4">
<section class="user_info">
2014-11-23 21:12:31 +01:00
<h1>Name: <%= @user.name %></h1>
<h1>Last name: <%= @user.last_name %></h1>
<h1>Nickname: <%= @user.nickname %></h1>
<h1>Balance: <%= @user.balance %></h1>
<h1>User id: <%= @user.id %></h1>
<% if ordering? %>
<h1>Ordering!</h1>
<% else %>
<h1>Not ordering!</h1>
<% end %>
<%= link_to "End order", end_order_path, method: "delete" %>
2014-11-09 22:53:39 +01:00
</section>
</aside>
2014-11-23 21:12:31 +01:00
2014-11-09 22:53:39 +01:00
<div class="col-md-8">
<% if @user.orders.any? %>
<h3>Orders (<%= @user.orders.count %>)</h3>
<ol class="orders">
<%= render @orders %>
</ol>
<%= will_paginate @orders %>
<% end %>
</div>
2014-11-23 21:12:31 +01:00
</div>