diff options
author | Fatih Acet <acetfatih@gmail.com> | 2017-01-03 18:37:28 +0000 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2017-01-03 18:37:28 +0000 |
commit | db7a063dd28287fe7ba94982a48c8c9e185ab7eb (patch) | |
tree | 6eff5b2ab42141bafeaae38395e31851984db544 /app/helpers/issues_helper.rb | |
parent | 4d253c356fc509d9bcc60e77a016d40ba66957f8 (diff) | |
parent | dbe0d0fb5a0ae889b452cd7f2ba1ada7c8e6441d (diff) | |
download | gitlab-ce-db7a063dd28287fe7ba94982a48c8c9e185ab7eb.tar.gz |
Merge branch '26168-emoji-reactions-missing-tooltip-when-not-logged-in' into 'master'
Disable award emoji button but display tooltip
Closes #26168
See merge request !8382
Diffstat (limited to 'app/helpers/issues_helper.rb')
-rw-r--r-- | app/helpers/issues_helper.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index 47c7d2ebbec..a2d21b67a77 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -128,8 +128,10 @@ module IssuesHelper names.to_sentence end - def award_active_class(awards, current_user) - if current_user && awards.find { |a| a.user_id == current_user.id } + def award_state_class(awards, current_user) + if !current_user + "disabled" + elsif current_user && awards.find { |a| a.user_id == current_user.id } "active" else "" |