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

33 lines
1.4 KiB
Plaintext
Raw Normal View History

2015-02-12 07:59:54 -08:00
%li.dropdown.profile--image-dropdown
%a.dropdown-toggle{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)}
2015-02-12 08:50:13 -08:00
%span.visible-xs
= current_user.screen_name
%b.caret
2015-02-12 07:37:07 -08: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 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 09:10:16 -08:00
%a{href: show_user_profile_path(current_user.screen_name)}
= 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 09:10:16 -08:00
%a{href: show_user_profile_path(current_user.screen_name)}
= 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