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

21 lines
767 B
Plaintext
Raw Normal View History

2014-12-09 21:32:54 +00:00
<div class="col-md-3">
2014-12-10 04:13:17 +00:00
<div class="thumbnail monopoly">
2015-02-12 13:39:58 +00:00
<h3 class="header" style="background-color: #<%= get_color(user)%>;" ><%= link_to user.full_name, user %></h3>
2014-12-09 21:32:54 +00:00
<div class="caption">
2014-12-10 08:20:12 +00:00
<%= image_tag(user.avatar , class: "img-circle avatar") %>
2014-12-09 21:32:54 +00:00
<p><strong>Name:</strong> <%= user.name %></p>
<p><strong>Last name:</strong> <%= user.last_name %></p>
<p><strong>Nickname:</strong> <%= user.nickname %></p>
<p><strong>Debt:</strong> <%= euro(user.debt) %></p>
2014-12-10 04:13:17 +00:00
</div>
2015-02-12 13:39:58 +00:00
<% if current_user.admin? %>
<div class="footer">
<p>
<%= link_to "Delete", user_path(user), method: :delete, class: "btn btn-danger", data: {confirm: 'Are you sure?'} %>
</p>
2014-12-10 04:13:17 +00:00
2015-02-12 13:39:58 +00:00
</div>
<% end %>
2014-12-09 21:32:54 +00:00
</div>
</div>