Add user avatar to user#show

This commit is contained in:
benji 2015-09-01 16:51:21 +02:00
parent db6f29b0e5
commit 43190104ec
2 changed files with 13 additions and 6 deletions

View file

@ -74,3 +74,7 @@
margin: 0px;
}
}
.user_avatar {
margin-bottom: 10px;
}

View file

@ -1,12 +1,15 @@
<%= render partial: 'flash' %>
<div class="row">
<div class="col-sm-3">
<h2>
<%= @user.nickname %>
<% if can? :edit, @user %>
<%= link_to content_tag(:small, content_tag(:span, "", class: "glyphicon glyphicon-cog")), edit_user_path(@user) %>
<% end %>
</h2>
<div>
<h2>
<%= @user.nickname %>
<% if can? :edit, @user %>
<%= link_to content_tag(:small, content_tag(:span, "", class: "glyphicon glyphicon-cog")), edit_user_path(@user) %>
<% end %>
</h2>
</div>
<%= content_tag :div, image_tag(@user.avatar, class: "img-circle img-thumbnail center"), class: "user_avatar center" %>
<ul class="list-group">
<li class="list-group-item text-muted">Orders</li>
<li class="list-group-item"><strong>Orders placed</strong><span class="badge"><%= @user.orders_count %></span></li>