Skip to content
Snippets Groups Projects
Commit 6de4c6a8 authored by sv's avatar sv Committed by Taras Kruts
Browse files

Issue #3373122 by SV: Disable lazyload for message_user_profile_preview template

parent 9b5b280f
No related branches found
No related tags found
No related merge requests found
......@@ -220,6 +220,7 @@ function social_activity_theme($existing, $type, $theme, $path) {
'profile_name' => '',
'profile_home' => '',
'profile_image' => '',
'profile_class' => '',
'profile_function' => '',
'profile_organization' => '',
],
......
......@@ -6,6 +6,7 @@ use Drupal\comment\Entity\Comment;
use Drupal\Core\Config\ConfigFactory;
use Drupal\Core\Datetime\DateFormatter;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Extension\ModuleHandlerInterface;
use Drupal\Core\StringTranslation\StringTranslationTrait;
use Drupal\Core\StreamWrapper\StreamWrapperManagerInterface;
use Drupal\Core\StringTranslation\TranslatableMarkup;
......@@ -255,6 +256,7 @@ class EmailTokenServices {
'#profile_name' => $user->getDisplayName(),
'#profile_home' => Url::fromRoute('entity.user.canonical', ['user' => $user->id()]),
'#profile_image' => $image_url ?? NULL,
'#profile_class' => $this->moduleHandler->moduleExists('lazy') ? 'no-lazy' : '',
'#profile_function' => $profile->getFieldValue('field_profile_function', 'value'),
'#profile_organization' => $profile->getFieldValue('field_profile_organization', 'value'),
'#profile_class' => $this->moduleHandler->moduleExists('lazy') ? $this->config->get('lazy.settings')->get('skipClass') : '',
......
<div class="card__block card__block--list teaser--small">
<span class="list-item__avatar list-item__avatar--medium">
<img src="{{ profile_image }}" alt={{ "profile image"|t }}/>
<img src="{{ profile_image }}" alt={{ "profile image"|t }} class="{{ profile_class }}" />
</span>
<span class="list-item__text">
<span class="teaser--small__title">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment