Retrospring/app/views/layouts/_profile.html.haml

30 lines
1.3 KiB
Plaintext

%li.dropdown.profile--image-dropdown
%a.dropdown-toggle{href: "#", "data-toggle" => "dropdown"}
%img.img-rounded.answerbox--img.hidden-xs{src: current_user.profile_picture.url(:small)}
.visible-xs= current_user.screen_name
%b.caret.visible-xs
%ul.dropdown-menu.profile--dropdown
%li.hidden-xs
.media.profile--dropdown-media
.pull-left
%img.img-rounded.profile--dropdown-img{src: current_user.profile_picture.url(:medium)}
.media-body
- if current_user.display_name.blank?
.profile--dropdown-username
= current_user.screen_name
- else
.profile--dropdown-displayname
= current_user.display_name
.profile--username
= current_user.screen_name
%li.divider.hidden-xs
%li.visible-xs= link_to "View profile", show_user_profile_path(current_user.screen_name)
%li= link_to "Settings", edit_user_registration_path
%li.divider
- if current_user.admin?
%li= link_to "Kontrollzentrum", rails_admin_path
%li= link_to "Sidekiq", sidekiq_web_path
- if current_user.mod?
%li= link_to "Moderation panel", moderation_path
%li.divider
%li= link_to "Logout", destroy_user_session_path, method: :delete