mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-03 13:41:12 +08:00
Merge pull request #1246 from ZmagoD/zd_SCI_1334
adds skip_user_status parameter to popover_for_user_name function in …
This commit is contained in:
commit
ba9f6e22b7
1 changed files with 5 additions and 2 deletions
|
@ -140,7 +140,7 @@ module ApplicationHelper
|
|||
end
|
||||
|
||||
# Generate smart annotation link for one user object
|
||||
def popover_for_user_name(user, team = nil)
|
||||
def popover_for_user_name(user, team = nil, skip_user_status = false)
|
||||
user_still_in_team = user.teams.include?(team)
|
||||
|
||||
user_description = %(<div class='col-xs-4'>
|
||||
|
@ -166,7 +166,10 @@ module ApplicationHelper
|
|||
end
|
||||
|
||||
user_name = user.full_name
|
||||
user_name << ' ' + I18n.t('atwho.res.removed') if !user_still_in_team
|
||||
|
||||
unless skip_user_status || user_still_in_team
|
||||
user_name << " #{I18n.t('atwho.res.removed')}"
|
||||
end
|
||||
|
||||
raw("<img src='#{user_avatar_absolute_url(user, :icon_small)}'" \
|
||||
"alt='avatar' class='atwho-user-img-popover'" \
|
||||
|
|
Loading…
Reference in a new issue