DEV: Fix no-implicit-this for all user-* components
This commit is contained in:
parent
074509fd95
commit
424a76145d
|
@ -1,7 +1,7 @@
|
|||
<a href={{badgeUrl}}>
|
||||
{{#badge-button badge=badge}}
|
||||
{{#if showGrantCount}}
|
||||
<span class="count">(× {{count}})</span>
|
||||
<a href={{this.badgeUrl}}>
|
||||
{{#badge-button badge=@badge}}
|
||||
{{#if this.showGrantCount}}
|
||||
<span class="count">(× {{@count}})</span>
|
||||
{{/if}}
|
||||
{{/badge-button}}
|
||||
</a>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{{#if visible}}
|
||||
{{#if this.visible}}
|
||||
<div class="card-content">
|
||||
{{#if loading}}
|
||||
{{#if this.loading}}
|
||||
<div class="card-row first-row">
|
||||
<div class="user-card-avatar">
|
||||
<div class="card-avatar-placeholder animated-placeholder placeholder-animation"></div>
|
||||
|
@ -22,71 +22,71 @@
|
|||
{{else}}
|
||||
<div class="card-row first-row">
|
||||
<div class="user-card-avatar">
|
||||
{{#if user.profile_hidden}}
|
||||
<span class="card-huge-avatar">{{bound-avatar user "huge"}}</span>
|
||||
{{#if this.user.profile_hidden}}
|
||||
<span class="card-huge-avatar">{{bound-avatar this.user "huge"}}</span>
|
||||
{{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 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"}}
|
||||
</div>
|
||||
<div class="names">
|
||||
<h1 class="{{staff}} {{newUser}} {{if nameFirst "full-name" "username"}}">
|
||||
{{#if user.profile_hidden}}
|
||||
<h1 class="{{this.staff}} {{this.newUser}} {{if this.nameFirst "full-name" "username"}}">
|
||||
{{#if this.user.profile_hidden}}
|
||||
<span class="name-username-wrapper">
|
||||
{{if nameFirst user.name (format-username username)}}
|
||||
{{if this.nameFirst this.user.name (format-username this.username)}}
|
||||
</span>
|
||||
{{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">
|
||||
{{if nameFirst user.name (format-username username)}}
|
||||
{{if this.nameFirst this.user.name (format-username this.username)}}
|
||||
</span>
|
||||
{{user-status user currentUser=currentUser}}
|
||||
{{user-status this.user currentUser=this.currentUser}}
|
||||
</a>
|
||||
{{/if}}
|
||||
</h1>
|
||||
{{plugin-outlet name="user-card-after-username" args=(hash user=user showUser=(action "showUser" user)) tagName=""}}
|
||||
{{#if nameFirst}}
|
||||
<h2 class="username">{{username}}</h2>
|
||||
{{plugin-outlet name="user-card-after-username" args=(hash user=this.user showUser=(action "showUser" this.user)) tagName=""}}
|
||||
{{#if this.nameFirst}}
|
||||
<h2 class="username">{{this.username}}</h2>
|
||||
{{else}}
|
||||
{{#if user.name}}
|
||||
<h2 class="full-name">{{user.name}}</h2>
|
||||
{{#if this.user.name}}
|
||||
<h2 class="full-name">{{this.user.name}}</h2>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{#if user.title}}
|
||||
<h2>{{user.title}}</h2>
|
||||
{{#if this.user.title}}
|
||||
<h2>{{this.user.title}}</h2>
|
||||
{{/if}}
|
||||
{{#if user.staged}}
|
||||
{{#if this.user.staged}}
|
||||
<h2 class="staged">{{i18n "user.staged"}}</h2>
|
||||
{{/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>
|
||||
<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">
|
||||
{{d-button
|
||||
class="btn-primary"
|
||||
action=(action "composePM" user post)
|
||||
action=(action "composePM" this.user this.post)
|
||||
icon="envelope"
|
||||
label="user.private_message"}}
|
||||
</li>
|
||||
{{/if}}
|
||||
{{#if showFilter}}
|
||||
{{#if this.showFilter}}
|
||||
<li>
|
||||
{{d-button
|
||||
class="btn-default"
|
||||
action=(action "togglePosts" user)
|
||||
action=(action "togglePosts" this.user)
|
||||
icon="filter"
|
||||
translatedLabel=togglePostsLabel}}
|
||||
translatedLabel=this.togglePostsLabel}}
|
||||
</li>
|
||||
{{/if}}
|
||||
{{#if hasUserFilters}}
|
||||
{{#if this.hasUserFilters}}
|
||||
<li>
|
||||
{{d-button
|
||||
action=(action "cancelFilter")
|
||||
|
@ -94,12 +94,12 @@
|
|||
label="topic.filters.cancel"}}
|
||||
</li>
|
||||
{{/if}}
|
||||
{{#if showDelete}}
|
||||
{{#if this.showDelete}}
|
||||
<li>
|
||||
{{d-button
|
||||
class="btn-danger"
|
||||
action=(action "deleteUser")
|
||||
actionParam=user
|
||||
actionParam=this.user
|
||||
icon="exclamation-triangle"
|
||||
label="admin.user.delete"}}
|
||||
</li>
|
||||
|
@ -107,11 +107,11 @@
|
|||
</ul>
|
||||
{{plugin-outlet
|
||||
name="user-card-additional-controls"
|
||||
args=(hash user=user close=(action "close"))
|
||||
args=(hash user=this.user close=(action "close"))
|
||||
tagName=""}}
|
||||
</div>
|
||||
|
||||
{{#if user.profile_hidden}}
|
||||
{{#if this.user.profile_hidden}}
|
||||
<div class="card-row second-row">
|
||||
<div class="profile-hidden">
|
||||
<span>{{i18n "user.profile_hidden"}}</span>
|
||||
|
@ -119,105 +119,105 @@
|
|||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if isSuspendedOrHasBio}}
|
||||
{{#if this.isSuspendedOrHasBio}}
|
||||
<div class="card-row second-row">
|
||||
{{#if user.suspend_reason}}
|
||||
{{#if this.user.suspend_reason}}
|
||||
<div class="suspended">
|
||||
<div class="suspension-date">
|
||||
{{d-icon "ban"}}
|
||||
{{i18n "user.suspended_notice" date=user.suspendedTillDate}}
|
||||
{{i18n "user.suspended_notice" date=this.user.suspendedTillDate}}
|
||||
</div>
|
||||
<div class="suspension-reason">
|
||||
<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>
|
||||
{{else}}
|
||||
{{#if user.bio_excerpt}}
|
||||
<div class="bio">{{text-overflow class="overflow" text=user.bio_excerpt}}</div>
|
||||
{{#if this.user.bio_excerpt}}
|
||||
<div class="bio">{{text-overflow class="overflow" text=this.user.bio_excerpt}}</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if showFeaturedTopic}}
|
||||
{{#if this.showFeaturedTopic}}
|
||||
<div class="card-row">
|
||||
<div class="featured-topic">
|
||||
<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>
|
||||
{{/if}}
|
||||
|
||||
{{#if hasLocationOrWebsite}}
|
||||
{{#if this.hasLocationOrWebsite}}
|
||||
<div class="card-row">
|
||||
<div class="location-and-website">
|
||||
{{#if user.location}}
|
||||
{{#if this.user.location}}
|
||||
<span class="location">
|
||||
{{d-icon "map-marker-alt"}}
|
||||
<span>{{user.location}}</span>
|
||||
<span>{{this.user.location}}</span>
|
||||
</span>
|
||||
{{/if}}
|
||||
{{#if user.website_name}}
|
||||
{{#if this.user.website_name}}
|
||||
<span class="website-name">
|
||||
{{d-icon "globe"}}
|
||||
{{#if linkWebsite}}
|
||||
{{#if this.linkWebsite}}
|
||||
{{!-- template-lint-disable --}}
|
||||
<a href="{{user.website}}" rel="noopener {{unless removeNoFollow 'nofollow ugc'}}"
|
||||
target="_blank">{{user.website_name}}</a>
|
||||
<a href="{{this.user.website}}" rel="noopener {{unless this.removeNoFollow 'nofollow ugc'}}"
|
||||
target="_blank">{{this.user.website_name}}</a>
|
||||
{{else}}
|
||||
<span title={{user.website}}>{{user.website_name}}</span>
|
||||
<span title={{this.user.website}}>{{this.user.website_name}}</span>
|
||||
{{/if}}
|
||||
</span>
|
||||
{{/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>
|
||||
{{/if}}
|
||||
|
||||
<div class="card-row">
|
||||
{{#unless user.profile_hidden}}
|
||||
{{#unless this.user.profile_hidden}}
|
||||
<div class="metadata">
|
||||
{{#if user.last_posted_at}}
|
||||
{{#if this.user.last_posted_at}}
|
||||
<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}}
|
||||
<h3><span class='desc'>{{i18n 'joined'}}</span>
|
||||
{{format-date user.created_at leaveAgo="true"}}</h3>
|
||||
{{#if user.time_read}}
|
||||
<h3 title="{{timeReadTooltip}}">
|
||||
{{format-date this.user.created_at leaveAgo="true"}}</h3>
|
||||
{{#if this.user.time_read}}
|
||||
<h3 title="{{this.timeReadTooltip}}">
|
||||
<span class='desc'>{{i18n 'time_read'}}</span>
|
||||
{{format-duration user.time_read}}
|
||||
{{#if showRecentTimeRead}}
|
||||
<span>({{i18n 'time_read_recently' time_read=recentTimeRead}})</span>
|
||||
{{format-duration this.user.time_read}}
|
||||
{{#if this.showRecentTimeRead}}
|
||||
<span>({{i18n 'time_read_recently' time_read=this.recentTimeRead}})</span>
|
||||
{{/if}}
|
||||
</h3>
|
||||
{{/if}}
|
||||
{{#if showCheckEmail}}
|
||||
{{#if this.showCheckEmail}}
|
||||
<h3 class="email">
|
||||
{{d-icon "far-envelope" title="user.email.title"}}
|
||||
{{#if user.email}}
|
||||
{{user.email}}
|
||||
{{#if this.user.email}}
|
||||
{{this.user.email}}
|
||||
{{else}}
|
||||
{{d-button
|
||||
action=(action "checkEmail")
|
||||
actionParam=user
|
||||
actionParam=this.user
|
||||
icon="far-envelope"
|
||||
label="admin.users.check_email.text"
|
||||
class="btn-primary"}}
|
||||
{{/if}}
|
||||
</h3>
|
||||
{{/if}}
|
||||
{{plugin-outlet name="user-card-metadata" args=(hash user=user)}}
|
||||
{{plugin-outlet name="user-card-metadata" args=(hash user=this.user)}}
|
||||
</div>
|
||||
{{/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>
|
||||
|
||||
{{#if publicUserFields}}
|
||||
{{#if this.publicUserFields}}
|
||||
<div class="card-row">
|
||||
<div class="public-user-fields">
|
||||
{{#each publicUserFields as |uf|}}
|
||||
{{#each this.publicUserFields as |uf|}}
|
||||
{{#if uf.value}}
|
||||
<div class="public-user-field {{uf.field.dasherized_name}}">
|
||||
<span class="user-field-name">{{uf.field.name}}:</span>
|
||||
|
@ -229,19 +229,19 @@
|
|||
</div>
|
||||
{{/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">
|
||||
{{#if user.featured_user_badges}}
|
||||
{{#if this.user.featured_user_badges}}
|
||||
<div class="badge-section">
|
||||
{{#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}}
|
||||
<span class='more-user-badges'>
|
||||
{{#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}}
|
||||
</span>
|
||||
{{/if}}
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
{{#if field.name}}
|
||||
<label class="control-label" for={{concat "user-" elementId}}>
|
||||
{{html-safe field.name}} {{#if field.required}}<span class="required">*</span>{{/if}}
|
||||
{{#if this.field.name}}
|
||||
<label class="control-label" for={{concat "user-" this.elementId}}>
|
||||
{{html-safe this.field.name}} {{#if this.field.required}}<span class="required">*</span>{{/if}}
|
||||
</label>
|
||||
{{/if}}
|
||||
|
||||
<div class="controls">
|
||||
<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>
|
||||
{{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>
|
||||
</label>
|
||||
</div>
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
<label class="control-label" for={{concat "user-" elementId}}>
|
||||
{{html-safe field.name}}
|
||||
{{#if field.required}}
|
||||
<label class="control-label" for={{concat "user-" this.elementId}}>
|
||||
{{html-safe this.field.name}}
|
||||
{{#if this.field.required}}
|
||||
<span class="required">*</span>
|
||||
{{/if}}
|
||||
</label>
|
||||
|
||||
<div class="controls">
|
||||
{{combo-box
|
||||
id=(concat "user-" elementId)
|
||||
content=field.options
|
||||
id=(concat "user-" this.elementId)
|
||||
content=this.field.options
|
||||
valueProperty=null
|
||||
nameProperty=null
|
||||
value=value
|
||||
none=noneLabel
|
||||
onChange=(action (mut value))
|
||||
value=this.value
|
||||
none=this.noneLabel
|
||||
onChange=(action (mut this.value))
|
||||
}}
|
||||
<div class="instructions">{{html-safe field.description}}</div>
|
||||
<div class="instructions">{{html-safe this.field.description}}</div>
|
||||
</div>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<label class="control-label" for={{concat "user-" elementId}}>
|
||||
{{html-safe field.name}}
|
||||
{{#if field.required}}<span class="required">*</span>{{/if}}
|
||||
<label class="control-label" for={{concat "user-" this.elementId}}>
|
||||
{{html-safe this.field.name}}
|
||||
{{#if this.field.required}}<span class="required">*</span>{{/if}}
|
||||
</label>
|
||||
<div class="controls">
|
||||
{{input id=(concat "user-" elementId) value=value maxlength=site.user_field_max_length}}
|
||||
<div class="instructions">{{html-safe field.description}}</div>
|
||||
{{input id=(concat "user-" this.elementId) value=this.value maxlength=this.site.user_field_max_length}}
|
||||
<div class="instructions">{{html-safe this.field.description}}</div>
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{{#if showPercentage}}
|
||||
<div title={{percentage.title}} class="user-flag-percentage">
|
||||
<span class="percentage-label {{percentage.className}}">{{percentage.label}}</span>
|
||||
{{d-icon percentage.icon}}
|
||||
{{#if this.showPercentage}}
|
||||
<div title={{this.percentage.title}} class="user-flag-percentage">
|
||||
<span class="percentage-label {{this.percentage.className}}">{{this.percentage.label}}</span>
|
||||
{{d-icon this.percentage.icon}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
<div class="user-image">
|
||||
<div class="user-image-inner">
|
||||
<a href={{userPath}} data-user-card={{user.username}}>{{avatar user imageSize="large"}}</a>
|
||||
{{#if user.primary_group_name}}
|
||||
<a href={{this.userPath}} data-user-card={{@user.username}}>{{avatar @user imageSize="large"}}</a>
|
||||
{{#if @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=@user.primary_group_flair_url
|
||||
flairBgColor=@user.primary_group_flair_bg_color
|
||||
flairColor=@user.primary_group_flair_color
|
||||
groupName=@user.primary_group_name}}
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="user-detail">
|
||||
<div class="name-line">
|
||||
<span class="username"><a href={{userPath}} data-user-card={{user.username}}>{{format-username user.username}}</a></span>
|
||||
<span class="name">{{name}}</span>
|
||||
<span class="username"><a href={{this.userPath}} data-user-card={{@user.username}}>{{format-username @user.username}}</a></span>
|
||||
<span class="name">{{this.name}}</span>
|
||||
</div>
|
||||
<div class="title">{{user.title}}</div>
|
||||
<div class="title">{{@user.title}}</div>
|
||||
|
||||
{{#if hasBlock}}
|
||||
<div class="details">
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<div class="user-profile-avatar">
|
||||
{{bound-avatar user "huge"}}
|
||||
{{#if user.primary_group_name}}
|
||||
{{bound-avatar @user "huge"}}
|
||||
{{#if @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=@user.primary_group_flair_url
|
||||
flairBgColor=@user.primary_group_flair_bg_color
|
||||
flairColor=@user.primary_group_flair_color
|
||||
groupName=@user.primary_group_name}}
|
||||
{{/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>
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<span class="value">
|
||||
{{#if isNumber}}
|
||||
{{number value}}
|
||||
{{else if isDuration}}
|
||||
{{format-duration value}}
|
||||
{{#if this.isNumber}}
|
||||
{{number @value}}
|
||||
{{else if this.isDuration}}
|
||||
{{format-duration @value}}
|
||||
{{else}}
|
||||
{{value}}
|
||||
{{@value}}
|
||||
{{/if}}
|
||||
</span>
|
||||
<span class="label">
|
||||
{{#if icon}}{{d-icon icon}}{{/if}}
|
||||
{{html-safe (i18n label count=value)}}
|
||||
{{#if @icon}}{{d-icon @icon}}{{/if}}
|
||||
{{html-safe (i18n @label count=@value)}}
|
||||
</span>
|
||||
|
|
|
@ -1,51 +1,51 @@
|
|||
<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>
|
||||
<span class="time">{{format-date item.created_at}}</span>
|
||||
{{#if item.draftType}}
|
||||
<span class="draft-type">{{html-safe item.draftType}}</span>
|
||||
<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>
|
||||
{{#if @item.draftType}}
|
||||
<span class="draft-type">{{html-safe @item.draftType}}</span>
|
||||
{{else}}
|
||||
{{expand-post item=item}}
|
||||
{{expand-post item=@item}}
|
||||
{{/if}}
|
||||
<div class="stream-topic-details">
|
||||
<div class="stream-topic-title">
|
||||
{{topic-status topic=item disableActions=true}}
|
||||
{{topic-status topic=@item disableActions=true}}
|
||||
<span class="title">
|
||||
{{#if item.postUrl}}
|
||||
<a href={{item.postUrl}}>{{html-safe item.title}}</a>
|
||||
{{#if @item.postUrl}}
|
||||
<a href={{@item.postUrl}}>{{html-safe @item.title}}</a>
|
||||
{{else}}
|
||||
{{html-safe item.title}}
|
||||
{{html-safe @item.title}}
|
||||
{{/if}}
|
||||
</span>
|
||||
</div>
|
||||
<div class="category">{{category-link item.category}}</div>
|
||||
<div class="category">{{category-link @item.category}}</div>
|
||||
</div>
|
||||
|
||||
{{#if item.deleted_by}}
|
||||
{{#if @item.deleted_by}}
|
||||
<span class="delete-info">
|
||||
{{d-icon "far-trash-alt"}}
|
||||
{{avatar item.deleted_by imageSize="tiny" extraClasses="actor" ignoreTitle="true"}}
|
||||
{{format-date item.deleted_at leaveAgo="true"}}
|
||||
{{avatar @item.deleted_by imageSize="tiny" extraClasses="actor" ignoreTitle="true"}}
|
||||
{{format-date @item.deleted_at leaveAgo="true"}}
|
||||
</span>
|
||||
{{/if}}
|
||||
|
||||
{{plugin-outlet name="user-stream-item-header" args=(hash item=item)}}
|
||||
{{plugin-outlet name="user-stream-item-header" args=(hash item=@item)}}
|
||||
</div>
|
||||
|
||||
{{#if actionDescription}}
|
||||
<p class="excerpt">{{actionDescription}}</p>
|
||||
{{#if this.actionDescription}}
|
||||
<p class="excerpt">{{this.actionDescription}}</p>
|
||||
{{/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 --}}
|
||||
{{~#if item.expandedExcerpt}}
|
||||
{{~{item.expandedExcerpt}~}}
|
||||
{{~#if @item.expandedExcerpt}}
|
||||
{{~{@item.expandedExcerpt}~}}
|
||||
{{else}}
|
||||
{{~{item.excerpt}~}}
|
||||
{{~{@item.excerpt}~}}
|
||||
{{/if~}}
|
||||
{{!-- template-lint-enable --}}
|
||||
</p>
|
||||
|
||||
{{#each item.children as |child|}}
|
||||
{{#each @item.children as |child|}}
|
||||
{{!-- DEPRECATED: 'child-actions' class --}}
|
||||
<div class="user-stream-item-actions child-actions">
|
||||
{{d-icon child.icon class="icon"}}
|
||||
|
@ -53,7 +53,7 @@
|
|||
{{#if grandChild.removableBookmark}}
|
||||
{{d-button
|
||||
class="btn-default remove-bookmark"
|
||||
action=(action removeBookmark grandChild)
|
||||
action=(action @removeBookmark grandChild)
|
||||
icon="times"
|
||||
label="bookmarks.remove"
|
||||
}}
|
||||
|
@ -65,9 +65,9 @@
|
|||
</div>
|
||||
{{/each}}
|
||||
|
||||
{{#if item.editableDraft}}
|
||||
{{#if @item.editableDraft}}
|
||||
<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=removeDraft actionParam=item icon="far-trash-alt" label="drafts.remove" class="btn-default remove-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"}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{{#each stream.content as |item|}}
|
||||
{{#each @stream.content as |item|}}
|
||||
{{user-stream-item
|
||||
item=item
|
||||
removeBookmark=(action "removeBookmark")
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{{#if count}}
|
||||
{{#link-to "full-page-search" (query-params q=searchParams)}}
|
||||
{{count}}
|
||||
{{#if @count}}
|
||||
{{#link-to "full-page-search" (query-params q=this.searchParams)}}
|
||||
{{@count}}
|
||||
{{/link-to}}
|
||||
{{else}}
|
||||
–
|
||||
|
|
|
@ -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}}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<span class="topic-info">
|
||||
{{format-date createdAt format="tiny" noTitle="true"}}
|
||||
{{#if likes}}
|
||||
{{format-date @createdAt format="tiny" noTitle="true"}}
|
||||
{{#if @likes}}
|
||||
·
|
||||
{{d-icon "heart"}} <span class="like-count">{{number likes}}</span>
|
||||
{{d-icon "heart"}} <span class="like-count">{{number @likes}}</span>
|
||||
{{/if}}
|
||||
</span>
|
||||
<br>
|
||||
<a href={{url}}>{{html-safe topic.fancyTitle}}</a>
|
||||
<a href={{@url}}>{{html-safe @topic.fancyTitle}}</a>
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
{{#if items}}
|
||||
{{#if @items}}
|
||||
<ul>
|
||||
{{#each items as |item|}}
|
||||
{{#each @items as |item|}}
|
||||
{{yield item}}
|
||||
{{/each}}
|
||||
</ul>
|
||||
{{#if hasMore}}
|
||||
{{#if this.hasMore}}
|
||||
<p>
|
||||
{{#link-to (concat "userActivity." type) user class="more"}}
|
||||
{{i18n (concat "user.summary.more_" type)}}
|
||||
{{#link-to (concat "userActivity." @type) @user class="more"}}
|
||||
{{i18n (concat "user.summary.more_" @type)}}
|
||||
{{/link-to}}
|
||||
</p>
|
||||
{{/if}}
|
||||
{{else}}
|
||||
<p>{{i18n (concat "user.summary.no_" type)}}</p>
|
||||
<p>{{i18n (concat "user.summary.no_" @type)}}</p>
|
||||
{{/if}}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{{#user-info user=user}}
|
||||
{{d-icon icon}}
|
||||
<span class={{countClass}}>{{number user.count}}</span>
|
||||
{{#user-info user=@user}}
|
||||
{{d-icon @icon}}
|
||||
<span class={{@countClass}}>{{number @user.count}}</span>
|
||||
{{/user-info}}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{{#if users}}
|
||||
{{#if this.users}}
|
||||
<ul>
|
||||
{{#each users as |user|}}
|
||||
{{#each this.users as |user|}}
|
||||
{{yield user}}
|
||||
{{/each}}
|
||||
</ul>
|
||||
{{else}}
|
||||
<p>{{i18n (concat "user.summary." none)}}</p>
|
||||
<p>{{i18n (concat "user.summary." this.none)}}</p>
|
||||
{{/if}}
|
||||
|
|
Loading…
Reference in New Issue