f1d3ea63cf
The status is shown for - The author of a commit when viewing a commit - Notes on a commit (regular/diff) - The user that triggered a pipeline when viewing a pipeline - The author of a merge request when viewing a merge request - The author of notes on a merge request (regular/diff) - The author of an issue when viewing an issue - The author of notes on an issue - The author of a snippet when viewing a snippet - The author of notes on a snippet - A user's profile page - The list of members of a group/user
19 lines
414 B
Ruby
19 lines
414 B
Ruby
# frozen_string_literal: true
|
|
|
|
module UserStatusTooltip
|
|
extend ActiveSupport::Concern
|
|
include ActionView::Helpers::TagHelper
|
|
include ActionView::Context
|
|
include EmojiHelper
|
|
include UsersHelper
|
|
|
|
included do
|
|
expose :user_status_if_loaded, as: :status_tooltip_html
|
|
|
|
def user_status_if_loaded
|
|
return nil unless object.association(:status).loaded?
|
|
|
|
user_status(object)
|
|
end
|
|
end
|
|
end
|