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
60 changed files with 112 additions and 99 deletions
@@ -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>
@@ -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>
@@ -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}}
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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">
@@ -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}}
@@ -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>
@@ -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}}
@@ -21,7 +21,7 @@
</tr>
</thead>
<tbody>
{{#each plugin in controller}}
{{#each controller as |plugin|}}
<tr>
<td>
{{#if plugin.url}}
@@ -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>
@@ -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>
@@ -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}}
@@ -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'>
@@ -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>