Retrospring/app/views/user/_profile_info.html.haml

41 lines
1.3 KiB
Plaintext

.panel.panel-default#profile
%img.profile--avatar{src: @user.profile_picture.url(:large)}
- if user_signed_in? && current_user.has_role?(:administrator)
- if @user.has_role?(:administrator)
.profile--panel-badge.panel-badge-danger
%i.fa.fa-flask
= t 'views.user.title.admin'
- if @user.has_role?(:moderator)
.profile--panel-badge.panel-badge-success
%i.fa.fa-users
= t 'views.user.title.moderator'
- if @user.banned?
.profile--panel-badge.panel-badge-default
%i.fa.fa-ban
= t 'views.user.title.banned'
- if @user.following? current_user
.profile--panel-badge.panel-badge-default
= t 'views.user.follows_you'
.panel-body
.profile--panel-name
- if @user.display_name.blank?
.profile--displayname
= @user.screen_name
- else
.profile--displayname
= @user.display_name
.profile--username
= @user.screen_name
- unless @user.bio.blank?
%p.profile--text= markdown @user.bio
- unless @user.website.blank?
%p.profile--text
%i.fa.fa-globe
%a{href: @user.website}= @user.display_website
- unless @user.location.blank?
%p.profile--text
%i.fa.fa-location-arrow
= @user.location
= render 'user/actions', user: @user, type: :follower
= render 'user/stats', user: @user