Fix smart annotation popover in tasks [SCI-8867] (#5805)

This commit is contained in:
Soufiane 2023-07-18 15:59:47 +02:00 committed by GitHub
parent 8b47982ccc
commit 12dd66b6a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 13 deletions

View file

@ -154,7 +154,7 @@ module ApplicationHelper
skip_avatar = false,
base64_encoded_imgs = false)
(defined?(controller) ? controller : ActionController::Base.new)
(defined?(controller) ? controller : ApplicationController.new)
.render_to_string(
partial: 'shared/atwho_user_container',
locals: {
@ -162,17 +162,7 @@ module ApplicationHelper
skip_avatar: skip_avatar,
skip_user_status: skip_user_status,
team: team,
base64_encoded_imgs: base64_encoded_imgs,
user_avatar_absolute_url: user_avatar_absolute_url(
user,
:icon_small,
base64_encoded_imgs
),
user_avatar_popover_absolute_url: user_avatar_absolute_url(
user,
:thumb,
base64_encoded_imgs && user.avatar.attached?
)
base64_encoded_imgs: base64_encoded_imgs
},
formats: :html
)

View file

@ -21,7 +21,11 @@
data-full-name="<%= user.full_name %>"
data-email="<%= user.email %>"
data-popover-html="<%= popover_html %>"
data-user-avatar-popover-absolute-url="<%= user_avatar_popover_absolute_url %>"
data-user-avatar-popover-absolute-url="<%= user_avatar_absolute_url(
user,
:thumb,
base64_encoded_imgs
) %>"
>
<%= user.full_name %>
</a>