DEV: Add outlet wrapper for badges template (#28928)
* DEV: Add outlet wrapper for badges template * Apply suggestions from code review Co-authored-by: Sérgio Saquetim <1108771+megothss@users.noreply.github.com> --------- Co-authored-by: Sérgio Saquetim <1108771+megothss@users.noreply.github.com>
This commit is contained in:
parent
7ae116a389
commit
68a258ae7b
|
@ -1,32 +1,41 @@
|
|||
{{body-class "user-badges-page"}}
|
||||
|
||||
<section class="user-content" id="user-content">
|
||||
{{#if this.siteSettings.max_favorite_badges}}
|
||||
<p class="favorite-count">
|
||||
{{i18n
|
||||
"badges.favorite_count"
|
||||
count=this.favoriteBadges.length
|
||||
max=this.siteSettings.max_favorite_badges
|
||||
}}
|
||||
</p>
|
||||
{{/if}}
|
||||
<PluginOutlet
|
||||
@name="user-badges-content"
|
||||
@outletArgs={{hash
|
||||
sortedBadges=this.sortedBadges
|
||||
maxFavBadges=this.siteSettings.max_favorite_badges
|
||||
favoriteBadges=this.favoriteBadges
|
||||
}}
|
||||
>
|
||||
{{#if this.siteSettings.max_favorite_badges}}
|
||||
<p class="favorite-count">
|
||||
{{i18n
|
||||
"badges.favorite_count"
|
||||
count=this.favoriteBadges.length
|
||||
max=this.siteSettings.max_favorite_badges
|
||||
}}
|
||||
</p>
|
||||
{{/if}}
|
||||
|
||||
<div class="badge-group-list">
|
||||
{{#each this.sortedBadges as |ub|}}
|
||||
<BadgeCard
|
||||
@badge={{ub.badge}}
|
||||
@count={{ub.count}}
|
||||
@canFavorite={{ub.can_favorite}}
|
||||
@isFavorite={{ub.is_favorite}}
|
||||
@username={{this.username}}
|
||||
@canFavoriteMoreBadges={{this.canFavoriteMoreBadges}}
|
||||
@onFavoriteClick={{action "favorite" ub}}
|
||||
@filterUser="true"
|
||||
<div class="badge-group-list">
|
||||
{{#each this.sortedBadges as |ub|}}
|
||||
<BadgeCard
|
||||
@badge={{ub.badge}}
|
||||
@count={{ub.count}}
|
||||
@canFavorite={{ub.can_favorite}}
|
||||
@isFavorite={{ub.is_favorite}}
|
||||
@username={{this.username}}
|
||||
@canFavoriteMoreBadges={{this.canFavoriteMoreBadges}}
|
||||
@onFavoriteClick={{action "favorite" ub}}
|
||||
@filterUser="true"
|
||||
/>
|
||||
{{/each}}
|
||||
<PluginOutlet
|
||||
@name="after-user-profile-badges"
|
||||
@outletArgs={{hash user=this.user.model}}
|
||||
/>
|
||||
{{/each}}
|
||||
<PluginOutlet
|
||||
@name="after-user-profile-badges"
|
||||
@outletArgs={{hash user=this.user.model}}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</PluginOutlet>
|
||||
</section>
|
Loading…
Reference in New Issue