forked from RedesignChallenge/challenge-platform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
_header.html.erb
32 lines (28 loc) · 1.32 KB
/
_header.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<div id='user-header'>
<div class='container'>
<div class='row'>
<div class='col-sm-8 col-sm-offset-2 col-md-6 col-md-offset-3'>
<% if @user.avatar.present? %>
<%= image_tag(@user.avatar.url, class: 'img-circle') %>
<% else %>
<span class="fa-stack fa-user-avatar">
<i class="fa fa-stack-2x fa-circle" style='color:<%= @user.color %>'></i>
<i class="fa fa-stack-1x fa-inverse"><%= @user.initials %></i>
</span>
<% end %>
<div class='user-caption'>
<p class='user-name'><%= @user.display_name %></p>
<p class='user-title'><%= @user.display_organization %></p>
<p class='user-location'><%#= current_user.display_name %></p>
</div>
<% if user_signed_in? && current_user == @user %>
<ul class="nav nav-tabs nav-justified">
<li role="presentation"><%= link_to "#{t('users._header.edit')}", edit_user_registration_path(setting: 'profile') %></li>
<li role="presentation"><%= link_to "#{t('users._header.settings')}", edit_user_registration_path(setting: 'account') %></li>
<li role="presentation" class='active'><%= link_to "#{t('users._header.activity')}", user_path(current_user) %></li>
</ul>
<% end %>
</div>
</div>
</div>
</div>