From 0ecad3a7c960108f0ac4e3701377f856b8c8d1a9 Mon Sep 17 00:00:00 2001 From: Amanda Alves Branquinho Date: Thu, 24 Oct 2024 11:10:10 -0300 Subject: [PATCH] DEV: Add outlet wrapper for user badges form (#29333) * DEV: Add outlet wrapper for user badges form * Add outlet for badge granter table * add extra args to outlet --- .../admin/addon/templates/user-badges.hbs | 164 ++++++++++-------- 1 file changed, 90 insertions(+), 74 deletions(-) diff --git a/app/assets/javascripts/admin/addon/templates/user-badges.hbs b/app/assets/javascripts/admin/addon/templates/user-badges.hbs index 1253b62b862..64d419ca2a8 100644 --- a/app/assets/javascripts/admin/addon/templates/user-badges.hbs +++ b/app/assets/javascripts/admin/addon/templates/user-badges.hbs @@ -16,84 +16,100 @@ {{#if this.noAvailableBadges}}

{{i18n "admin.badges.no_badges"}}

{{else}} -
-
- - + +
+ + +
+
+ +
{{i18n "admin.badges.reason_help"}} +
+ -
-
- -
{{i18n - "admin.badges.reason_help" - }} -
- - + + {{/if}} - - - - - - - - - - {{#each this.groupedBadges as |userBadge|}} + +
{{i18n "admin.badges.badge"}}{{i18n "admin.badges.granted_by"}}{{i18n "admin.badges.reason"}}{{i18n "admin.badges.granted_at"}}
+ - - - - - + + + + + - {{else}} - - - - {{/each}} - -
- - {{avatar userBadge.granted_by imageSize="tiny"}} - {{userBadge.granted_by.username}} - - - {{#if userBadge.postUrl}} - {{userBadge.topic_title}} - {{/if}} - {{age-with-tooltip userBadge.granted_at}} - {{#if userBadge.grouped}} - - {{else}} - - {{/if}} - {{i18n "admin.badges.badge"}}{{i18n "admin.badges.granted_by"}}{{i18n "admin.badges.reason"}}{{i18n "admin.badges.granted_at"}}
-

{{i18n - "admin.badges.no_user_badges" - name=this.user.username - }}

-
+ {{#each this.groupedBadges as |userBadge|}} + + + + + {{avatar userBadge.granted_by imageSize="tiny"}} + {{userBadge.granted_by.username}} + + + + {{#if userBadge.postUrl}} + {{userBadge.topic_title}} + {{/if}} + + {{age-with-tooltip userBadge.granted_at}} + + {{#if userBadge.grouped}} + + {{else}} + + {{/if}} + + + {{else}} + + +

{{i18n + "admin.badges.no_user_badges" + name=this.user.username + }}

+ + + {{/each}} + + + \ No newline at end of file