diff options
author | Phil Hughes <me@iamphill.com> | 2016-11-22 13:25:09 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-11-22 13:25:09 +0300 |
commit | 9d3186e44aa9690c0c6c3af6f979132baf34cb41 (patch) | |
tree | f6ab390dbec6f63cd4fe6299246d6859e0f256ec /app/views/award_emoji | |
parent | 0f590750307bdd871b20a8d87fc6963d95f2e00c (diff) |
Disabled award emoji button when user is not logged in
Closes #24680
Diffstat (limited to 'app/views/award_emoji')
-rw-r--r-- | app/views/award_emoji/_awards_block.html.haml | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/views/award_emoji/_awards_block.html.haml b/app/views/award_emoji/_awards_block.html.haml index fbe3ab912b6..d8912eda314 100644 --- a/app/views/award_emoji/_awards_block.html.haml +++ b/app/views/award_emoji/_awards_block.html.haml @@ -1,7 +1,10 @@ - grouped_emojis = awardable.grouped_awards(with_thumbs: inline) .awards.js-awards-block{ class: ("hidden" if !inline && grouped_emojis.empty?), data: { award_url: toggle_award_url(awardable) } } - awards_sort(grouped_emojis).each do |emoji, awards| - %button.btn.award-control.js-emoji-btn.has-tooltip{ type: "button", class: (award_active_class(awards, current_user)), data: { placement: "bottom", title: award_user_list(awards, current_user) } } + %button.btn.award-control.js-emoji-btn.has-tooltip{ type: "button", + disabled: !current_user, + class: (award_active_class(awards, current_user)), + data: { placement: "bottom", title: award_user_list(awards, current_user) } } = emoji_icon(emoji, sprite: false) %span.award-control-text.js-counter = awards.count |