From 5e91233ca9bd91e667d3e93bb375f56019b98279 Mon Sep 17 00:00:00 2001 From: Renato Atilio Date: Fri, 16 Aug 2024 16:42:10 -0300 Subject: [PATCH] UX: omit fav badges count if max is 0 (#28402) --- .../discourse/app/templates/user/badges.hbs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/app/assets/javascripts/discourse/app/templates/user/badges.hbs b/app/assets/javascripts/discourse/app/templates/user/badges.hbs index 4419f262f56..1fceef5f5a6 100644 --- a/app/assets/javascripts/discourse/app/templates/user/badges.hbs +++ b/app/assets/javascripts/discourse/app/templates/user/badges.hbs @@ -1,13 +1,15 @@ {{body-class "user-badges-page"}}
-

- {{i18n - "badges.favorite_count" - count=this.favoriteBadges.length - max=this.siteSettings.max_favorite_badges - }} -

+ {{#if this.siteSettings.max_favorite_badges}} +

+ {{i18n + "badges.favorite_count" + count=this.favoriteBadges.length + max=this.siteSettings.max_favorite_badges + }} +

+ {{/if}}
{{#each this.sortedBadges as |ub|}}