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

30 lines
1.2 KiB
Plaintext
Raw Normal View History

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