2018-10-15 14:42:47 +05:30
|
|
|
- return unless current_user
|
|
|
|
|
|
|
|
%ul
|
|
|
|
%li.current-user
|
|
|
|
.user-name.bold
|
|
|
|
= current_user.name
|
|
|
|
= current_user.to_reference
|
2018-12-05 23:21:45 +05:30
|
|
|
- if current_user.status
|
2018-12-13 13:39:08 +05:30
|
|
|
.user-status.d-flex.align-items-center.prepend-top-2.has-tooltip{ title: current_user.status.message_html, data: { html: 'true', placement: 'bottom' } }
|
|
|
|
%span.user-status-emoji.d-flex.align-items-center
|
|
|
|
= emoji_icon current_user.status.emoji
|
|
|
|
%span.user-status-message.str-truncated
|
|
|
|
= current_user.status.message_html.html_safe
|
2018-10-15 14:42:47 +05:30
|
|
|
%li.divider
|
2018-12-05 23:21:45 +05:30
|
|
|
- if can?(current_user, :update_user_status, current_user)
|
|
|
|
%li
|
|
|
|
.js-set-status-modal-trigger{ data: { has_status: current_user.status.present? ? 'true' : 'false' } }
|
2018-10-15 14:42:47 +05:30
|
|
|
- if current_user_menu?(:profile)
|
|
|
|
%li
|
|
|
|
= link_to s_("CurrentUser|Profile"), current_user, class: 'profile-link', data: { user: current_user.username }
|
|
|
|
- if current_user_menu?(:settings)
|
|
|
|
%li
|
2019-10-12 21:52:04 +05:30
|
|
|
= link_to s_("CurrentUser|Settings"), profile_path, data: { qa_selector: 'settings_link' }
|
2018-10-15 14:42:47 +05:30
|
|
|
- if current_user_menu?(:sign_out)
|
2018-12-13 13:39:08 +05:30
|
|
|
%li.divider
|
2018-10-15 14:42:47 +05:30
|
|
|
%li
|
2019-10-12 21:52:04 +05:30
|
|
|
= link_to _("Sign out"), destroy_user_session_path, class: "sign-out-link", data: { qa_selector: 'sign_out_link' }
|