mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-07 05:03:26 +08:00
adds skip_user_status parameter to popover_for_user_name function in order to keep the functionality more extendable [fixes SCI-1334]
This commit is contained in:
parent
0e9571c499
commit
8fe1977ca8
1 changed files with 5 additions and 2 deletions
|
@ -140,7 +140,7 @@ module ApplicationHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
# Generate smart annotation link for one user object
|
# 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_still_in_team = user.teams.include?(team)
|
||||||
|
|
||||||
user_description = %(<div class='col-xs-4'>
|
user_description = %(<div class='col-xs-4'>
|
||||||
|
@ -166,7 +166,10 @@ module ApplicationHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
user_name = user.full_name
|
user_name = user.full_name
|
||||||
user_name << ' ' + I18n.t('atwho.res.removed') if !user_still_in_team
|
# binding.pry
|
||||||
|
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)}'" \
|
raw("<img src='#{user_avatar_absolute_url(user, :icon_small)}'" \
|
||||||
"alt='avatar' class='atwho-user-img-popover'" \
|
"alt='avatar' class='atwho-user-img-popover'" \
|
||||||
|
|
Loading…
Reference in a new issue