diff options
author | Dennis Tang <dennis@dennistang.net> | 2018-10-04 11:19:51 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-10-04 11:19:51 +0300 |
commit | 4edcb02f94ba832929c054097d2f8badc0a34060 (patch) | |
tree | 2b01b32354ff9892200ef07c8b9e56caf37c5c73 /app/views | |
parent | 18777ec78d8b6040702adc530d2ac5dff0f2ea67 (diff) |
Resolve "Add status message from within user menu"
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/layouts/header/_current_user_dropdown.html.haml | 7 | ||||
-rw-r--r-- | app/views/layouts/header/_default.html.haml | 3 |
2 files changed, 10 insertions, 0 deletions
diff --git a/app/views/layouts/header/_current_user_dropdown.html.haml b/app/views/layouts/header/_current_user_dropdown.html.haml index 9ed05d6e3d0..261d758622b 100644 --- a/app/views/layouts/header/_current_user_dropdown.html.haml +++ b/app/views/layouts/header/_current_user_dropdown.html.haml @@ -5,7 +5,14 @@ .user-name.bold = current_user.name = current_user.to_reference + - if current_user.status + .user-status-emoji.str-truncated.has-tooltip{ title: current_user.status.message_html, data: { html: 'true', placement: 'bottom' } } + = emoji_icon current_user.status.emoji + = current_user.status.message_html.html_safe %li.divider + - if can?(current_user, :update_user_status, current_user) + %li + .js-set-status-modal-trigger{ data: { has_status: current_user.status.present? ? 'true' : 'false' } } - if current_user_menu?(:profile) %li = link_to s_("CurrentUser|Profile"), current_user, class: 'profile-link', data: { user: current_user.username } diff --git a/app/views/layouts/header/_default.html.haml b/app/views/layouts/header/_default.html.haml index 044b49c12cc..39604611440 100644 --- a/app/views/layouts/header/_default.html.haml +++ b/app/views/layouts/header/_default.html.haml @@ -74,3 +74,6 @@ %span.sr-only= _('Toggle navigation') = sprite_icon('ellipsis_h', size: 12, css_class: 'more-icon js-navbar-toggle-right') = sprite_icon('close', size: 12, css_class: 'close-icon js-navbar-toggle-left') + +- if can?(current_user, :update_user_status, current_user) + .js-set-status-modal-wrapper{ data: { current_emoji: current_user.status.present? ? current_user.status.emoji : '', current_message: current_user.status.present? ? current_user.status.message : '' } } |