mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-11 10:06:53 +08:00
2850135e96
This reverts commit 0a3ba6a366
.
35 lines
No EOL
1.2 KiB
Text
35 lines
No EOL
1.2 KiB
Text
<span class="atwho-user-container">
|
|
<% user_still_in_team = user.teams.include?(team) %>
|
|
<% popover_html = "" %>
|
|
<% if user_still_in_team %>
|
|
<% user_team_assignment = user.user_assignments.find_by(assignable: team) %>
|
|
<% popover_html = I18n.t('atwho.users.popover_html',
|
|
role: user_team_assignment.user_role.name.capitalize,
|
|
team: user_team_assignment.assignable.name,
|
|
time: I18n.l(user_team_assignment.created_at, format: :full_date)) %>
|
|
<% end %>
|
|
<a
|
|
role="button"
|
|
class="atwho-user-popover"
|
|
data-container="body"
|
|
data-html="true"
|
|
tabindex="0"
|
|
data-trigger="manual"
|
|
data-placement="top"
|
|
data-toggle="popover"
|
|
data-content=""
|
|
data-full-name="<%= escape_input(user.full_name) %>"
|
|
data-email="<%= escape_input(user.email) %>"
|
|
data-popover-html="<%= popover_html %>"
|
|
data-user-avatar-popover-absolute-url="<%= user_avatar_absolute_url(
|
|
user,
|
|
:thumb,
|
|
base64_encoded_imgs
|
|
) %>"
|
|
>
|
|
<%= escape_input(user.full_name) %>
|
|
</a>
|
|
<% unless skip_user_status || user_still_in_team %>
|
|
<%= I18n.t('atwho.res.removed') %>
|
|
<% end %>
|
|
</span> |