Deprecation: Change {{#each x in y}} to {{#each y as |x|}}

This commit is contained in:
Robin Ward 2016-04-29 17:29:41 -04:00
parent acbec76411
commit 9ea32bf7d8
No known key found for this signature in database
GPG key ID: 0E091E2B4ED1B83D
60 changed files with 112 additions and 99 deletions

View file

@ -5,7 +5,7 @@
<th>{{i18n 'admin.api.user'}}</th>
<th>&nbsp;</th>
</tr>
{{#each k in model}}
{{#each model as |k|}}
<tr>
<td class='key'>{{k.key}}</td>
<td>

View file

@ -13,7 +13,7 @@
</div>
</th>
</tr>
{{#each backup in model}}
{{#each model as |backup|}}
<tr>
<td>{{backup.filename}}</td>
<td>{{human-size backup.size}}</td>

View file

@ -3,7 +3,7 @@
<div class='content-list span6'>
<h3>{{i18n 'admin.badges.title'}}</h3>
<ul>
{{#each badge in model}}
{{#each model as |badge|}}
<li>
{{#link-to 'adminBadges.show' badge.id}}
{{badge-button badge=badge}}

View file

@ -1,7 +1,7 @@
<div class='content-list span6'>
<h3>{{i18n 'admin.customize.colors.long_title'}}</h3>
<ul>
{{#each scheme in model}}
{{#each model as |scheme|}}
{{#unless scheme.is_base}}
<li><a {{action "selectColorScheme" scheme}} {{bind-attr class="scheme.selected:active"}}>{{scheme.description}}</a></li>
{{/unless}}
@ -50,7 +50,7 @@
</tr>
</thead>
<tbody>
{{#each c in colors}}
{{#each colors as |c|}}
<tr {{bind-attr class="c.changed c.valid:valid:invalid"}}>
<td class="name" {{bind-attr title="c.name"}}>
<b>{{c.translatedName}}</b>

View file

@ -19,7 +19,7 @@
</thead>
<tbody>
{{#unless loading}}
{{#each r in user_reports}}
{{#each user_reports as |r|}}
{{admin-report-trust-level-counts report=r}}
{{/each}}
{{/unless}}
@ -58,7 +58,7 @@
</thead>
<tbody>
{{#unless loading}}
{{#each r in global_reports}}
{{#each global_reports as |r|}}
{{admin-report-counts report=r}}
{{/each}}
{{/unless}}
@ -80,7 +80,7 @@
</thead>
<tbody>
{{#unless loading}}
{{#each r in page_view_reports}}
{{#each page_view_reports as |r|}}
{{admin-report-counts report=r}}
{{/each}}
{{/unless}}
@ -102,7 +102,7 @@
</thead>
<tbody>
{{#unless loading}}
{{#each r in private_message_reports}}
{{#each private_message_reports as |r|}}
{{admin-report-counts report=r}}
{{/each}}
{{/unless}}
@ -124,7 +124,7 @@
</thead>
<tbody>
{{#unless loading}}
{{#each r in mobile_reports}}
{{#each mobile_reports as |r|}}
{{admin-report-counts report=r}}
{{/each}}
{{/unless}}
@ -171,7 +171,7 @@
</thead>
<tbody>
{{#unless loading}}
{{#each r in http_reports}}
{{#each http_reports as |r|}}
{{admin-report-counts report=r}}
{{/each}}
{{/unless}}
@ -195,7 +195,7 @@
<p {{bind-attr class="loadingProblems:invisible"}}>
{{i18n 'admin.dashboard.problems_found'}}
<ul {{bind-attr class="loadingProblems:invisible"}}>
{{#each problem in problems}}
{{#each problems as |problem|}}
<li>{{{problem}}}</li>
{{/each}}
</ul>
@ -231,7 +231,7 @@
</tr>
</thead>
{{#unless loading}}
{{#each data in top_referred_topics.data}}
{{#each top_referred_topics.data as |data|}}
<tbody>
<tr>
<td class="title">
@ -259,7 +259,7 @@
</tr>
</thead>
{{#unless loading}}
{{#each s in top_traffic_sources.data}}
{{#each top_traffic_sources.data as |s|}}
<tbody>
<tr>
<td class="title">{{s.domain}}</td>
@ -282,7 +282,7 @@
</tr>
</thead>
{{#unless loading}}
{{#each r in top_referrers.data}}
{{#each top_referrers.data as |r|}}
<tbody>
<tr>
<td class="title">{{#link-to 'adminUser' r.user_id r.username}}{{unbound r.username}}{{/link-to}}</td>

View file

@ -18,7 +18,7 @@
<td>{{text-field value=filter.skipped_reason placeholderKey="admin.email.logs.filters.skipped_reason_placeholder"}}</td>
</tr>
{{#each l in model}}
{{#each model as |l|}}
<tr>
<td>{{format-date l.created_at}}</td>
<td>

View file

@ -16,7 +16,7 @@
<td>{{text-field value=filter.subject placeholderKey="admin.email.incoming_emails.filters.subject_placeholder"}}</td>
</tr>
{{#each email in model}}
{{#each model as |email|}}
<tr>
<td class="time">{{format-date email.created_at}}</td>
<td class="username">
@ -32,10 +32,10 @@
</div>
</td>
<td class="addresses">
{{#each to in email.to_addresses}}
{{#each email.to_addresses as |to|}}
<p><a href="mailto:{{unbound to}}" title="TO">{{unbound to}}</a></p>
{{/each}}
{{#each cc in email.cc_addresses}}
{{#each email.cc_addresses as |cc|}}
<p><a href="mailto:{{unbound cc}}" title="CC">{{unbound cc}}</a></p>
{{/each}}
</td>

View file

@ -18,7 +18,7 @@
<td>{{text-field value=filter.error placeholderKey="admin.email.incoming_emails.filters.error_placeholder"}}</td>
</tr>
{{#each email in model}}
{{#each model as |email|}}
<tr>
<td class="time">{{format-date email.created_at}}</td>
<td class="username">
@ -38,10 +38,10 @@
</div>
</td>
<td class="addresses">
{{#each to in email.to_addresses}}
{{#each email.to_addresses as |to|}}
<p><a href="mailto:{{unbound to}}" title="TO">{{unbound to}}</a></p>
{{/each}}
{{#each cc in email.cc_addresses}}
{{#each email.cc_addresses as |cc|}}
<p><a href="mailto:{{unbound cc}}" title="CC">{{unbound cc}}</a></p>
{{/each}}
</td>

View file

@ -18,7 +18,7 @@
<td>{{text-field value=filter.reply_key placeholderKey="admin.email.logs.filters.reply_key_placeholder"}}</td>
</tr>
{{#each l in model}}
{{#each model as |l|}}
<tr>
<td>{{format-date l.created_at}}</td>
<td>

View file

@ -18,7 +18,7 @@
<td>{{text-field value=filter.skipped_reason placeholderKey="admin.email.logs.filters.skipped_reason_placeholder"}}</td>
</tr>
{{#each l in model}}
{{#each model as |l|}}
<tr>
<td>{{format-date l.created_at}}</td>
<td>

View file

@ -4,7 +4,7 @@
<td>{{delivery_method}}</td>
</tr>
{{#each s in model.settings}}
{{#each model.settings as |s|}}
<tr>
<th style='width: 25%'>{{s.name}}</th>
<td>{{s.value}}</td>

View file

@ -16,7 +16,7 @@
</tr>
</thead>
<tbody>
{{#each e in controller}}
{{#each controller as |e|}}
<tr>
<th><img class="emoji" src="{{unbound e.url}}" title="{{unbound e.name}}"></th>
<th>:{{e.name}}:</th>

View file

@ -42,7 +42,7 @@
<td class='flaggers'>
<table>
<tbody>
{{#each flagger in flaggedPost.flaggers}}
{{#each flaggedPost.flaggers as |flagger|}}
<tr>
<td class='avatar'>
{{#link-to 'adminUser' flagger.user}}
@ -67,7 +67,7 @@
{{#if adminOldFlagsView}}
<table>
<tbody>
{{#each flagger in flaggedPost.flaggers}}
{{#each flaggedPost.flaggers as |flagger|}}
<tr>
<td class='avatar'>
{{#link-to 'adminUser' flagger.disposedBy}}
@ -101,7 +101,7 @@
</tr>
{{/if}}
{{#each c in flaggedPost.conversations}}
{{#each flaggedPost.conversations as |c|}}
<tr class='message'>
<td></td>
<td colspan="3">

View file

@ -2,7 +2,7 @@
<div class='content-list span6'>
<h3>{{i18n 'admin.groups.edit'}}</h3>
<ul>
{{#each group in controller}}
{{#each controller as |group|}}
<li>
{{#link-to "adminGroup" group.type group.name}}{{group.name}}
{{#if group.userCountDisplay}}

View file

@ -34,7 +34,7 @@
{{i18n 'admin.badges.preview.sample'}}
</p>
<ul>
{{#each html in processed_sample}}
{{#each processed_sample as |html|}}
<li>{{{html}}}</li>
{{/each}}
</ul>

View file

@ -1,7 +1,7 @@
<div class="modal-body">
<div>
<ul class='badge-groupings'>
{{#each wc in workingCopy}}
{{#each workingCopy as |wc|}}
<li>
{{#if wc.editing}}
{{input value=wc.name}}

View file

@ -21,7 +21,7 @@
</tr>
</thead>
<tbody>
{{#each plugin in controller}}
{{#each controller as |plugin|}}
<tr>
<td>
{{#if plugin.url}}

View file

@ -2,7 +2,7 @@
<ul class="nav nav-stacked">
{{nav-item route='adminPlugins.index' label="admin.plugins.title"}}
{{#each route in adminRoutes}}
{{#each adminRoutes as |route|}}
{{nav-item route=route.full_location label=route.label}}
{{/each}}
</ul>

View file

@ -37,7 +37,7 @@
<th>{{model.yaxis}}</th>
</tr>
{{#each row in model.dataReversed}}
{{#each model.dataReversed as |row|}}
<tr>
<td>{{row.x}}</td>
<td>

View file

@ -14,7 +14,7 @@
<div class="admin-nav pull-left">
<ul class="nav nav-stacked">
{{#each category in controller}}
{{#each controller as |category|}}
{{#link-to 'adminSiteSettingsCategory' category.nameKey tagName='li' class=category.nameKey}}
{{#link-to 'adminSiteSettingsCategory' category.nameKey class=category.nameKey}}
{{category.name}}

View file

@ -128,7 +128,7 @@
{{#if userFields}}
<section class='details'>
{{#each uf in userFields}}
{{#each userFields as |uf|}}
<div class='display-row'>
<div class='field'>{{uf.name}}</div>
<div class='value'>

View file

@ -41,7 +41,7 @@
<th>&nbsp;</th>
</tr>
{{#each user in model}}
{{#each model as |user|}}
<tr {{bind-attr class="user.selected user.active::not-activated"}}>
{{#if controller.showApproval}}
<td>

View file

@ -40,7 +40,7 @@
};
};
// #each .. in support
// #each .. in support (as format is transformed to this)
RawHandlebars.registerHelper('each', function(localName,inKeyword,contextName,options){
var list = Em.get(this, contextName);
var output = [];
@ -68,6 +68,13 @@
RawHandlebars.JavaScriptCompiler.prototype.compiler = RawHandlebars.JavaScriptCompiler;
RawHandlebars.JavaScriptCompiler.prototype.namespace = "Discourse.EmberCompatHandlebars";
function buildPath(blk, args) {
return $.extend({ type: "PathExpression",
data: false,
depth: blk.path.depth,
loc: blk.path.loc }, args);
}
function replaceGet(ast) {
var visitor = new Handlebars.Visitor();
visitor.mutating = true;
@ -75,19 +82,25 @@
visitor.MustacheStatement = function(mustache) {
if (!(mustache.params.length || mustache.hash)) {
mustache.params[0] = mustache.path;
mustache.path = {
type: "PathExpression",
data: false,
depth: mustache.path.depth,
parts: ["get"],
original: "get",
loc: mustache.path.loc,
strict: true,
falsy: true
};
mustache.path = buildPath(mustache, { parts: ['get'], original: 'get', strict: true, falsy: true });
}
return Handlebars.Visitor.prototype.MustacheStatement.call(this, mustache);
};
// rewrite `each x as |y|` as each y in x`
// This allows us to use the same syntax in all templates
visitor.BlockStatement = function(block) {
if (block.path.original === 'each' && block.params.length === 1) {
const paramName = block.program.blockParams[0];
block.params = [ buildPath(block, { original: paramName }),
{ type: "CommentStatement", value: "in" },
block.params[0] ];
delete block.program.blockParams;
}
return Handlebars.Visitor.prototype.BlockStatement.call(this, block);
};
visitor.accept(ast);
}

View file

@ -2,7 +2,7 @@
<h1>{{i18n 'badges.title'}}</h1>
<div class='badge-groups'>
{{#each bg in badgeGroups}}
{{#each badgeGroups as |bg|}}
<div class='badge-grouping'>
<div class='title'>
<h3>{{bg.badgeGrouping.displayName}}</h3>

View file

@ -1,6 +1,6 @@
<div class='autocomplete'>
<ul>
{{#each option in options}}
{{#each options as |option|}}
<li><a href>{{category-link option allowUncategorized="true" link="false"}}</a></li>
{{/each}}
</ul>

View file

@ -1,6 +1,6 @@
<div class='autocomplete'>
<ul>
{{#each option in options}}
{{#each options as |option|}}
<li>
{{#if option.model}}
<a href>{{category-link option.model allowUncategorized="true" link="false"}}</a>

View file

@ -8,7 +8,7 @@
{{#if view.noResults}}
<p>{{i18n 'choose_topic.none_found'}}</p>
{{else}}
{{#each t in view.topics}}
{{#each view.topics as |t|}}
<div class='controls'>
<label class='radio'>
<input type='radio' id="choose-topic-{{unbound t.id}}" name='choose_topic_id' {{action "chooseTopic" t target="view"}}>{{t.title}}

View file

@ -22,7 +22,7 @@
<div class='cat'><a {{bind-attr href=noCategoriesUrl}} data-drop-close="true" class='badge-category home'>{{i18n 'categories.no_subcategory'}}</a></div>
{{/if}}
{{#if renderCategories}}
{{#each c in categories}}<div class='cat'>{{category-link c allowUncategorized=true hideParent=subCategory}}</div>{{/each}}
{{#each categories as |c|}}<div class='cat'>{{category-link c allowUncategorized=true hideParent=subCategory}}</div>{{/each}}
{{/if}}
</section>
{{/if}}

View file

@ -60,7 +60,7 @@
</tr>
</thead>
<tbody>
{{#each a in other_accounts}}
{{#each other_accounts as |a|}}
<tr>
<td>{{#link-to "adminUser" a}}{{avatar a usernamePath="user.username" imageSize="small"}}&nbsp;{{a.username}}{{/link-to}}</td>
<td>{{a.trustLevel.id}}</td>

View file

@ -1,3 +1,3 @@
{{#each b in buttons}}
{{#each buttons as |b|}}
<button {{bind-attr class=":btn :btn-social b.name"}} {{action "externalLogin" b}}>{{b.title}}</button>
{{/each}}

View file

@ -3,7 +3,7 @@
<div id='period-popup' {{bind-attr class="showPeriods::hidden :period-popup"}}>
<ul>
{{#each p in site.periods}}
{{#each site.periods as |p|}}
<li><a href {{action "changePeriod" p}}>{{period-title p showDateRange=true}}</a></li>
{{/each}}
</ul>

View file

@ -10,7 +10,7 @@
<section {{bind-attr class="expanded::hidden :category-dropdown-menu :chooser"}}>
<div class='cat'><a {{bind-attr href=allTagsUrl}} data-drop-close="true" class='badge-category home'>{{allTagsLabel}}</a></div>
{{#if renderTags}}
{{#each t in tags}}
{{#each tags as |t|}}
<div class='cat'>
{{tag-drop-link tagId=t category=currentCategory}}
</div>
@ -18,4 +18,4 @@
{{/if}}
</section>
{{/if}}
{{/if}}
{{/if}}

View file

@ -1,4 +1,4 @@
{{#each p in periods}}
{{#each periods as |p|}}
{{#d-button action="changePeriod" actionParam=p}}
{{period-title p}}
{{/d-button}}

View file

@ -4,7 +4,7 @@
{{bound-category-link topic.category hideParent=true}}
{{#if siteSettings.tagging_enabled}}
<div class="list-tags">
{{#each t in topic.tags}}
{{#each topic.tags as |t|}}
{{discourse-tag t}}
{{/each}}
</div>

View file

@ -9,7 +9,7 @@
</tr>
</thead>
<tbody>
{{#each c in model.categories}}
{{#each model.categories as |c|}}
<tr data-category_id='{{unbound c.id}}' {{bind-attr class="c.description_excerpt:has-description:no-description c.logo_url:has-logo:no-logo"}}>
<td class='category' style={{border-color c.color}}>
<div>
@ -41,7 +41,7 @@
<td class='stats' {{bind-attr title="c.topicStatsTitle"}}>
<table class="categoryStats">
<tbody>
{{#each s in c.topicCountStats}}
{{#each c.topicCountStats as |s|}}
<tr>
<td class="value">{{s.value}}</td>
<td class="unit"> / {{s.unit}}</td>

View file

@ -1,6 +1,6 @@
<div class='autocomplete'>
<ul>
{{#each option in options}}
{{#each options as |option|}}
<li>
<a href>
{{#if option.src}}

View file

@ -1,12 +1,12 @@
<div class='emoji-modal'>
<ul class='toolbar'>
{{#each item in toolbarItems}}<li><a title='{{item.title}}' {{#if item.selected}}class='selected'{{/if}} data-group-id='{{item.groupId}}'><img src='{{item.src}}' class='emoji'></a></li>{{/each}}
{{#each toolbarItems as |item|}}<li><a title='{{item.title}}' {{#if item.selected}}class='selected'{{/if}} data-group-id='{{item.groupId}}'><img src='{{item.src}}' class='emoji'></a></li>{{/each}}
</ul>
<div class='emoji-table-wrapper'>
<table class='emoji-page'>
{{#each row in rows}}
{{#each rows as |row|}}
<tr>
{{#each item in row}}
{{#each row as |item|}}
<td><a title='{{item.title}}'><img src='{{item.src}}' class='emoji'></a></td>
{{/each}}
</tr>

View file

@ -1,6 +1,6 @@
<div class='autocomplete'>
<ul>
{{#each option in options}}
{{#each options as |option|}}
<li><a href>{{option.name}}</a></li>
{{/each}}
</ul>

View file

@ -1,5 +1,5 @@
<td class='posters'>
{{#each poster in posters}}
{{#each posters as |poster|}}
<a href="{{poster.user.path}}" data-user-card="{{poster.user.username}}" class="{{poster.extras}}">{{avatar poster avatarTemplatePath="user.avatar_template" usernamePath="user.username" imageSize="small"}}</a>
{{/each}}
</td>

View file

@ -13,7 +13,7 @@
{{/if}}
{{#if topic.tags}}
<div class='discourse-tags'>
{{#each tag in topic.visibleListTags}}
{{#each topic.visibleListTags as |tag|}}
{{discourse-tag tag}}
{{/each}}
</div>

View file

@ -2,7 +2,7 @@
{{#if topics}}
<table class="topic-list">
<tbody>
{{#each t in topics}}
{{#each topics as |t|}}
<tr {{bind-attr class="t.archived"}} data-topic-id={{t.id}}>
<td>
<div class='main-link'>
@ -39,7 +39,7 @@
{{/unless}}
{{#if controller.showParticipants}}
<div class='participants'>
{{#each p in participants}}
{{#each participants as |p|}}
<a href="{{unbound p.user.path}}" class="{{unbound p.extras}}">{{avatar p usernamePath="user.username" imageSize="small"}}</a>
{{/each}}
</div>

View file

@ -15,7 +15,7 @@
</tr>
{{/if}}
{{#each t in c.topics}}
{{#each c.topics as |t|}}
<tr {{bind-attr class="t.archived :category-topic-link"}}>
<td class='main-link'>
<div class='topic-inset'>
@ -46,7 +46,7 @@
<tr class="subcategories-list">
<td>
<div class='subcategories'>
{{#each subcategory in c.subcategories}}
{{#each c.subcategories as |subcategory|}}
{{category-link subcategory}}
{{/each}}
</div>

View file

@ -29,7 +29,7 @@
{{#if context.topic.tags}}
<div class='discourse-tags'>
{{#each tag in context.topic.visibleListTags}}
{{#each context.topic.visibleListTags as |tag|}}
{{discourse-tag tag}}
{{/each}}
</div>

View file

@ -10,7 +10,7 @@
{{#if model.length}}
<div class='total-rows'>{{i18n "directory.total_rows" count=model.totalRows}}</div>
{{#each ic in model itemController="directory-item"}}
{{#each model itemController="directory-item"}}
<div class="user {{if ic.me 'me'}}">
{{#with ic.model as |it|}}
{{user-info user=it.user}}

View file

@ -1,4 +1,4 @@
{{#each level in notificationLevels}}
{{#each notificationLevels as |level|}}
<div class='controls'>
<label class='radio'>
{{radio-button value=level.id name="notification_level" selection=controller.notificationLevelId}} <strong>{{unbound level.name}}</strong>

View file

@ -81,7 +81,7 @@
{{#if userFields}}
<div class='user-fields'>
{{#each f in userFields}}
{{#each userFields as |f|}}
{{user-field field=f.field value=f.value}}
{{/each}}
</div>

View file

@ -8,7 +8,7 @@
</div>
<div id='modal-alert'></div>
{{outlet "modalBody"}}
{{#each error in errors}}
{{#each errors as |error|}}
<div class="alert alert-error">
<button class="close" data-dismiss="alert">×</button>
{{error}}

View file

@ -10,7 +10,7 @@
<div class="share-for-touch"><div class="overflow-ellipsis"><a></a></div></div>
</div>
{{#each s in sources}}
{{#each sources as |s|}}
{{share-source source=s title=view.title action="share"}}
{{/each}}

View file

@ -11,7 +11,7 @@
</div>
<div class='tag-list'>
{{#each tag in sortedTags}}
{{#each sortedTags as |tag|}}
<div class='tag-box'>
{{discourse-tag tag.id}} <span class='tag-count'>x {{tag.count}}</span>
</div>

View file

@ -1,7 +1,7 @@
{{~#if view.renderDiv ~}}
<div class='topic-statuses'>
{{/if ~}}
{{~#each status in view.statuses ~}}
{{~#each view.statuses as |status|~}}
{{~#if status.href ~}}
<a href='{{status.href}}' title='{{status.title}}' class='topic-status {{status.extraClasses}}'><i class='fa fa-{{status.icon}}'></i></a>
{{~else ~}}

View file

@ -86,7 +86,7 @@
{{#if publicUserFields}}
<div class="public-user-fields">
{{#each uf in publicUserFields}}
{{#each publicUserFields as |uf|}}
{{#if uf.value}}
<div class="public-user-field {{uf.field.dasherized_name}}">
<span class="user-field-name">{{uf.field.name}}:</span>
@ -99,7 +99,7 @@
{{#if showBadges}}
<div class="badge-section">
{{#each ub in user.featured_user_badges}}
{{#each user.featured_user_badges as |ub|}}
{{user-badge badge=ub.badge user=user}}
{{/each}}
{{#if showMoreBadges}}

View file

@ -45,7 +45,7 @@
<th colspan="6">{{i18n 'user.invited.sent'}}</th>
{{/if}}
</tr>
{{#each invite in model.invites}}
{{#each model.invites as |invite|}}
<tr>
{{#if invite.user}}
<td>

View file

@ -1,6 +1,6 @@
<div class='autocomplete'>
<ul>
{{#each user in options.users}}
{{#each options.users as |user|}}
<li>
<a href>
{{avatar user imageSize="tiny"}}
@ -10,7 +10,7 @@
</li>
{{/each}}
{{#if options.groups}}
{{#each group in options.groups}}
{{#each options.groups as |group|}}
<li>
<a href>
<i class='fa fa-users'></i>

View file

@ -1,5 +1,5 @@
{{#user-stream stream=model}}
{{#each p in model.content}}
{{#each model.content as |p|}}
<div {{bind-attr class=":item p.hidden p.deleted p.moderator_action"}}>
<div class="clearfix info">
<a href="{{unbound p.usernameUrl}}" class="avatar-link">

View file

@ -137,7 +137,7 @@
</div>
</div>
{{#each uf in userFields}}
{{#each userFields as |uf|}}
{{user-field field=uf.field value=uf.value}}
{{/each}}
<div class='clearfix'></div>

View file

@ -20,7 +20,7 @@
<h3 class='stats-title'>{{i18n "user.summary.top_replies"}}</h3>
{{#if model.replies.length}}
<ul>
{{#each reply in model.replies}}
{{#each model.replies as |reply|}}
<li>
<span class='topic-info'>
{{format-date reply.createdAt format="tiny" noTitle="true"}}
@ -45,7 +45,7 @@
<h3 class='stats-title'>{{i18n "user.summary.top_topics"}}</h3>
{{#if model.topics.length}}
<ul>
{{#each topic in model.topics}}
{{#each model.topics as |topic|}}
<li>
<span class='topic-info'>
{{format-date topic.createdAt format="tiny" noTitle="true"}}
@ -73,7 +73,7 @@
<h3 class='stats-title'>{{i18n "user.summary.top_links"}}</h3>
{{#if model.links.length}}
<ul>
{{#each link in model.links}}
{{#each model.links as |link|}}
<li>
<a class='domain'
href='{{unbound link.url}}'
@ -96,7 +96,7 @@
<h3 class='stats-title'>{{i18n "user.summary.most_liked_by"}}</h3>
{{#if model.most_liked_by_users.length}}
<ul>
{{#each user in model.most_liked_by_users}}
{{#each model.most_liked_by_users as |user|}}
<li>
{{#user-info user=user}}
{{fa-icon "heart"}}
@ -113,7 +113,7 @@
<div class='top-section badges-section'>
<h3 class='stats-title'>{{i18n "user.summary.top_badges"}}</h3>
{{#each badge in model.badges}}
{{#each model.badges as |badge|}}
{{badge-card badge=badge count=badge.count navigateOnClick="true" username=user.username_lower}}
{{else}}
<p>{{i18n "user.summary.no_badges"}}</p>

View file

@ -88,7 +88,7 @@
{{#if publicUserFields}}
<div class="public-user-fields">
{{#each uf in publicUserFields}}
{{#each publicUserFields as |uf|}}
{{#if uf.value}}
<div class="public-user-field {{uf.field.dasherized_name}}">
<span class="user-field-name">{{uf.field.name}}</span>:
@ -139,7 +139,7 @@
{{#if model.displayGroups}}
<dt>{{i18n 'groups.title' count=model.displayGroups.length}}</dt>
<dd class='groups'>
{{#each group in model.displayGroups}}
{{#each model.displayGroups as |group|}}
<span>{{#link-to 'group' group class="group-link"}}{{group.name}}{{/link-to}}</span>
{{/each}}
</dd>

View file

@ -1,4 +1,4 @@
{{#each option in options}}
{{#each options as |option|}}
<li>
<div class="option">
<p>

View file

@ -8,7 +8,7 @@
{{/if}}
{{else}}
<ul>
{{#each option in poll.options}}
{{#each poll.options as |option|}}
{{poll-option option=option toggle="toggleOption"}}
{{/each}}
</ul>

View file

@ -4605,4 +4605,4 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ }
/******/ ])
});
;
;