DEV: Fix no-implicit-this for all user-* components

This commit is contained in:
Kane York 2020-04-15 14:37:37 -07:00 committed by Kane York
parent 074509fd95
commit 424a76145d
17 changed files with 174 additions and 174 deletions

View File

@ -1,7 +1,7 @@
<a href={{badgeUrl}}> <a href={{this.badgeUrl}}>
{{#badge-button badge=badge}} {{#badge-button badge=@badge}}
{{#if showGrantCount}} {{#if this.showGrantCount}}
<span class="count">(&times;&nbsp;{{count}})</span> <span class="count">(&times;&nbsp;{{@count}})</span>
{{/if}} {{/if}}
{{/badge-button}} {{/badge-button}}
</a> </a>

View File

@ -1,6 +1,6 @@
{{#if visible}} {{#if this.visible}}
<div class="card-content"> <div class="card-content">
{{#if loading}} {{#if this.loading}}
<div class="card-row first-row"> <div class="card-row first-row">
<div class="user-card-avatar"> <div class="user-card-avatar">
<div class="card-avatar-placeholder animated-placeholder placeholder-animation"></div> <div class="card-avatar-placeholder animated-placeholder placeholder-animation"></div>
@ -22,71 +22,71 @@
{{else}} {{else}}
<div class="card-row first-row"> <div class="card-row first-row">
<div class="user-card-avatar"> <div class="user-card-avatar">
{{#if user.profile_hidden}} {{#if this.user.profile_hidden}}
<span class="card-huge-avatar">{{bound-avatar user "huge"}}</span> <span class="card-huge-avatar">{{bound-avatar this.user "huge"}}</span>
{{else}} {{else}}
<a href={{user.path}} {{action "showUser" user}} class="card-huge-avatar">{{bound-avatar user "huge"}}</a> <a href={{this.user.path}} {{action "showUser" this.user}} class="card-huge-avatar">{{bound-avatar this.user "huge"}}</a>
{{/if}} {{/if}}
{{#if user.primary_group_name}} {{#if this.user.primary_group_name}}
{{avatar-flair {{avatar-flair
flairURL=user.primary_group_flair_url flairURL=this.user.primary_group_flair_url
flairBgColor=user.primary_group_flair_bg_color flairBgColor=this.user.primary_group_flair_bg_color
flairColor=user.primary_group_flair_color flairColor=this.user.primary_group_flair_color
groupName=user.primary_group_name}} groupName=this.user.primary_group_name}}
{{/if}} {{/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"}}
</div> </div>
<div class="names"> <div class="names">
<h1 class="{{staff}} {{newUser}} {{if nameFirst "full-name" "username"}}"> <h1 class="{{this.staff}} {{this.newUser}} {{if this.nameFirst "full-name" "username"}}">
{{#if user.profile_hidden}} {{#if this.user.profile_hidden}}
<span class="name-username-wrapper"> <span class="name-username-wrapper">
{{if nameFirst user.name (format-username username)}} {{if this.nameFirst this.user.name (format-username this.username)}}
</span> </span>
{{else}} {{else}}
<a href={{user.path}} {{action "showUser" user}} class="user-profile-link"> <a href={{this.user.path}} {{action "showUser" this.user}} class="user-profile-link">
<span class="name-username-wrapper"> <span class="name-username-wrapper">
{{if nameFirst user.name (format-username username)}} {{if this.nameFirst this.user.name (format-username this.username)}}
</span> </span>
{{user-status user currentUser=currentUser}} {{user-status this.user currentUser=this.currentUser}}
</a> </a>
{{/if}} {{/if}}
</h1> </h1>
{{plugin-outlet name="user-card-after-username" args=(hash user=user showUser=(action "showUser" user)) tagName=""}} {{plugin-outlet name="user-card-after-username" args=(hash user=this.user showUser=(action "showUser" this.user)) tagName=""}}
{{#if nameFirst}} {{#if this.nameFirst}}
<h2 class="username">{{username}}</h2> <h2 class="username">{{this.username}}</h2>
{{else}} {{else}}
{{#if user.name}} {{#if this.user.name}}
<h2 class="full-name">{{user.name}}</h2> <h2 class="full-name">{{this.user.name}}</h2>
{{/if}} {{/if}}
{{/if}} {{/if}}
{{#if user.title}} {{#if this.user.title}}
<h2>{{user.title}}</h2> <h2>{{this.user.title}}</h2>
{{/if}} {{/if}}
{{#if user.staged}} {{#if this.user.staged}}
<h2 class="staged">{{i18n "user.staged"}}</h2> <h2 class="staged">{{i18n "user.staged"}}</h2>
{{/if}} {{/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"}}
</div> </div>
<ul class="usercard-controls"> <ul class="usercard-controls">
{{#if user.can_send_private_message_to_user}} {{#if this.user.can_send_private_message_to_user}}
<li class="compose-pm"> <li class="compose-pm">
{{d-button {{d-button
class="btn-primary" class="btn-primary"
action=(action "composePM" user post) action=(action "composePM" this.user this.post)
icon="envelope" icon="envelope"
label="user.private_message"}} label="user.private_message"}}
</li> </li>
{{/if}} {{/if}}
{{#if showFilter}} {{#if this.showFilter}}
<li> <li>
{{d-button {{d-button
class="btn-default" class="btn-default"
action=(action "togglePosts" user) action=(action "togglePosts" this.user)
icon="filter" icon="filter"
translatedLabel=togglePostsLabel}} translatedLabel=this.togglePostsLabel}}
</li> </li>
{{/if}} {{/if}}
{{#if hasUserFilters}} {{#if this.hasUserFilters}}
<li> <li>
{{d-button {{d-button
action=(action "cancelFilter") action=(action "cancelFilter")
@ -94,12 +94,12 @@
label="topic.filters.cancel"}} label="topic.filters.cancel"}}
</li> </li>
{{/if}} {{/if}}
{{#if showDelete}} {{#if this.showDelete}}
<li> <li>
{{d-button {{d-button
class="btn-danger" class="btn-danger"
action=(action "deleteUser") action=(action "deleteUser")
actionParam=user actionParam=this.user
icon="exclamation-triangle" icon="exclamation-triangle"
label="admin.user.delete"}} label="admin.user.delete"}}
</li> </li>
@ -107,11 +107,11 @@
</ul> </ul>
{{plugin-outlet {{plugin-outlet
name="user-card-additional-controls" name="user-card-additional-controls"
args=(hash user=user close=(action "close")) args=(hash user=this.user close=(action "close"))
tagName=""}} tagName=""}}
</div> </div>
{{#if user.profile_hidden}} {{#if this.user.profile_hidden}}
<div class="card-row second-row"> <div class="card-row second-row">
<div class="profile-hidden"> <div class="profile-hidden">
<span>{{i18n "user.profile_hidden"}}</span> <span>{{i18n "user.profile_hidden"}}</span>
@ -119,105 +119,105 @@
</div> </div>
{{/if}} {{/if}}
{{#if isSuspendedOrHasBio}} {{#if this.isSuspendedOrHasBio}}
<div class="card-row second-row"> <div class="card-row second-row">
{{#if user.suspend_reason}} {{#if this.user.suspend_reason}}
<div class="suspended"> <div class="suspended">
<div class="suspension-date"> <div class="suspension-date">
{{d-icon "ban"}} {{d-icon "ban"}}
{{i18n "user.suspended_notice" date=user.suspendedTillDate}} {{i18n "user.suspended_notice" date=this.user.suspendedTillDate}}
</div> </div>
<div class="suspension-reason"> <div class="suspension-reason">
<span class="suspension-reason-title">{{i18n "user.suspended_reason"}}</span> <span class="suspension-reason-title">{{i18n "user.suspended_reason"}}</span>
<span class="suspension-reason-description">{{user.suspend_reason}}</span> <span class="suspension-reason-description">{{this.user.suspend_reason}}</span>
</div> </div>
</div> </div>
{{else}} {{else}}
{{#if user.bio_excerpt}} {{#if this.user.bio_excerpt}}
<div class="bio">{{text-overflow class="overflow" text=user.bio_excerpt}}</div> <div class="bio">{{text-overflow class="overflow" text=this.user.bio_excerpt}}</div>
{{/if}} {{/if}}
{{/if}} {{/if}}
</div> </div>
{{/if}} {{/if}}
{{#if showFeaturedTopic}} {{#if this.showFeaturedTopic}}
<div class="card-row"> <div class="card-row">
<div class="featured-topic"> <div class="featured-topic">
<span class="desc">{{i18n "user.featured_topic"}}</span> <span class="desc">{{i18n "user.featured_topic"}}</span>
{{#link-to "topic" user.featured_topic.slug user.featured_topic.id }}{{html-safe (replace-emoji user.featured_topic.fancy_title)}}{{/link-to}} {{#link-to "topic" this.user.featured_topic.slug this.user.featured_topic.id }}{{html-safe (replace-emoji this.user.featured_topic.fancy_title)}}{{/link-to}}
</div> </div>
</div> </div>
{{/if}} {{/if}}
{{#if hasLocationOrWebsite}} {{#if this.hasLocationOrWebsite}}
<div class="card-row"> <div class="card-row">
<div class="location-and-website"> <div class="location-and-website">
{{#if user.location}} {{#if this.user.location}}
<span class="location"> <span class="location">
{{d-icon "map-marker-alt"}} {{d-icon "map-marker-alt"}}
<span>{{user.location}}</span> <span>{{this.user.location}}</span>
</span> </span>
{{/if}} {{/if}}
{{#if user.website_name}} {{#if this.user.website_name}}
<span class="website-name"> <span class="website-name">
{{d-icon "globe"}} {{d-icon "globe"}}
{{#if linkWebsite}} {{#if this.linkWebsite}}
{{!-- template-lint-disable --}} {{!-- template-lint-disable --}}
<a href="{{user.website}}" rel="noopener {{unless removeNoFollow 'nofollow ugc'}}" <a href="{{this.user.website}}" rel="noopener {{unless this.removeNoFollow 'nofollow ugc'}}"
target="_blank">{{user.website_name}}</a> target="_blank">{{this.user.website_name}}</a>
{{else}} {{else}}
<span title={{user.website}}>{{user.website_name}}</span> <span title={{this.user.website}}>{{this.user.website_name}}</span>
{{/if}} {{/if}}
</span> </span>
{{/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)}}
</div> </div>
</div> </div>
{{/if}} {{/if}}
<div class="card-row"> <div class="card-row">
{{#unless user.profile_hidden}} {{#unless this.user.profile_hidden}}
<div class="metadata"> <div class="metadata">
{{#if user.last_posted_at}} {{#if this.user.last_posted_at}}
<h3><span class='desc'>{{i18n 'last_post'}}</span> <h3><span class='desc'>{{i18n 'last_post'}}</span>
{{format-date user.last_posted_at leaveAgo="true"}}</h3> {{format-date this.user.last_posted_at leaveAgo="true"}}</h3>
{{/if}} {{/if}}
<h3><span class='desc'>{{i18n 'joined'}}</span> <h3><span class='desc'>{{i18n 'joined'}}</span>
{{format-date user.created_at leaveAgo="true"}}</h3> {{format-date this.user.created_at leaveAgo="true"}}</h3>
{{#if user.time_read}} {{#if this.user.time_read}}
<h3 title="{{timeReadTooltip}}"> <h3 title="{{this.timeReadTooltip}}">
<span class='desc'>{{i18n 'time_read'}}</span> <span class='desc'>{{i18n 'time_read'}}</span>
{{format-duration user.time_read}} {{format-duration this.user.time_read}}
{{#if showRecentTimeRead}} {{#if this.showRecentTimeRead}}
<span>({{i18n 'time_read_recently' time_read=recentTimeRead}})</span> <span>({{i18n 'time_read_recently' time_read=this.recentTimeRead}})</span>
{{/if}} {{/if}}
</h3> </h3>
{{/if}} {{/if}}
{{#if showCheckEmail}} {{#if this.showCheckEmail}}
<h3 class="email"> <h3 class="email">
{{d-icon "far-envelope" title="user.email.title"}} {{d-icon "far-envelope" title="user.email.title"}}
{{#if user.email}} {{#if this.user.email}}
{{user.email}} {{this.user.email}}
{{else}} {{else}}
{{d-button {{d-button
action=(action "checkEmail") action=(action "checkEmail")
actionParam=user actionParam=this.user
icon="far-envelope" icon="far-envelope"
label="admin.users.check_email.text" label="admin.users.check_email.text"
class="btn-primary"}} class="btn-primary"}}
{{/if}} {{/if}}
</h3> </h3>
{{/if}} {{/if}}
{{plugin-outlet name="user-card-metadata" args=(hash user=user)}} {{plugin-outlet name="user-card-metadata" args=(hash user=this.user)}}
</div> </div>
{{/unless}} {{/unless}}
{{plugin-outlet name="user-card-after-metadata" args=(hash user=user)}} {{plugin-outlet name="user-card-after-metadata" args=(hash user=this.user)}}
</div> </div>
{{#if publicUserFields}} {{#if this.publicUserFields}}
<div class="card-row"> <div class="card-row">
<div class="public-user-fields"> <div class="public-user-fields">
{{#each publicUserFields as |uf|}} {{#each this.publicUserFields as |uf|}}
{{#if uf.value}} {{#if uf.value}}
<div class="public-user-field {{uf.field.dasherized_name}}"> <div class="public-user-field {{uf.field.dasherized_name}}">
<span class="user-field-name">{{uf.field.name}}:</span> <span class="user-field-name">{{uf.field.name}}:</span>
@ -229,19 +229,19 @@
</div> </div>
{{/if}} {{/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}}
<div class="card-row"> <div class="card-row">
{{#if user.featured_user_badges}} {{#if this.user.featured_user_badges}}
<div class="badge-section"> <div class="badge-section">
{{#each user.featured_user_badges as |ub|}} {{#each this.user.featured_user_badges as |ub|}}
{{user-badge badge=ub.badge user=user}} {{user-badge badge=ub.badge user=this.user}}
{{/each}} {{/each}}
{{#if showMoreBadges}} {{#if this.showMoreBadges}}
<span class='more-user-badges'> <span class='more-user-badges'>
{{#link-to 'user.badges' user}} {{#link-to 'user.badges' this.user}}
{{i18n 'badges.more_badges' count=moreBadgesCount}} {{i18n 'badges.more_badges' count=this.moreBadgesCount}}
{{/link-to}} {{/link-to}}
</span> </span>
{{/if}} {{/if}}

View File

@ -1,14 +1,14 @@
{{#if field.name}} {{#if this.field.name}}
<label class="control-label" for={{concat "user-" elementId}}> <label class="control-label" for={{concat "user-" this.elementId}}>
{{html-safe field.name}} {{#if field.required}}<span class="required">*</span>{{/if}} {{html-safe this.field.name}} {{#if this.field.required}}<span class="required">*</span>{{/if}}
</label> </label>
{{/if}} {{/if}}
<div class="controls"> <div class="controls">
<label class="control-label checkbox-label"> <label class="control-label checkbox-label">
{{input id=(concat "user-" elementId) checked=value type="checkbox"}} {{input id=(concat "user-" this.elementId) checked=this.value type="checkbox"}}
<span> <span>
{{html-safe field.description}} {{#unless field.name}}{{#if field.required}}<span class="required">*</span>{{/if}}{{/unless}} {{html-safe this.field.description}} {{#unless this.field.name}}{{#if this.field.required}}<span class="required">*</span>{{/if}}{{/unless}}
</span> </span>
</label> </label>
</div> </div>

View File

@ -1,19 +1,19 @@
<label class="control-label" for={{concat "user-" elementId}}> <label class="control-label" for={{concat "user-" this.elementId}}>
{{html-safe field.name}} {{html-safe this.field.name}}
{{#if field.required}} {{#if this.field.required}}
<span class="required">*</span> <span class="required">*</span>
{{/if}} {{/if}}
</label> </label>
<div class="controls"> <div class="controls">
{{combo-box {{combo-box
id=(concat "user-" elementId) id=(concat "user-" this.elementId)
content=field.options content=this.field.options
valueProperty=null valueProperty=null
nameProperty=null nameProperty=null
value=value value=this.value
none=noneLabel none=this.noneLabel
onChange=(action (mut value)) onChange=(action (mut this.value))
}} }}
<div class="instructions">{{html-safe field.description}}</div> <div class="instructions">{{html-safe this.field.description}}</div>
</div> </div>

View File

@ -1,8 +1,8 @@
<label class="control-label" for={{concat "user-" elementId}}> <label class="control-label" for={{concat "user-" this.elementId}}>
{{html-safe field.name}} {{html-safe this.field.name}}
{{#if field.required}}<span class="required">*</span>{{/if}} {{#if this.field.required}}<span class="required">*</span>{{/if}}
</label> </label>
<div class="controls"> <div class="controls">
{{input id=(concat "user-" elementId) value=value maxlength=site.user_field_max_length}} {{input id=(concat "user-" this.elementId) value=this.value maxlength=this.site.user_field_max_length}}
<div class="instructions">{{html-safe field.description}}</div> <div class="instructions">{{html-safe this.field.description}}</div>
</div> </div>

View File

@ -1,6 +1,6 @@
{{#if showPercentage}} {{#if this.showPercentage}}
<div title={{percentage.title}} class="user-flag-percentage"> <div title={{this.percentage.title}} class="user-flag-percentage">
<span class="percentage-label {{percentage.className}}">{{percentage.label}}</span> <span class="percentage-label {{this.percentage.className}}">{{this.percentage.label}}</span>
{{d-icon percentage.icon}} {{d-icon this.percentage.icon}}
</div> </div>
{{/if}} {{/if}}

View File

@ -1,22 +1,22 @@
<div class="user-image"> <div class="user-image">
<div class="user-image-inner"> <div class="user-image-inner">
<a href={{userPath}} data-user-card={{user.username}}>{{avatar user imageSize="large"}}</a> <a href={{this.userPath}} data-user-card={{@user.username}}>{{avatar @user imageSize="large"}}</a>
{{#if user.primary_group_name}} {{#if @user.primary_group_name}}
{{avatar-flair {{avatar-flair
flairURL=user.primary_group_flair_url flairURL=@user.primary_group_flair_url
flairBgColor=user.primary_group_flair_bg_color flairBgColor=@user.primary_group_flair_bg_color
flairColor=user.primary_group_flair_color flairColor=@user.primary_group_flair_color
groupName=user.primary_group_name}} groupName=@user.primary_group_name}}
{{/if}} {{/if}}
</div> </div>
</div> </div>
<div class="user-detail"> <div class="user-detail">
<div class="name-line"> <div class="name-line">
<span class="username"><a href={{userPath}} data-user-card={{user.username}}>{{format-username user.username}}</a></span> <span class="username"><a href={{this.userPath}} data-user-card={{@user.username}}>{{format-username @user.username}}</a></span>
<span class="name">{{name}}</span> <span class="name">{{this.name}}</span>
</div> </div>
<div class="title">{{user.title}}</div> <div class="title">{{@user.title}}</div>
{{#if hasBlock}} {{#if hasBlock}}
<div class="details"> <div class="details">

View File

@ -1,11 +1,11 @@
<div class="user-profile-avatar"> <div class="user-profile-avatar">
{{bound-avatar user "huge"}} {{bound-avatar @user "huge"}}
{{#if user.primary_group_name}} {{#if @user.primary_group_name}}
{{avatar-flair {{avatar-flair
flairURL=user.primary_group_flair_url flairURL=@user.primary_group_flair_url
flairBgColor=user.primary_group_flair_bg_color flairBgColor=@user.primary_group_flair_bg_color
flairColor=user.primary_group_flair_color flairColor=@user.primary_group_flair_color
groupName=user.primary_group_name}} groupName=@user.primary_group_name}}
{{/if}} {{/if}}
{{plugin-outlet name="user-profile-avatar-flair" args=(hash model=user) tagName="div"}} {{plugin-outlet name="user-profile-avatar-flair" args=(hash model=@user) tagName="div"}}
</div> </div>

View File

@ -1,13 +1,13 @@
<span class="value"> <span class="value">
{{#if isNumber}} {{#if this.isNumber}}
{{number value}} {{number @value}}
{{else if isDuration}} {{else if this.isDuration}}
{{format-duration value}} {{format-duration @value}}
{{else}} {{else}}
{{value}} {{@value}}
{{/if}} {{/if}}
</span> </span>
<span class="label"> <span class="label">
{{#if icon}}{{d-icon icon}}{{/if}} {{#if @icon}}{{d-icon @icon}}{{/if}}
{{html-safe (i18n label count=value)}} {{html-safe (i18n @label count=@value)}}
</span> </span>

View File

@ -1,51 +1,51 @@
<div class="clearfix info"> <div class="clearfix info">
<a href={{item.userUrl}} data-user-card={{item.username}} class="avatar-link"><div class="avatar-wrapper">{{avatar item imageSize="large" extraClasses="actor" ignoreTitle="true"}}</div></a> <a href={{@item.userUrl}} data-user-card={{@item.username}} class="avatar-link"><div class="avatar-wrapper">{{avatar @item imageSize="large" extraClasses="actor" ignoreTitle="true"}}</div></a>
<span class="time">{{format-date item.created_at}}</span> <span class="time">{{format-date @item.created_at}}</span>
{{#if item.draftType}} {{#if @item.draftType}}
<span class="draft-type">{{html-safe item.draftType}}</span> <span class="draft-type">{{html-safe @item.draftType}}</span>
{{else}} {{else}}
{{expand-post item=item}} {{expand-post item=@item}}
{{/if}} {{/if}}
<div class="stream-topic-details"> <div class="stream-topic-details">
<div class="stream-topic-title"> <div class="stream-topic-title">
{{topic-status topic=item disableActions=true}} {{topic-status topic=@item disableActions=true}}
<span class="title"> <span class="title">
{{#if item.postUrl}} {{#if @item.postUrl}}
<a href={{item.postUrl}}>{{html-safe item.title}}</a> <a href={{@item.postUrl}}>{{html-safe @item.title}}</a>
{{else}} {{else}}
{{html-safe item.title}} {{html-safe @item.title}}
{{/if}} {{/if}}
</span> </span>
</div> </div>
<div class="category">{{category-link item.category}}</div> <div class="category">{{category-link @item.category}}</div>
</div> </div>
{{#if item.deleted_by}} {{#if @item.deleted_by}}
<span class="delete-info"> <span class="delete-info">
{{d-icon "far-trash-alt"}} {{d-icon "far-trash-alt"}}
{{avatar item.deleted_by imageSize="tiny" extraClasses="actor" ignoreTitle="true"}} {{avatar @item.deleted_by imageSize="tiny" extraClasses="actor" ignoreTitle="true"}}
{{format-date item.deleted_at leaveAgo="true"}} {{format-date @item.deleted_at leaveAgo="true"}}
</span> </span>
{{/if}} {{/if}}
{{plugin-outlet name="user-stream-item-header" args=(hash item=item)}} {{plugin-outlet name="user-stream-item-header" args=(hash item=@item)}}
</div> </div>
{{#if actionDescription}} {{#if this.actionDescription}}
<p class="excerpt">{{actionDescription}}</p> <p class="excerpt">{{this.actionDescription}}</p>
{{/if}} {{/if}}
<p data-topic-id={{item.topic_id}} data-post-id={{item.post_id}} data-user-id={{item.user_id}} class="excerpt"> <p data-topic-id={{@item.topic_id}} data-post-id={{@item.post_id}} data-user-id={{@item.user_id}} class="excerpt">
{{!-- template-lint-disable no-triple-curlies --}} {{!-- template-lint-disable no-triple-curlies --}}
{{~#if item.expandedExcerpt}} {{~#if @item.expandedExcerpt}}
{{~{item.expandedExcerpt}~}} {{~{@item.expandedExcerpt}~}}
{{else}} {{else}}
{{~{item.excerpt}~}} {{~{@item.excerpt}~}}
{{/if~}} {{/if~}}
{{!-- template-lint-enable --}} {{!-- template-lint-enable --}}
</p> </p>
{{#each item.children as |child|}} {{#each @item.children as |child|}}
{{!-- DEPRECATED: 'child-actions' class --}} {{!-- DEPRECATED: 'child-actions' class --}}
<div class="user-stream-item-actions child-actions"> <div class="user-stream-item-actions child-actions">
{{d-icon child.icon class="icon"}} {{d-icon child.icon class="icon"}}
@ -53,7 +53,7 @@
{{#if grandChild.removableBookmark}} {{#if grandChild.removableBookmark}}
{{d-button {{d-button
class="btn-default remove-bookmark" class="btn-default remove-bookmark"
action=(action removeBookmark grandChild) action=(action @removeBookmark grandChild)
icon="times" icon="times"
label="bookmarks.remove" label="bookmarks.remove"
}} }}
@ -65,9 +65,9 @@
</div> </div>
{{/each}} {{/each}}
{{#if item.editableDraft}} {{#if @item.editableDraft}}
<div class="user-stream-item-draft-actions"> <div class="user-stream-item-draft-actions">
{{d-button action=resumeDraft actionParam=item icon="pencil-alt" label="drafts.resume" class="btn-default resume-draft"}} {{d-button action=@resumeDraft actionParam=@item icon="pencil-alt" label="drafts.resume" class="btn-default resume-draft"}}
{{d-button action=removeDraft actionParam=item icon="far-trash-alt" label="drafts.remove" class="btn-default remove-draft"}} {{d-button action=@removeDraft actionParam=@item icon="far-trash-alt" label="drafts.remove" class="btn-default remove-draft"}}
</div> </div>
{{/if}} {{/if}}

View File

@ -1,4 +1,4 @@
{{#each stream.content as |item|}} {{#each @stream.content as |item|}}
{{user-stream-item {{user-stream-item
item=item item=item
removeBookmark=(action "removeBookmark") removeBookmark=(action "removeBookmark")

View File

@ -1,6 +1,6 @@
{{#if count}} {{#if @count}}
{{#link-to "full-page-search" (query-params q=searchParams)}} {{#link-to "full-page-search" (query-params q=this.searchParams)}}
{{count}} {{@count}}
{{/link-to}} {{/link-to}}
{{else}} {{else}}
&ndash; &ndash;

View File

@ -1,2 +1,2 @@
<h3 class="stats-title">{{i18n (concat "user.summary." title)}}</h3> <h3 class="stats-title">{{i18n (concat "user.summary." @title)}}</h3>
{{yield}} {{yield}}

View File

@ -1,9 +1,9 @@
<span class="topic-info"> <span class="topic-info">
{{format-date createdAt format="tiny" noTitle="true"}} {{format-date @createdAt format="tiny" noTitle="true"}}
{{#if likes}} {{#if @likes}}
&middot; &middot;
{{d-icon "heart"}}&nbsp;<span class="like-count">{{number likes}}</span> {{d-icon "heart"}}&nbsp;<span class="like-count">{{number @likes}}</span>
{{/if}} {{/if}}
</span> </span>
<br> <br>
<a href={{url}}>{{html-safe topic.fancyTitle}}</a> <a href={{@url}}>{{html-safe @topic.fancyTitle}}</a>

View File

@ -1,16 +1,16 @@
{{#if items}} {{#if @items}}
<ul> <ul>
{{#each items as |item|}} {{#each @items as |item|}}
{{yield item}} {{yield item}}
{{/each}} {{/each}}
</ul> </ul>
{{#if hasMore}} {{#if this.hasMore}}
<p> <p>
{{#link-to (concat "userActivity." type) user class="more"}} {{#link-to (concat "userActivity." @type) @user class="more"}}
{{i18n (concat "user.summary.more_" type)}} {{i18n (concat "user.summary.more_" @type)}}
{{/link-to}} {{/link-to}}
</p> </p>
{{/if}} {{/if}}
{{else}} {{else}}
<p>{{i18n (concat "user.summary.no_" type)}}</p> <p>{{i18n (concat "user.summary.no_" @type)}}</p>
{{/if}} {{/if}}

View File

@ -1,4 +1,4 @@
{{#user-info user=user}} {{#user-info user=@user}}
{{d-icon icon}} {{d-icon @icon}}
<span class={{countClass}}>{{number user.count}}</span> <span class={{@countClass}}>{{number @user.count}}</span>
{{/user-info}} {{/user-info}}

View File

@ -1,9 +1,9 @@
{{#if users}} {{#if this.users}}
<ul> <ul>
{{#each users as |user|}} {{#each this.users as |user|}}
{{yield user}} {{yield user}}
{{/each}} {{/each}}
</ul> </ul>
{{else}} {{else}}
<p>{{i18n (concat "user.summary." none)}}</p> <p>{{i18n (concat "user.summary." this.none)}}</p>
{{/if}} {{/if}}