DEV: enforces table-groups linting rule (#8903)

This commit is contained in:
Joffrey JAFFEUX 2020-02-10 08:14:26 +01:00 committed by GitHub
parent 99ad2e408a
commit 0d9b99582d
18 changed files with 614 additions and 589 deletions

View File

@ -4,6 +4,7 @@ module.exports = {
rules: {
"self-closing-void-elements": true,
"table-groups": true,
"style-concatenation": true
}
};

View File

@ -8,38 +8,38 @@
<th>{{i18n 'admin.email.email_type'}}</th>
</tr>
</thead>
<tr class="filters">
<td>{{i18n 'admin.email.logs.filters.title'}}</td>
<td>{{text-field value=filter.user placeholderKey="admin.email.logs.filters.user_placeholder"}}</td>
<td>{{text-field value=filter.address placeholderKey="admin.email.logs.filters.address_placeholder"}}</td>
<td>{{text-field value=filter.type placeholderKey="admin.email.logs.filters.type_placeholder"}}</td>
</tr>
{{#each model as |l|}}
<tr>
<td>{{format-date l.created_at}}</td>
<td>
{{#if l.user}}
{{#link-to 'adminUser' l.user}}{{avatar l.user imageSize="tiny"}}{{/link-to}}
{{#link-to 'adminUser' l.user}}{{l.user.username}}{{/link-to}}
{{else}}
&mdash;
{{/if}}
</td>
<td><a href='mailto:{{unbound l.to_address}}'>{{l.to_address}}</a></td>
{{#if l.has_bounce_key}}
<td><a {{action "showIncomingEmail" l.id}}>{{l.email_type}}</a></td>
{{else}}
<td>{{l.email_type}}</td>
{{/if}}
<tbody>
<tr class="filters">
<td>{{i18n 'admin.email.logs.filters.title'}}</td>
<td>{{text-field value=filter.user placeholderKey="admin.email.logs.filters.user_placeholder"}}</td>
<td>{{text-field value=filter.address placeholderKey="admin.email.logs.filters.address_placeholder"}}</td>
<td>{{text-field value=filter.type placeholderKey="admin.email.logs.filters.type_placeholder"}}</td>
</tr>
{{else}}
{{#unless loading}}
<tr><td colspan="4">{{i18n 'admin.email.logs.none'}}</td></tr>
{{/unless}}
{{/each}}
{{#each model as |l|}}
<tr>
<td>{{format-date l.created_at}}</td>
<td>
{{#if l.user}}
{{#link-to 'adminUser' l.user}}{{avatar l.user imageSize="tiny"}}{{/link-to}}
{{#link-to 'adminUser' l.user}}{{l.user.username}}{{/link-to}}
{{else}}
&mdash;
{{/if}}
</td>
<td><a href='mailto:{{unbound l.to_address}}'>{{l.to_address}}</a></td>
{{#if l.has_bounce_key}}
<td><a {{action "showIncomingEmail" l.id}}>{{l.email_type}}</a></td>
{{else}}
<td>{{l.email_type}}</td>
{{/if}}
</tr>
{{else}}
{{#unless loading}}
<tr><td colspan="4">{{i18n 'admin.email.logs.none'}}</td></tr>
{{/unless}}
{{/each}}
</tbody>
</table>
{{/load-more}}

View File

@ -1,15 +1,17 @@
<table class="table">
<tr>
<th>{{i18n 'admin.email.delivery_method'}}</th>
<td>{{delivery_method}}</td>
</tr>
{{#each model.settings as |s|}}
<tbody>
<tr>
<th style='width: 25%'>{{s.name}}</th>
<td>{{s.value}}</td>
<th>{{i18n 'admin.email.delivery_method'}}</th>
<td>{{delivery_method}}</td>
</tr>
{{/each}}
{{#each model.settings as |s|}}
<tr>
<th style='width: 25%'>{{s.name}}</th>
<td>{{s.value}}</td>
</tr>
{{/each}}
</tbody>
</table>
<form>

View File

@ -9,48 +9,49 @@
</tr>
</thead>
<tr class="filters">
<td>{{i18n 'admin.email.logs.filters.title'}}</td>
<td>{{text-field value=filter.from placeholderKey="admin.email.incoming_emails.filters.from_placeholder"}}</td>
<td>{{text-field value=filter.to placeholderKey="admin.email.incoming_emails.filters.to_placeholder"}}</td>
<td>{{text-field value=filter.subject placeholderKey="admin.email.incoming_emails.filters.subject_placeholder"}}</td>
</tr>
{{#each model as |email|}}
<tr>
<td class="time">{{format-date email.created_at}}</td>
<td class="username">
<div>
{{#if email.user}}
{{#link-to 'adminUser' email.user}}
{{avatar email.user imageSize="tiny"}}
{{email.from_address}}
{{/link-to}}
{{else}}
&mdash;
{{/if}}
</div>
</td>
<td class="addresses">
{{#each email.to_addresses as |to|}}
<p><a href="mailto:{{unbound to}}" title="TO">{{unbound to}}</a></p>
{{/each}}
{{#each email.cc_addresses as |cc|}}
<p><a href="mailto:{{unbound cc}}" title="CC">{{unbound cc}}</a></p>
{{/each}}
</td>
<td>
{{#if email.post_url}}
<a href="{{email.post_url}}">{{email.subject}}</a>
{{else}}
{{email.subject}}
{{/if}}
</td>
<tbody>
<tr class="filters">
<td>{{i18n 'admin.email.logs.filters.title'}}</td>
<td>{{text-field value=filter.from placeholderKey="admin.email.incoming_emails.filters.from_placeholder"}}</td>
<td>{{text-field value=filter.to placeholderKey="admin.email.incoming_emails.filters.to_placeholder"}}</td>
<td>{{text-field value=filter.subject placeholderKey="admin.email.incoming_emails.filters.subject_placeholder"}}</td>
</tr>
{{else}}
<tr><td colspan="4">{{i18n 'admin.email.incoming_emails.none'}}</td></tr>
{{/each}}
{{#each model as |email|}}
<tr>
<td class="time">{{format-date email.created_at}}</td>
<td class="username">
<div>
{{#if email.user}}
{{#link-to 'adminUser' email.user}}
{{avatar email.user imageSize="tiny"}}
{{email.from_address}}
{{/link-to}}
{{else}}
&mdash;
{{/if}}
</div>
</td>
<td class="addresses">
{{#each email.to_addresses as |to|}}
<p><a href="mailto:{{unbound to}}" title="TO">{{unbound to}}</a></p>
{{/each}}
{{#each email.cc_addresses as |cc|}}
<p><a href="mailto:{{unbound cc}}" title="CC">{{unbound cc}}</a></p>
{{/each}}
</td>
<td>
{{#if email.post_url}}
<a href="{{email.post_url}}">{{email.subject}}</a>
{{else}}
{{email.subject}}
{{/if}}
</td>
</tr>
{{else}}
<tr><td colspan="4">{{i18n 'admin.email.incoming_emails.none'}}</td></tr>
{{/each}}
</tbody>
</table>
{{/load-more}}

View File

@ -10,50 +10,51 @@
</tr>
</thead>
<tr class="filters">
<td>{{i18n 'admin.email.logs.filters.title'}}</td>
<td>{{text-field value=filter.from placeholderKey="admin.email.incoming_emails.filters.from_placeholder"}}</td>
<td>{{text-field value=filter.to placeholderKey="admin.email.incoming_emails.filters.to_placeholder"}}</td>
<td>{{text-field value=filter.subject placeholderKey="admin.email.incoming_emails.filters.subject_placeholder"}}</td>
<td>{{text-field value=filter.error placeholderKey="admin.email.incoming_emails.filters.error_placeholder"}}</td>
</tr>
{{#each model as |email|}}
<tr>
<td class="time">{{format-date email.created_at}}</td>
<td class="username">
<div>
{{#if email.user}}
{{#link-to 'adminUser' email.user}}
{{avatar email.user imageSize="tiny"}}
{{email.from_address}}
{{/link-to}}
{{else}}
{{#if email.from_address}}
<a href='mailto:{{unbound email.from_address}}'>{{email.from_address}}</a>
{{else}}
&mdash;
{{/if}}
{{/if}}
</div>
</td>
<td class="addresses">
{{#each email.to_addresses as |to|}}
<p><a href="mailto:{{unbound to}}" title="TO">{{unbound to}}</a></p>
{{/each}}
{{#each email.cc_addresses as |cc|}}
<p><a href="mailto:{{unbound cc}}" title="CC">{{unbound cc}}</a></p>
{{/each}}
</td>
<td>{{email.subject}}</td>
<td class="error">
<a {{action "showIncomingEmail" email.id}}>{{email.error}}</a>
</td>
<tbody>
<tr class="filters">
<td>{{i18n 'admin.email.logs.filters.title'}}</td>
<td>{{text-field value=filter.from placeholderKey="admin.email.incoming_emails.filters.from_placeholder"}}</td>
<td>{{text-field value=filter.to placeholderKey="admin.email.incoming_emails.filters.to_placeholder"}}</td>
<td>{{text-field value=filter.subject placeholderKey="admin.email.incoming_emails.filters.subject_placeholder"}}</td>
<td>{{text-field value=filter.error placeholderKey="admin.email.incoming_emails.filters.error_placeholder"}}</td>
</tr>
{{else}}
<tr><td colspan="5">{{i18n 'admin.email.incoming_emails.none'}}</td></tr>
{{/each}}
{{#each model as |email|}}
<tr>
<td class="time">{{format-date email.created_at}}</td>
<td class="username">
<div>
{{#if email.user}}
{{#link-to 'adminUser' email.user}}
{{avatar email.user imageSize="tiny"}}
{{email.from_address}}
{{/link-to}}
{{else}}
{{#if email.from_address}}
<a href='mailto:{{unbound email.from_address}}'>{{email.from_address}}</a>
{{else}}
&mdash;
{{/if}}
{{/if}}
</div>
</td>
<td class="addresses">
{{#each email.to_addresses as |to|}}
<p><a href="mailto:{{unbound to}}" title="TO">{{unbound to}}</a></p>
{{/each}}
{{#each email.cc_addresses as |cc|}}
<p><a href="mailto:{{unbound cc}}" title="CC">{{unbound cc}}</a></p>
{{/each}}
</td>
<td>{{email.subject}}</td>
<td class="error">
<a {{action "showIncomingEmail" email.id}}>{{email.error}}</a>
</td>
</tr>
{{else}}
<tr><td colspan="5">{{i18n 'admin.email.incoming_emails.none'}}</td></tr>
{{/each}}
</tbody>
</table>
{{/load-more}}

View File

@ -9,46 +9,46 @@
<th>{{i18n 'admin.email.reply_key'}}</th>
</tr>
</thead>
<tr class="filters">
<td>{{i18n 'admin.email.logs.filters.title'}}</td>
<td>{{text-field value=filter.user placeholderKey="admin.email.logs.filters.user_placeholder"}}</td>
<td>{{text-field value=filter.address placeholderKey="admin.email.logs.filters.address_placeholder"}}</td>
<td>{{text-field value=filter.type placeholderKey="admin.email.logs.filters.type_placeholder"}}</td>
<td>{{text-field value=filter.reply_key placeholderKey="admin.email.logs.filters.reply_key_placeholder"}}</td>
</tr>
{{#each model as |l|}}
<tr>
<td>{{format-date l.created_at}}</td>
<td>
{{#if l.user}}
{{#link-to 'adminUser' l.user}}{{avatar l.user imageSize="tiny"}}{{/link-to}}
{{#link-to 'adminUser' l.user}}{{l.user.username}}{{/link-to}}
{{else}}
&mdash;
{{/if}}
</td>
<td>
{{#if l.bounced}}{{d-icon "redo" title="admin.email.bounced"}}{{/if}}
<a href='mailto:{{unbound l.to_address}}'>{{l.to_address}}</a>
</td>
<td>{{l.email_type}}</td>
<td class='post-link'>
{{#if l.post_url}}
<a href="{{l.post_url}}">{{l.post_description}}</a>
<span class='reply-key'>{{l.reply_key}}</span>
{{else}}
<span class='reply-key'>{{l.reply_key}}</span>
{{/if}}
</td>
<tbody>
<tr class="filters">
<td>{{i18n 'admin.email.logs.filters.title'}}</td>
<td>{{text-field value=filter.user placeholderKey="admin.email.logs.filters.user_placeholder"}}</td>
<td>{{text-field value=filter.address placeholderKey="admin.email.logs.filters.address_placeholder"}}</td>
<td>{{text-field value=filter.type placeholderKey="admin.email.logs.filters.type_placeholder"}}</td>
<td>{{text-field value=filter.reply_key placeholderKey="admin.email.logs.filters.reply_key_placeholder"}}</td>
</tr>
{{else}}
{{#unless loading}}
<tr><td colspan="5">{{i18n 'admin.email.logs.none'}}</td></tr>
{{/unless}}
{{/each}}
{{#each model as |l|}}
<tr>
<td>{{format-date l.created_at}}</td>
<td>
{{#if l.user}}
{{#link-to 'adminUser' l.user}}{{avatar l.user imageSize="tiny"}}{{/link-to}}
{{#link-to 'adminUser' l.user}}{{l.user.username}}{{/link-to}}
{{else}}
&mdash;
{{/if}}
</td>
<td>
{{#if l.bounced}}{{d-icon "redo" title="admin.email.bounced"}}{{/if}}
<a href='mailto:{{unbound l.to_address}}'>{{l.to_address}}</a>
</td>
<td>{{l.email_type}}</td>
<td class='post-link'>
{{#if l.post_url}}
<a href="{{l.post_url}}">{{l.post_description}}</a>
<span class='reply-key'>{{l.reply_key}}</span>
{{else}}
<span class='reply-key'>{{l.reply_key}}</span>
{{/if}}
</td>
</tr>
{{else}}
{{#unless loading}}
<tr><td colspan="5">{{i18n 'admin.email.logs.none'}}</td></tr>
{{/unless}}
{{/each}}
</tbody>
</table>
{{/load-more}}

View File

@ -9,42 +9,42 @@
<th>{{i18n 'admin.email.skipped_reason'}}</th>
</tr>
</thead>
<tr class="filters">
<td>{{i18n 'admin.email.logs.filters.title'}}</td>
<td>{{text-field value=filter.user placeholderKey="admin.email.logs.filters.user_placeholder"}}</td>
<td>{{text-field value=filter.address placeholderKey="admin.email.logs.filters.address_placeholder"}}</td>
<td>{{text-field value=filter.type placeholderKey="admin.email.logs.filters.type_placeholder"}}</td>
<td></td>
</tr>
{{#each model as |l|}}
<tr>
<td>{{format-date l.created_at}}</td>
<td>
{{#if l.user}}
{{#link-to 'adminUser' l.user}}{{avatar l.user imageSize="tiny"}}{{/link-to}}
{{#link-to 'adminUser' l.user}}{{l.user.username}}{{/link-to}}
{{else}}
&mdash;
{{/if}}
</td>
<td><a href='mailto:{{unbound l.to_address}}'>{{l.to_address}}</a></td>
<td>{{l.email_type}}</td>
<td>
{{#if l.post_url}}
<a href="{{l.post_url}}">{{l.skipped_reason}}</a>
{{else}}
{{l.skipped_reason}}
{{/if}}
</td>
<tbody>
<tr class="filters">
<td>{{i18n 'admin.email.logs.filters.title'}}</td>
<td>{{text-field value=filter.user placeholderKey="admin.email.logs.filters.user_placeholder"}}</td>
<td>{{text-field value=filter.address placeholderKey="admin.email.logs.filters.address_placeholder"}}</td>
<td>{{text-field value=filter.type placeholderKey="admin.email.logs.filters.type_placeholder"}}</td>
<td></td>
</tr>
{{else}}
{{#unless loading}}
<tr><td colspan="5">{{i18n 'admin.email.logs.none'}}</td></tr>
{{/unless}}
{{/each}}
{{#each model as |l|}}
<tr>
<td>{{format-date l.created_at}}</td>
<td>
{{#if l.user}}
{{#link-to 'adminUser' l.user}}{{avatar l.user imageSize="tiny"}}{{/link-to}}
{{#link-to 'adminUser' l.user}}{{l.user.username}}{{/link-to}}
{{else}}
&mdash;
{{/if}}
</td>
<td><a href='mailto:{{unbound l.to_address}}'>{{l.to_address}}</a></td>
<td>{{l.email_type}}</td>
<td>
{{#if l.post_url}}
<a href="{{l.post_url}}">{{l.skipped_reason}}</a>
{{else}}
{{l.skipped_reason}}
{{/if}}
</td>
</tr>
{{else}}
{{#unless loading}}
<tr><td colspan="5">{{i18n 'admin.email.logs.none'}}</td></tr>
{{/unless}}
{{/each}}
</tbody>
</table>
{{/load-more}}

View File

@ -21,34 +21,36 @@
<th class="col heading external_url">{{i18n 'admin.permalink.external_url'}}</th>
<th class="col heading actions"></th>
</thead>
{{#each model as |pl|}}
<tr class="admin-list-item">
<td class="col first url">{{pl.url}}</td>
<td class="col topic">
{{#if pl.topic_id}}
<a href='{{unbound pl.topic_url}}'>{{pl.topic_title}}</a>
{{/if}}
</td>
<td class="col post">
{{#if pl.post_id}}
<a href='{{unbound pl.post_url}}'>#{{pl.post_number}} {{pl.post_topic_title}}</a>
{{/if}}
</td>
<td class="col category">
{{#if pl.category_id}}
<a href='{{unbound pl.category_url}}'>{{pl.category_name}}</a>
{{/if}}
</td>
<td class="col external_url">
{{#if pl.external_url}}
<a href='{{unbound pl.external_url}}'>{{pl.external_url}}</a>
{{/if}}
</td>
<td class="col action">
{{d-button action=(action "destroy") actionParam=pl icon="far-trash-alt" class="btn-danger"}}
</td>
</tr>
{{/each}}
<tbody>
{{#each model as |pl|}}
<tr class="admin-list-item">
<td class="col first url">{{pl.url}}</td>
<td class="col topic">
{{#if pl.topic_id}}
<a href='{{unbound pl.topic_url}}'>{{pl.topic_title}}</a>
{{/if}}
</td>
<td class="col post">
{{#if pl.post_id}}
<a href='{{unbound pl.post_url}}'>#{{pl.post_number}} {{pl.post_topic_title}}</a>
{{/if}}
</td>
<td class="col category">
{{#if pl.category_id}}
<a href='{{unbound pl.category_url}}'>{{pl.category_name}}</a>
{{/if}}
</td>
<td class="col external_url">
{{#if pl.external_url}}
<a href='{{unbound pl.external_url}}'>{{pl.external_url}}</a>
{{/if}}
</td>
<td class="col action">
{{d-button action=(action "destroy") actionParam=pl icon="far-trash-alt" class="btn-danger"}}
</td>
</tr>
{{/each}}
</tbody>
</table>
{{else}}
{{i18n 'search.no_results'}}

View File

@ -36,49 +36,50 @@
{{/if}}
<table id='user-badges'>
<tr>
<th>{{i18n 'admin.badges.badge'}}</th>
<th>{{i18n 'admin.badges.granted_by'}}</th>
<th class='reason'>{{i18n 'admin.badges.reason'}}</th>
<th>{{i18n 'admin.badges.granted_at'}}</th>
<th></th>
</tr>
{{#each groupedBadges as |userBadge|}}
<tbody>
<tr>
<td>{{user-badge badge=userBadge.badge count=userBadge.count}}</td>
<td>
{{#link-to 'adminUser' userBadge.badge.granted_by}}
{{avatar userBadge.granted_by imageSize="tiny"}}
{{userBadge.granted_by.username}}
{{/link-to}}
</td>
<td class='reason'>
{{#if userBadge.postUrl}}
<a href="{{unbound userBadge.postUrl}}">{{userBadge.topic_title}}</a>
{{/if}}
</td>
<td>{{age-with-tooltip userBadge.granted_at}}</td>
<td>
{{#if userBadge.grouped}}
{{d-button
action=(action "expandGroup" userBadge)
label="admin.badges.expand"}}
{{else}}
{{d-button
class="btn-danger"
action=(action "revokeBadge" userBadge)
label="admin.badges.revoke"}}
{{/if}}
</td>
<th>{{i18n 'admin.badges.badge'}}</th>
<th>{{i18n 'admin.badges.granted_by'}}</th>
<th class='reason'>{{i18n 'admin.badges.reason'}}</th>
<th>{{i18n 'admin.badges.granted_at'}}</th>
<th></th>
</tr>
{{else}}
<tr>
<td colspan="5">
<p>{{i18n 'admin.badges.no_user_badges' name=user.username}}</p>
</td>
</tr>
{{/each}}
{{#each groupedBadges as |userBadge|}}
<tr>
<td>{{user-badge badge=userBadge.badge count=userBadge.count}}</td>
<td>
{{#link-to 'adminUser' userBadge.badge.granted_by}}
{{avatar userBadge.granted_by imageSize="tiny"}}
{{userBadge.granted_by.username}}
{{/link-to}}
</td>
<td class='reason'>
{{#if userBadge.postUrl}}
<a href="{{unbound userBadge.postUrl}}">{{userBadge.topic_title}}</a>
{{/if}}
</td>
<td>{{age-with-tooltip userBadge.granted_at}}</td>
<td>
{{#if userBadge.grouped}}
{{d-button
action=(action "expandGroup" userBadge)
label="admin.badges.expand"}}
{{else}}
{{d-button
class="btn-danger"
action=(action "revokeBadge" userBadge)
label="admin.badges.revoke"}}
{{/if}}
</td>
</tr>
{{else}}
<tr>
<td colspan="5">
<p>{{i18n 'admin.badges.no_user_badges' name=user.username}}</p>
</td>
</tr>
{{/each}}
</tbody>
</table>
</div>
{{/conditional-loading-spinner}}

View File

@ -68,42 +68,44 @@
<h3>{{d-icon "far-chart-bar"}} {{i18n 'about.stats'}}</h3>
<table class='table'>
<tr>
<th>&nbsp;</th>
<th>{{i18n 'about.stat.last_7_days'}}</th>
<th>{{i18n 'about.stat.last_30_days'}}</th>
<th>{{i18n 'about.stat.all_time'}}</th>
</tr>
<tr>
<td class='title'>{{i18n 'about.topic_count'}}</td>
<td>{{number model.stats.topics_7_days}}</td>
<td>{{number model.stats.topics_30_days}}</td>
<td>{{number model.stats.topic_count}}</td>
</tr>
<tr>
<td>{{i18n 'about.post_count'}}</td>
<td>{{number model.stats.posts_7_days}}</td>
<td>{{number model.stats.posts_30_days}}</td>
<td>{{number model.stats.post_count}}</td>
</tr>
<tr>
<td>{{i18n 'about.user_count'}}</td>
<td>{{number model.stats.users_7_days}}</td>
<td>{{number model.stats.users_30_days}}</td>
<td>{{number model.stats.user_count}}</td>
</tr>
<tr>
<td>{{i18n 'about.active_user_count'}}</td>
<td>{{number model.stats.active_users_7_days}}</td>
<td>{{number model.stats.active_users_30_days}}</td>
<td>&mdash;</td>
</tr>
<tr>
<td>{{i18n 'about.like_count'}}</td>
<td>{{number model.stats.likes_7_days}}</td>
<td>{{number model.stats.likes_30_days}}</td>
<td>{{number model.stats.like_count}}</td>
</tr>
<tbody>
<tr>
<th>&nbsp;</th>
<th>{{i18n 'about.stat.last_7_days'}}</th>
<th>{{i18n 'about.stat.last_30_days'}}</th>
<th>{{i18n 'about.stat.all_time'}}</th>
</tr>
<tr>
<td class='title'>{{i18n 'about.topic_count'}}</td>
<td>{{number model.stats.topics_7_days}}</td>
<td>{{number model.stats.topics_30_days}}</td>
<td>{{number model.stats.topic_count}}</td>
</tr>
<tr>
<td>{{i18n 'about.post_count'}}</td>
<td>{{number model.stats.posts_7_days}}</td>
<td>{{number model.stats.posts_30_days}}</td>
<td>{{number model.stats.post_count}}</td>
</tr>
<tr>
<td>{{i18n 'about.user_count'}}</td>
<td>{{number model.stats.users_7_days}}</td>
<td>{{number model.stats.users_30_days}}</td>
<td>{{number model.stats.user_count}}</td>
</tr>
<tr>
<td>{{i18n 'about.active_user_count'}}</td>
<td>{{number model.stats.active_users_7_days}}</td>
<td>{{number model.stats.active_users_30_days}}</td>
<td>&mdash;</td>
</tr>
<tr>
<td>{{i18n 'about.like_count'}}</td>
<td>{{number model.stats.likes_7_days}}</td>
<td>{{number model.stats.likes_30_days}}</td>
<td>{{number model.stats.like_count}}</td>
</tr>
</tbody>
</table>
</section>

View File

@ -21,36 +21,38 @@
{{/if}}
{{#if c.isGrandParent}}
<table class="category-list subcategories-with-subcategories">
{{#each c.subcategories as |subcategory|}}
<tr data-category-id={{subcategory.id}} data-notification-level={{subcategory.notificationLevelString}} class="{{if subcategory.description_excerpt 'has-description' 'no-description'}} {{if subcategory.uploaded_logo.url 'has-logo' 'no-logo'}}">
<td class="category" style={{border-color subcategory.color}}>
{{category-title-link tagName="h4" category=subcategory}}
{{#if subcategory.description_excerpt}}
<div class="category-description subcategory-description">
{{{dir-span subcategory.description_excerpt}}}
</div>
{{/if}}
{{#if subcategory.subcategories}}
<div class='subcategories'>
{{#each subcategory.subcategories as |subsubcategory|}}
{{#unless subsubcategory.isMuted}}
<span class='subcategory'>
{{category-title-before category=subsubcategory}}
{{category-link subsubcategory hideParent="true"}}
</span>
{{/unless}}
{{/each}}
</div>
{{else}}
<tbody>
{{#each c.subcategories as |subcategory|}}
<tr data-category-id={{subcategory.id}} data-notification-level={{subcategory.notificationLevelString}} class="{{if subcategory.description_excerpt 'has-description' 'no-description'}} {{if subcategory.uploaded_logo.url 'has-logo' 'no-logo'}}">
<td class="category" style={{border-color subcategory.color}}>
{{category-title-link tagName="h4" category=subcategory}}
{{#if subcategory.description_excerpt}}
<div class="category-description subcategory-description">
{{{dir-span subcategory.description_excerpt}}}
</div>
{{/if}}
{{/if}}
</td>
</tr>
{{/each}}
{{#if subcategory.subcategories}}
<div class='subcategories'>
{{#each subcategory.subcategories as |subsubcategory|}}
{{#unless subsubcategory.isMuted}}
<span class='subcategory'>
{{category-title-before category=subsubcategory}}
{{category-link subsubcategory hideParent="true"}}
</span>
{{/unless}}
{{/each}}
</div>
{{else}}
{{#if subcategory.description_excerpt}}
<div class="category-description subcategory-description">
{{{dir-span subcategory.description_excerpt}}}
</div>
{{/if}}
{{/if}}
</td>
</tr>
{{/each}}
</tbody>
</table>
{{else if c.subcategories}}
<div class='subcategories'>

View File

@ -3,60 +3,61 @@
{{#each categories as |c|}}
<div data-category-id={{c.id}} class='category-list-item category' style={{border-color c.color}}>
<table class='topic-list'>
<tr>
<th class="main-link">
{{category-title-link category=c}}
</th>
</tr>
{{#if c.description_excerpt}}
<tr class="category-description">
<td colspan="3">
{{{c.description_excerpt}}}
</td>
<tbody>
<tr>
<th class="main-link">
{{category-title-link category=c}}
</th>
</tr>
{{/if}}
{{#if showTopics}}
{{#each c.topics as |t|}}
{{mobile-category-topic topic=t}}
{{/each}}
{{/if}}
{{#if c.description_excerpt}}
<tr class="category-description">
<td colspan="3">
{{{c.description_excerpt}}}
</td>
</tr>
{{/if}}
{{#if c.isGrandParent}}
{{#each c.subcategories as |subcategory|}}
<tr data-category-id={{c.id}} class='subcategory-list-item category' style={{border-color subcategory.color}}>
{{#if showTopics}}
{{#each c.topics as |t|}}
{{mobile-category-topic topic=t}}
{{/each}}
{{/if}}
{{#if c.isGrandParent}}
{{#each c.subcategories as |subcategory|}}
<tr data-category-id={{c.id}} class='subcategory-list-item category' style={{border-color subcategory.color}}>
<td>
{{category-title-link tagName="h4" category=subcategory}}
<div class="subcategories-list">
{{#if subcategory.subcategories}}
<div class='subcategories'>
{{#each subcategory.subcategories as |subsubcategory|}}
{{#unless subsubcategory.isMuted}}
{{category-link subsubcategory}}
{{/unless}}
{{/each}}
</div>
{{/if}}
</div>
</td>
</tr>
{{/each}}
{{else if c.subcategories}}
<tr class="subcategories-list">
<td>
{{category-title-link tagName="h4" category=subcategory}}
<div class="subcategories-list">
{{#if subcategory.subcategories}}
<div class='subcategories'>
{{#each subcategory.subcategories as |subsubcategory|}}
{{#unless subsubcategory.isMuted}}
{{category-link subsubcategory}}
{{/unless}}
{{/each}}
</div>
{{/if}}
<div class='subcategories'>
{{#each c.subcategories as |subcategory|}}
{{#unless subcategory.isMuted}}
{{category-link subcategory}}
{{/unless}}
{{/each}}
</div>
</td>
</tr>
{{/each}}
{{else if c.subcategories}}
<tr class="subcategories-list">
<td>
<div class='subcategories'>
{{#each c.subcategories as |subcategory|}}
{{#unless subcategory.isMuted}}
{{category-link subcategory}}
{{/unless}}
{{/each}}
</div>
</td>
</tr>
{{/if}}
{{/if}}
</tbody>
</table>
<footer class="clearfix">

View File

@ -12,28 +12,30 @@
<form id='login-form' method='post'>
<div id="credentials" class={{credentialsClass}}>
<table>
<tr>
<td>
<label for='login-account-name'>{{i18n 'login.username'}}</label>
</td>
<td>
{{text-field value=loginName type="email" placeholderKey="login.email_placeholder" id="login-account-name" autocorrect="off" autocapitalize="off" disabled=showSecondFactor}}
</td>
</tr>
<tr>
<td>
<label for='login-account-password'>{{i18n 'login.password'}}</label>
</td>
<td>
{{text-field value=loginPassword type="password" id="login-account-password" maxlength="200" disabled=showSecondFactor}}
</td>
</tr>
<tr>
<td></td>
<td>
<a id="forgot-password-link" {{action "showForgotPassword"}}>{{i18n 'forgot_password.action'}}</a>
</td>
</tr>
<tbody>
<tr>
<td>
<label for='login-account-name'>{{i18n 'login.username'}}</label>
</td>
<td>
{{text-field value=loginName type="email" placeholderKey="login.email_placeholder" id="login-account-name" autocorrect="off" autocapitalize="off" disabled=showSecondFactor}}
</td>
</tr>
<tr>
<td>
<label for='login-account-password'>{{i18n 'login.password'}}</label>
</td>
<td>
{{text-field value=loginPassword type="password" id="login-account-password" maxlength="200" disabled=showSecondFactor}}
</td>
</tr>
<tr>
<td></td>
<td>
<a id="forgot-password-link" {{action "showForgotPassword"}}>{{i18n 'forgot_password.action'}}</a>
</td>
</tr>
</tbody>
</table>
</div>
{{#second-factor-form

View File

@ -11,91 +11,91 @@
<div class="login-form">
<form>
<table>
<tbody>
<tr class="input create-account-email">
<td class="label"><label for='new-account-email'>{{i18n 'user.email.title'}}</label></td>
<td>
{{input type="email" value=accountEmail id="new-account-email" disabled=emailValidated name="email" autofocus="autofocus"}}
</td>
</tr>
<tr class="input create-account-email">
<td class="label"><label for='new-account-email'>{{i18n 'user.email.title'}}</label></td>
<td>
{{input type="email" value=accountEmail id="new-account-email" disabled=emailValidated name="email" autofocus="autofocus"}}
</td>
</tr>
<tr class="instructions create-account-email">
<td></td>
{{input-tip validation=emailValidation id="account-email-validation"}}
<td><label>{{i18n 'user.email.instructions'}}</label></td>
</tr>
<tr class="instructions create-account-email">
<td></td>
{{input-tip validation=emailValidation id="account-email-validation"}}
<td><label>{{i18n 'user.email.instructions'}}</label></td>
</tr>
{{#if usernameRequired}}
<tr class="input">
<td class="label"><label for='new-account-username'>{{i18n 'user.username.title'}}</label></td>
<td>
{{input value=accountUsername id="new-account-username" name="username" maxlength=maxUsernameLength autocomplete="discourse"}}
</td>
</tr>
<tr class="instructions">
<td></td>
{{input-tip validation=usernameValidation id="username-validation"}}
<td><label>{{i18n 'user.username.instructions'}}</label></td>
</tr>
{{/if}}
{{#if usernameRequired}}
<tr class="input">
<td class="label"><label for='new-account-username'>{{i18n 'user.username.title'}}</label></td>
<td>
{{input value=accountUsername id="new-account-username" name="username" maxlength=maxUsernameLength autocomplete="discourse"}}
{{#if fullnameRequired}}
<tr class="input">
<td class="label">
<label for='new-account-name'>{{i18n 'user.name.title'}}</label>
</td>
</tr>
<tr class="instructions">
<td></td>
{{input-tip validation=usernameValidation id="username-validation"}}
<td><label>{{i18n 'user.username.instructions'}}</label></td>
</tr>
{{/if}}
<td>
{{text-field value=accountName id="new-account-name"}}
</td>
</tr>
<tr class="instructions">
<td></td>
{{input-tip validation=nameValidation}}
<td><label>{{nameInstructions}}</label></td>
</tr>
{{/if}}
{{#if fullnameRequired}}
<tr class="input">
<td class="label">
<label for='new-account-name'>{{i18n 'user.name.title'}}</label>
</td>
<td>
{{text-field value=accountName id="new-account-name"}}
</td>
</tr>
<tr class="instructions">
<td></td>
{{input-tip validation=nameValidation}}
<td><label>{{nameInstructions}}</label></td>
</tr>
{{/if}}
{{plugin-outlet name="create-account-before-password"
noTags=true
args=(hash accountName=accountName
accountUsername=accountUsername
accountPassword=accountPassword
userFields=userFields
authOptions=authOptions)}}
{{plugin-outlet name="create-account-before-password"
noTags=true
args=(hash accountName=accountName
accountUsername=accountUsername
accountPassword=accountPassword
userFields=userFields
authOptions=authOptions)}}
{{#if passwordRequired}}
<tr class="input">
<td class="label"><label for='new-account-password'>{{i18n 'user.password.title'}}</label></td>
<td>
{{password-field value=accountPassword type="password" id="new-account-password" capsLockOn=capsLockOn}}
</td>
</tr>
<tr class="instructions">
<td></td>
{{input-tip validation=passwordValidation}}
<td>
<label>{{passwordInstructions}}</label>
<div class="caps-lock-warning {{unless capsLockOn 'hidden'}}">
{{d-icon "exclamation-triangle"}} {{i18n 'login.caps_lock_warning'}}</div>
</td>
</tr>
{{/if}}
{{#if passwordRequired}}
<tr class="input">
<td class="label"><label for='new-account-password'>{{i18n 'user.password.title'}}</label></td>
<tr class="password-confirmation">
<td><label for='new-account-password-confirmation'>{{i18n 'user.password_confirmation.title'}}</label></td>
<td>
{{password-field value=accountPassword type="password" id="new-account-password" capsLockOn=capsLockOn}}
{{honeypot-input id="new-account-confirmation" autocomplete="new-password" value=accountHoneypot}}
{{input value=accountChallenge id="new-account-challenge"}}
</td>
</tr>
<tr class="instructions">
<td></td>
{{input-tip validation=passwordValidation}}
<td>
<label>{{passwordInstructions}}</label>
<div class="caps-lock-warning {{unless capsLockOn 'hidden'}}">
{{d-icon "exclamation-triangle"}} {{i18n 'login.caps_lock_warning'}}</div>
</td>
</tr>
{{/if}}
<tr class="password-confirmation">
<td><label for='new-account-password-confirmation'>{{i18n 'user.password_confirmation.title'}}</label></td>
<td>
{{honeypot-input id="new-account-confirmation" autocomplete="new-password" value=accountHoneypot}}
{{input value=accountChallenge id="new-account-challenge"}}
</td>
</tr>
{{plugin-outlet name="create-account-after-password"
noTags=true
args=(hash accountName=accountName
accountUsername=accountUsername
accountPassword=accountPassword
userFields=userFields)}}
</tr>
{{plugin-outlet name="create-account-after-password"
noTags=true
args=(hash accountName=accountName
accountUsername=accountUsername
accountPassword=accountPassword
userFields=userFields)}}
</tbody>
</table>
{{#if userFields}}

View File

@ -1,41 +1,45 @@
{{#d-modal-body class="explain-reviewable"}}
{{#conditional-loading-spinner condition=loading}}
<table>
<tr>
<th>{{i18n "review.explain.formula"}}</th>
<th>{{i18n "review.explain.subtotal"}}</th>
</tr>
{{#each reviewableExplanation.scores as |s|}}
<tr>
<td>
{{score-value value="1.0" tagName=""}}
{{score-value value=s.type_bonus label="type_bonus" tagName=""}}
{{score-value value=s.take_action_bonus label="take_action_bonus" tagName=""}}
{{score-value value=s.trust_level_bonus label="trust_level_bonus" tagName=""}}
{{score-value value=s.user_accuracy_bonus label="user_accuracy_bonus" tagName=""}}
</td>
<td class='sum'>{{float s.score}}</td>
</tr>
{{/each}}
<tr class="total">
<td>{{i18n "review.explain.total"}}</td>
<td class='sum'>{{float reviewableExplanation.total_score}}</td>
</tr>
<tbody>
<tr>
<th>{{i18n "review.explain.formula"}}</th>
<th>{{i18n "review.explain.subtotal"}}</th>
</tr>
{{#each reviewableExplanation.scores as |s|}}
<tr>
<td>
{{score-value value="1.0" tagName=""}}
{{score-value value=s.type_bonus label="type_bonus" tagName=""}}
{{score-value value=s.take_action_bonus label="take_action_bonus" tagName=""}}
{{score-value value=s.trust_level_bonus label="trust_level_bonus" tagName=""}}
{{score-value value=s.user_accuracy_bonus label="user_accuracy_bonus" tagName=""}}
</td>
<td class='sum'>{{float s.score}}</td>
</tr>
{{/each}}
<tr class="total">
<td>{{i18n "review.explain.total"}}</td>
<td class='sum'>{{float reviewableExplanation.total_score}}</td>
</tr>
</tbody>
</table>
<table class='thresholds'>
<tr>
<td>{{i18n "review.explain.min_score_visibility"}}</td>
<td class='sum'>
{{float reviewableExplanation.min_score_visibility}}
</td>
</tr>
<tr>
<td>{{i18n "review.explain.score_to_hide"}}</td>
<td class='sum'>
{{float reviewableExplanation.hide_post_score}}
</td>
</tr>
<tbody>
<tr>
<td>{{i18n "review.explain.min_score_visibility"}}</td>
<td class='sum'>
{{float reviewableExplanation.min_score_visibility}}
</td>
</tr>
<tr>
<td>{{i18n "review.explain.score_to_hide"}}</td>
<td class='sum'>
{{float reviewableExplanation.hide_post_score}}
</td>
</tr>
</tbody>
</table>
{{/conditional-loading-spinner}}

View File

@ -6,20 +6,22 @@
<form id='login-form' method='post'>
<div id="credentials" class={{credentialsClass}}>
<table>
<tr>
<td><label for='login-account-name'>{{i18n 'login.username'}}</label></td>
<td>{{text-field value=loginName placeholderKey="login.email_placeholder" id="login-account-name" autocorrect="off" autocapitalize="off" autofocus="autofocus" disabled=disableLoginFields}}</td>
</tr>
<tr>
<td><label for='login-account-password'>{{i18n 'login.password'}}</label></td>
<td>{{password-field value=loginPassword type="password" id="login-account-password" maxlength="200" capsLockOn=capsLockOn disabled=disableLoginFields}}</td>
<td><a id="forgot-password-link" {{action "forgotPassword"}}>{{i18n 'forgot_password.action'}}</a></td>
</tr>
<tr>
<td></td>
<td><div class="caps-lock-warning {{unless capsLockOn 'hidden'}}">{{d-icon "exclamation-triangle"}} {{i18n 'login.caps_lock_warning'}}</div></td>
<td></td>
</tr>
<tbody>
<tr>
<td><label for='login-account-name'>{{i18n 'login.username'}}</label></td>
<td>{{text-field value=loginName placeholderKey="login.email_placeholder" id="login-account-name" autocorrect="off" autocapitalize="off" autofocus="autofocus" disabled=disableLoginFields}}</td>
</tr>
<tr>
<td><label for='login-account-password'>{{i18n 'login.password'}}</label></td>
<td>{{password-field value=loginPassword type="password" id="login-account-password" maxlength="200" capsLockOn=capsLockOn disabled=disableLoginFields}}</td>
<td><a id="forgot-password-link" {{action "forgotPassword"}}>{{i18n 'forgot_password.action'}}</a></td>
</tr>
<tr>
<td></td>
<td><div class="caps-lock-warning {{unless capsLockOn 'hidden'}}">{{d-icon "exclamation-triangle"}} {{i18n 'login.caps_lock_warning'}}</div></td>
<td></td>
</tr>
</tbody>
</table>
</div>
{{#second-factor-form

View File

@ -104,30 +104,32 @@
<label class="control-label">{{i18n 'user.associated_accounts.title'}}</label>
{{#if associatedAccountsLoaded}}
<table>
{{#each authProviders as |authProvider|}}
{{#if authProvider.account}}
<tr class="{{dasherize authProvider.method.name}} account-connected">
<td>{{authProvider.method.prettyName}}</td>
<td>{{authProvider.account.description}}</td>
<td>
{{#if authProvider.method.can_revoke}}
{{d-button action=(action "revokeAccount") actionParam=authProvider.account title="user.associated_accounts.revoke" class="btn-danger no-text" icon="trash-alt" disabled=(get revoking authProvider.method.name) }}
{{/if}}
</td>
</tr>
{{else}}
<tr class="{{dasherize authProvider.method.name}}">
<td>{{authProvider.method.prettyName}}</td>
<td colspan=2>
{{#if authProvider.method.can_connect}}
{{d-button action=(action "connectAccount") actionParam=authProvider.method label="user.associated_accounts.connect" class="btn-default" icon="plug" disabled=disableConnectButtons}}
{{else}}
{{i18n 'user.associated_accounts.not_connected'}}
{{/if}}
</td>
</tr>
{{/if}}
{{/each}}
<tbody>
{{#each authProviders as |authProvider|}}
{{#if authProvider.account}}
<tr class="{{dasherize authProvider.method.name}} account-connected">
<td>{{authProvider.method.prettyName}}</td>
<td>{{authProvider.account.description}}</td>
<td>
{{#if authProvider.method.can_revoke}}
{{d-button action=(action "revokeAccount") actionParam=authProvider.account title="user.associated_accounts.revoke" class="btn-danger no-text" icon="trash-alt" disabled=(get revoking authProvider.method.name) }}
{{/if}}
</td>
</tr>
{{else}}
<tr class="{{dasherize authProvider.method.name}}">
<td>{{authProvider.method.prettyName}}</td>
<td colspan=2>
{{#if authProvider.method.can_connect}}
{{d-button action=(action "connectAccount") actionParam=authProvider.method label="user.associated_accounts.connect" class="btn-default" icon="plug" disabled=disableConnectButtons}}
{{else}}
{{i18n 'user.associated_accounts.not_connected'}}
{{/if}}
</td>
</tr>
{{/if}}
{{/each}}
</tbody>
</table>
{{else}}
<div class="controls">

View File

@ -43,64 +43,66 @@
{{#if model.invites}}
<table class='table user-invite-list'>
<tr>
{{#if inviteRedeemed}}
<th>{{i18n 'user.invited.user'}}</th>
<th>{{i18n 'user.invited.redeemed_at'}}</th>
{{#if model.can_see_invite_details}}
<th>{{i18n 'user.last_seen'}}</th>
<th>{{i18n 'user.invited.topics_entered'}}</th>
<th>{{i18n 'user.invited.posts_read_count'}}</th>
<th>{{i18n 'user.invited.time_read'}}</th>
<th>{{i18n 'user.invited.days_visited'}}</th>
{{/if}}
{{else}}
<th colspan="1">{{i18n 'user.invited.user'}}</th>
<th colspan="6">{{i18n 'user.invited.sent'}}</th>
{{/if}}
</tr>
{{#each model.invites as |invite|}}
<tbody>
<tr>
{{#if invite.user}}
<td>
{{#link-to 'user' invite.user}}{{avatar invite.user imageSize="tiny"}}{{/link-to}}
{{#link-to 'user' invite.user}}{{invite.user.username}}{{/link-to}}
</td>
<td>{{format-date invite.redeemed_at}}</td>
{{#if inviteRedeemed}}
<th>{{i18n 'user.invited.user'}}</th>
<th>{{i18n 'user.invited.redeemed_at'}}</th>
{{#if model.can_see_invite_details}}
<td>{{format-date invite.user.last_seen_at}}</td>
<td>{{number invite.user.topics_entered}}</td>
<td>{{number invite.user.posts_read_count}}</td>
<td>{{{format-duration invite.user.time_read}}}</td>
<td>
<span title="{{i18n 'user.invited.days_visited'}}">{{{unbound invite.user.days_visited}}}</span>
/
<span title="{{i18n 'user.invited.account_age_days'}}">{{{unbound invite.user.days_since_created}}}</span>
</td>
<th>{{i18n 'user.last_seen'}}</th>
<th>{{i18n 'user.invited.topics_entered'}}</th>
<th>{{i18n 'user.invited.posts_read_count'}}</th>
<th>{{i18n 'user.invited.time_read'}}</th>
<th>{{i18n 'user.invited.days_visited'}}</th>
{{/if}}
{{else}}
<td>{{unbound invite.email}}</td>
<td>{{format-date invite.updated_at}}</td>
<td>
{{#if invite.expired}}
<div>{{i18n 'user.invited.expired'}}</div>
{{/if}}
{{#if invite.rescinded}}
{{i18n 'user.invited.rescinded'}}
{{else}}
{{d-button icon="times" action=(action "rescind") actionParam=invite label="user.invited.rescind"}}
{{/if}}
</td>
<td>
{{#if invite.reinvited}}
<div>{{i18n 'user.invited.reinvited'}}</div>
{{else}}
{{d-button icon="sync" action=(action "reinvite") actionParam=invite label="user.invited.reinvite"}}
{{/if}}
</td>
<th colspan="1">{{i18n 'user.invited.user'}}</th>
<th colspan="6">{{i18n 'user.invited.sent'}}</th>
{{/if}}
</tr>
{{/each}}
{{#each model.invites as |invite|}}
<tr>
{{#if invite.user}}
<td>
{{#link-to 'user' invite.user}}{{avatar invite.user imageSize="tiny"}}{{/link-to}}
{{#link-to 'user' invite.user}}{{invite.user.username}}{{/link-to}}
</td>
<td>{{format-date invite.redeemed_at}}</td>
{{#if model.can_see_invite_details}}
<td>{{format-date invite.user.last_seen_at}}</td>
<td>{{number invite.user.topics_entered}}</td>
<td>{{number invite.user.posts_read_count}}</td>
<td>{{{format-duration invite.user.time_read}}}</td>
<td>
<span title="{{i18n 'user.invited.days_visited'}}">{{{unbound invite.user.days_visited}}}</span>
/
<span title="{{i18n 'user.invited.account_age_days'}}">{{{unbound invite.user.days_since_created}}}</span>
</td>
{{/if}}
{{else}}
<td>{{unbound invite.email}}</td>
<td>{{format-date invite.updated_at}}</td>
<td>
{{#if invite.expired}}
<div>{{i18n 'user.invited.expired'}}</div>
{{/if}}
{{#if invite.rescinded}}
{{i18n 'user.invited.rescinded'}}
{{else}}
{{d-button icon="times" action=(action "rescind") actionParam=invite label="user.invited.rescind"}}
{{/if}}
</td>
<td>
{{#if invite.reinvited}}
<div>{{i18n 'user.invited.reinvited'}}</div>
{{else}}
{{d-button icon="sync" action=(action "reinvite") actionParam=invite label="user.invited.reinvite"}}
{{/if}}
</td>
{{/if}}
</tr>
{{/each}}
</tbody>
</table>
{{conditional-loading-spinner condition=invitesLoading}}