Skip to content
Snippets Groups Projects
Commit 69fe80c4 authored by Simon Urli's avatar Simon Urli
Browse files

XWIKI-21752: Email notifications events description do not display the user avatar anymore

  * Use the proper macro for displaying user in email notifications
parent dee5bc74
No related branches found
Tags 0.56.0-rc.4
No related merge requests found
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
#end #end
#macro(displayNotificationDescription $event) #macro(displayNotificationDescription $event)
#displayCompositeEventDescription($event) #displayCompositeEventDescription($event true)
#end #end
......
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
#end #end
</div> </div>
<div class="notification-description"> <div class="notification-description">
#displayCompositeEventDescription($compositeEvent) #displayCompositeEventDescription($compositeEvent false)
<div><small class="text-muted">$escapetool.xml($services.date.displayTimeAgo($compositeEvent.dates.get(0)))</small></div> <div><small class="text-muted">$escapetool.xml($services.date.displayTimeAgo($compositeEvent.dates.get(0)))</small></div>
</div> </div>
#end #end
...@@ -241,7 +241,7 @@ $xwiki.getPlainUserName($user)## ...@@ -241,7 +241,7 @@ $xwiki.getPlainUserName($user)##
#displayNotificationEventSkeleton($icon, 'comment', $content, '') #displayNotificationEventSkeleton($icon, 'comment', $content, '')
#end #end
#macro(displayCompositeEventDescription $compositeEvent) #macro(displayCompositeEventDescription $compositeEvent $forEmail)
#set ($baseTranslationPrefix = "${compositeEvent.type}") #set ($baseTranslationPrefix = "${compositeEvent.type}")
#set ($fallbackTranslationPrefix = "notifications.events.${compositeEvent.type}") #set ($fallbackTranslationPrefix = "notifications.events.${compositeEvent.type}")
#set ($fallbackTranslationSuffix = "description") #set ($fallbackTranslationSuffix = "description")
...@@ -254,7 +254,11 @@ $xwiki.getPlainUserName($user)## ...@@ -254,7 +254,11 @@ $xwiki.getPlainUserName($user)##
"${baseTranslationPrefix}.${fallbackTranslationSuffix}", "${baseTranslationPrefix}.${fallbackTranslationSuffix}",
"${fallbackTranslationPrefix}.${fallbackTranslationSuffix}" "${fallbackTranslationPrefix}.${fallbackTranslationSuffix}"
]) ])
#set ($translationParameters = ["#displayNotificationEventUsers($compositeEvent.users, true, false)"]) #if ($forEmail)
#set ($translationParameters = ["#displayEmailNotificationEventUsers($compositeEvent.users, true, false)"])
#else
#set ($translationParameters = ["#displayNotificationEventUsers($compositeEvent.users, true, false)"])
#end
$services.localization.render($translationKeys,$translationParameters) $services.localization.render($translationKeys,$translationParameters)
#else #else
<div> <div>
...@@ -269,7 +273,11 @@ $xwiki.getPlainUserName($user)## ...@@ -269,7 +273,11 @@ $xwiki.getPlainUserName($user)##
$services.localization.render($translationKeys,$translationParameters) $services.localization.render($translationKeys,$translationParameters)
</div> </div>
<div> <div>
#displayNotificationEventUsers($compositeEvent.users, true, true) #if ($forEmail)
#displayEmailNotificationEventUsers($compositeEvent.users, true, true)
#else
#displayNotificationEventUsers($compositeEvent.users, true, true)
#end
</div> </div>
#end #end
#end #end
\ No newline at end of file
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