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

33 lines
1.4 KiB
Text
Raw Normal View History

2015-02-12 16:59:54 +01:00
%li.dropdown.profile--image-dropdown
%a.dropdown-toggle{href: "#", "data-toggle" => "dropdown"}
2015-02-12 16:37:07 +01:00
%img.img-rounded.answerbox--img.hidden-xs{src: current_user.profile_picture.url(:small)}
2015-02-12 17:50:13 +01:00
%span.visible-xs
= current_user.screen_name
%b.caret
2015-02-12 16:37:07 +01:00
%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
2015-02-12 16:39:28 +01:00
- if current_user.display_name.blank?
2015-02-12 16:48:14 +01:00
.profile--dropdown-username
2015-02-12 18:10:16 +01:00
%a{href: show_user_profile_path(current_user.screen_name)}
= current_user.screen_name
2015-02-12 16:37:07 +01:00
- else
2015-02-12 16:48:14 +01:00
.profile--dropdown-displayname
2015-02-12 18:10:16 +01:00
%a{href: show_user_profile_path(current_user.screen_name)}
= current_user.display_name
2015-02-12 16:37:07 +01:00
.profile--username
2015-02-12 16:39:28 +01:00
= current_user.screen_name
2015-02-12 16:48:14 +01:00
%li.divider.hidden-xs
%li.visible-xs= link_to "View profile", show_user_profile_path(current_user.screen_name)
2015-02-12 16:37:07 +01:00
%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