diff --git a/app/assets/javascripts/discourse/templates/components/user-badge.hbs b/app/assets/javascripts/discourse/templates/components/user-badge.hbs index c1af47a6da..89c7dd8b70 100644 --- a/app/assets/javascripts/discourse/templates/components/user-badge.hbs +++ b/app/assets/javascripts/discourse/templates/components/user-badge.hbs @@ -1,7 +1,7 @@ - - {{#badge-button badge=badge}} - {{#if showGrantCount}} - (× {{count}}) + + {{#badge-button badge=@badge}} + {{#if this.showGrantCount}} + (× {{@count}}) {{/if}} {{/badge-button}} diff --git a/app/assets/javascripts/discourse/templates/components/user-card-contents.hbs b/app/assets/javascripts/discourse/templates/components/user-card-contents.hbs index e5ac4178c2..3be60e856c 100644 --- a/app/assets/javascripts/discourse/templates/components/user-card-contents.hbs +++ b/app/assets/javascripts/discourse/templates/components/user-card-contents.hbs @@ -1,6 +1,6 @@ -{{#if visible}} +{{#if this.visible}}
- {{#if loading}} + {{#if this.loading}}
@@ -22,71 +22,71 @@ {{else}}
- {{#if user.profile_hidden}} - {{bound-avatar user "huge"}} + {{#if this.user.profile_hidden}} + {{bound-avatar this.user "huge"}} {{else}} - {{bound-avatar user "huge"}} + {{bound-avatar this.user "huge"}} {{/if}} - {{#if user.primary_group_name}} + {{#if this.user.primary_group_name}} {{avatar-flair - flairURL=user.primary_group_flair_url - flairBgColor=user.primary_group_flair_bg_color - flairColor=user.primary_group_flair_color - groupName=user.primary_group_name}} + flairURL=this.user.primary_group_flair_url + flairBgColor=this.user.primary_group_flair_bg_color + flairColor=this.user.primary_group_flair_color + groupName=this.user.primary_group_name}} {{/if}} - {{plugin-outlet name="user-card-avatar-flair" args=(hash user=user) tagName="div"}} + {{plugin-outlet name="user-card-avatar-flair" args=(hash user=this.user) tagName="div"}}
-

- {{#if user.profile_hidden}} +

+ {{#if this.user.profile_hidden}} - {{if nameFirst user.name (format-username username)}} + {{if this.nameFirst this.user.name (format-username this.username)}} {{else}} - {{/if}}

- {{plugin-outlet name="user-card-after-username" args=(hash user=user showUser=(action "showUser" user)) tagName=""}} - {{#if nameFirst}} -

{{username}}

+ {{plugin-outlet name="user-card-after-username" args=(hash user=this.user showUser=(action "showUser" this.user)) tagName=""}} + {{#if this.nameFirst}} +

{{this.username}}

{{else}} - {{#if user.name}} -

{{user.name}}

+ {{#if this.user.name}} +

{{this.user.name}}

{{/if}} {{/if}} - {{#if user.title}} -

{{user.title}}

+ {{#if this.user.title}} +

{{this.user.title}}

{{/if}} - {{#if user.staged}} + {{#if this.user.staged}}

{{i18n "user.staged"}}

{{/if}} - {{plugin-outlet name="user-card-post-names" args=(hash user=user) tagName="div"}} + {{plugin-outlet name="user-card-post-names" args=(hash user=this.user) tagName="div"}}
    - {{#if user.can_send_private_message_to_user}} + {{#if this.user.can_send_private_message_to_user}}
  • {{d-button class="btn-primary" - action=(action "composePM" user post) + action=(action "composePM" this.user this.post) icon="envelope" label="user.private_message"}}
  • {{/if}} - {{#if showFilter}} + {{#if this.showFilter}}
  • {{d-button class="btn-default" - action=(action "togglePosts" user) + action=(action "togglePosts" this.user) icon="filter" - translatedLabel=togglePostsLabel}} + translatedLabel=this.togglePostsLabel}}
  • {{/if}} - {{#if hasUserFilters}} + {{#if this.hasUserFilters}}
  • {{d-button action=(action "cancelFilter") @@ -94,12 +94,12 @@ label="topic.filters.cancel"}}
  • {{/if}} - {{#if showDelete}} + {{#if this.showDelete}}
  • {{d-button class="btn-danger" action=(action "deleteUser") - actionParam=user + actionParam=this.user icon="exclamation-triangle" label="admin.user.delete"}}
  • @@ -107,11 +107,11 @@
{{plugin-outlet name="user-card-additional-controls" - args=(hash user=user close=(action "close")) + args=(hash user=this.user close=(action "close")) tagName=""}}
- {{#if user.profile_hidden}} + {{#if this.user.profile_hidden}}
{{i18n "user.profile_hidden"}} @@ -119,105 +119,105 @@
{{/if}} - {{#if isSuspendedOrHasBio}} + {{#if this.isSuspendedOrHasBio}}
- {{#if user.suspend_reason}} + {{#if this.user.suspend_reason}}
{{d-icon "ban"}} - {{i18n "user.suspended_notice" date=user.suspendedTillDate}} + {{i18n "user.suspended_notice" date=this.user.suspendedTillDate}}
{{i18n "user.suspended_reason"}} - {{user.suspend_reason}} + {{this.user.suspend_reason}}
{{else}} - {{#if user.bio_excerpt}} -
{{text-overflow class="overflow" text=user.bio_excerpt}}
+ {{#if this.user.bio_excerpt}} +
{{text-overflow class="overflow" text=this.user.bio_excerpt}}
{{/if}} {{/if}}
{{/if}} - {{#if showFeaturedTopic}} + {{#if this.showFeaturedTopic}}
{{/if}} - {{#if hasLocationOrWebsite}} + {{#if this.hasLocationOrWebsite}}
- {{#if user.location}} + {{#if this.user.location}} {{d-icon "map-marker-alt"}} - {{user.location}} + {{this.user.location}} {{/if}} - {{#if user.website_name}} + {{#if this.user.website_name}} {{d-icon "globe"}} - {{#if linkWebsite}} + {{#if this.linkWebsite}} {{!-- template-lint-disable --}} - {{user.website_name}} + {{this.user.website_name}} {{else}} - {{user.website_name}} + {{this.user.website_name}} {{/if}} {{/if}} - {{plugin-outlet name="user-card-location-and-website" args=(hash user=user)}} + {{plugin-outlet name="user-card-location-and-website" args=(hash user=this.user)}}
{{/if}}
- {{#unless user.profile_hidden}} + {{#unless this.user.profile_hidden}} {{/unless}} - {{plugin-outlet name="user-card-after-metadata" args=(hash user=user)}} + {{plugin-outlet name="user-card-after-metadata" args=(hash user=this.user)}}
- {{#if publicUserFields}} + {{#if this.publicUserFields}}
- {{#each publicUserFields as |uf|}} + {{#each this.publicUserFields as |uf|}} {{#if uf.value}}
{{uf.field.name}}: @@ -229,19 +229,19 @@
{{/if}} - {{plugin-outlet name="user-card-before-badges" args=(hash user=user)}} + {{plugin-outlet name="user-card-before-badges" args=(hash user=this.user)}} - {{#if showBadges}} + {{#if this.showBadges}}
- {{#if user.featured_user_badges}} + {{#if this.user.featured_user_badges}}
- {{#each user.featured_user_badges as |ub|}} - {{user-badge badge=ub.badge user=user}} + {{#each this.user.featured_user_badges as |ub|}} + {{user-badge badge=ub.badge user=this.user}} {{/each}} - {{#if showMoreBadges}} + {{#if this.showMoreBadges}} - {{#link-to 'user.badges' user}} - {{i18n 'badges.more_badges' count=moreBadgesCount}} + {{#link-to 'user.badges' this.user}} + {{i18n 'badges.more_badges' count=this.moreBadgesCount}} {{/link-to}} {{/if}} diff --git a/app/assets/javascripts/discourse/templates/components/user-fields/confirm.hbs b/app/assets/javascripts/discourse/templates/components/user-fields/confirm.hbs index 64ee54fa82..a60986f98b 100644 --- a/app/assets/javascripts/discourse/templates/components/user-fields/confirm.hbs +++ b/app/assets/javascripts/discourse/templates/components/user-fields/confirm.hbs @@ -1,14 +1,14 @@ -{{#if field.name}} -