2023-02-28 08:46:40 -05:00
|
|
|
<PluginOutlet @name="admin-users-list-show-before" />
|
|
|
|
|
2014-11-26 13:05:49 -05:00
|
|
|
<div class="admin-title">
|
2022-07-05 13:41:31 -04:00
|
|
|
<h2>{{this.title}}</h2>
|
|
|
|
{{#if this.canCheckEmails}}
|
|
|
|
{{#if this.showEmails}}
|
2022-06-30 06:30:50 -04:00
|
|
|
<DButton
|
|
|
|
@action={{action "toggleEmailVisibility"}}
|
|
|
|
@class="hide-emails btn-default"
|
|
|
|
@label="admin.users.hide_emails"
|
|
|
|
/>
|
2019-11-04 05:23:54 -05:00
|
|
|
{{else}}
|
2022-06-30 06:30:50 -04:00
|
|
|
<DButton
|
|
|
|
@action={{action "toggleEmailVisibility"}}
|
|
|
|
@class="show-emails btn-default"
|
|
|
|
@label="admin.users.show_emails"
|
|
|
|
/>
|
2019-11-04 05:23:54 -05:00
|
|
|
{{/if}}
|
2018-12-19 04:24:57 -05:00
|
|
|
{{/if}}
|
2014-11-26 13:05:49 -05:00
|
|
|
</div>
|
2019-11-04 05:23:54 -05:00
|
|
|
|
2018-07-02 23:14:53 -04:00
|
|
|
<div class="username controls">
|
2022-07-05 13:41:31 -04:00
|
|
|
<TextField
|
|
|
|
@value={{this.listFilter}}
|
|
|
|
@placeholder={{this.searchHint}}
|
|
|
|
@title={{this.searchHint}}
|
|
|
|
/>
|
2018-07-02 23:14:53 -04:00
|
|
|
</div>
|
2022-06-30 06:30:50 -04:00
|
|
|
<LoadMore
|
|
|
|
@class="users-list-container"
|
|
|
|
@selector=".users-list tr"
|
|
|
|
@action={{action "loadMore"}}
|
|
|
|
>
|
2022-07-05 13:41:31 -04:00
|
|
|
{{#if this.model}}
|
2022-10-13 22:32:48 -04:00
|
|
|
|
2023-03-02 09:20:38 -05:00
|
|
|
<ResponsiveTable
|
|
|
|
@className="users-list"
|
|
|
|
@aria-label={{this.title}}
|
|
|
|
@style={{html-safe
|
|
|
|
(concat
|
|
|
|
"grid-template-columns: minmax(min-content, 2fr) repeat("
|
|
|
|
(html-safe this.columnCount)
|
|
|
|
", minmax(min-content, 1fr))"
|
|
|
|
)
|
|
|
|
}}
|
|
|
|
@updates={{this.model.email}}
|
|
|
|
>
|
|
|
|
|
|
|
|
<:header>
|
|
|
|
<TableHeaderToggle
|
|
|
|
@class="directory-table__column-header--username"
|
|
|
|
@field="username"
|
|
|
|
@labelKey="username"
|
|
|
|
@order={{this.order}}
|
|
|
|
@asc={{this.asc}}
|
|
|
|
@automatic={{true}}
|
|
|
|
/>
|
|
|
|
<TableHeaderToggle
|
|
|
|
@class={{if
|
|
|
|
this.showEmails
|
|
|
|
"directory-table__column-header--email"
|
|
|
|
"hidden"
|
|
|
|
}}
|
|
|
|
@field="email"
|
|
|
|
@labelKey="email"
|
|
|
|
@order={{this.order}}
|
|
|
|
@asc={{this.asc}}
|
|
|
|
@automatic={{true}}
|
|
|
|
/>
|
|
|
|
<TableHeaderToggle
|
|
|
|
@field="last_emailed"
|
|
|
|
@labelKey="admin.users.last_emailed"
|
|
|
|
@order={{this.order}}
|
|
|
|
@asc={{this.asc}}
|
|
|
|
@automatic={{true}}
|
|
|
|
/>
|
|
|
|
<TableHeaderToggle
|
|
|
|
@field="seen"
|
|
|
|
@labelKey="last_seen"
|
|
|
|
@order={{this.order}}
|
|
|
|
@asc={{this.asc}}
|
|
|
|
@automatic={{true}}
|
|
|
|
/>
|
|
|
|
<TableHeaderToggle
|
|
|
|
@field="topics_viewed"
|
|
|
|
@labelKey="admin.user.topics_entered"
|
|
|
|
@order={{this.order}}
|
|
|
|
@asc={{this.asc}}
|
|
|
|
@automatic={{true}}
|
|
|
|
/>
|
|
|
|
<TableHeaderToggle
|
|
|
|
@field="posts_read"
|
|
|
|
@labelKey="admin.user.posts_read_count"
|
|
|
|
@order={{this.order}}
|
|
|
|
@asc={{this.asc}}
|
|
|
|
@automatic={{true}}
|
|
|
|
/>
|
|
|
|
<TableHeaderToggle
|
|
|
|
@field="read_time"
|
|
|
|
@labelKey="admin.user.time_read"
|
|
|
|
@order={{this.order}}
|
|
|
|
@asc={{this.asc}}
|
|
|
|
@automatic={{true}}
|
|
|
|
/>
|
|
|
|
<TableHeaderToggle
|
|
|
|
@field="created"
|
|
|
|
@labelKey="created"
|
|
|
|
@order={{this.order}}
|
|
|
|
@asc={{this.asc}}
|
|
|
|
@automatic={{true}}
|
|
|
|
/>
|
|
|
|
<PluginOutlet
|
|
|
|
@name="admin-users-list-thead-after"
|
|
|
|
@outletArgs={{hash order=this.order asc=this.asc}}
|
|
|
|
/>
|
|
|
|
|
|
|
|
{{#if this.siteSettings.must_approve_users}}
|
|
|
|
<div class="directory-table__column-header">{{i18n
|
|
|
|
"admin.users.approved"
|
|
|
|
}}</div>
|
|
|
|
{{/if}}
|
|
|
|
<div class="directory-table__column-header"> </div>
|
|
|
|
|
|
|
|
</:header>
|
|
|
|
|
|
|
|
<:body>
|
2022-07-05 13:41:31 -04:00
|
|
|
{{#each this.model as |user|}}
|
2023-03-02 09:20:38 -05:00
|
|
|
<div
|
2017-02-20 08:42:33 -05:00
|
|
|
class="user
|
|
|
|
{{user.selected}}
|
2023-03-02 09:20:38 -05:00
|
|
|
{{unless user.active 'not-activated'}}
|
|
|
|
directory-table__row"
|
2017-02-20 08:42:33 -05:00
|
|
|
>
|
2023-03-02 09:20:38 -05:00
|
|
|
<div class="directory-table__cell username">
|
|
|
|
<a
|
|
|
|
class="avatar"
|
|
|
|
href={{user.path}}
|
|
|
|
data-user-card={{user.username}}
|
|
|
|
>
|
2017-02-20 08:42:33 -05:00
|
|
|
{{avatar user imageSize="small"}}
|
|
|
|
</a>
|
2023-03-02 09:20:38 -05:00
|
|
|
<LinkTo @route="adminUser" @model={{user}}>
|
|
|
|
{{user.username}}
|
|
|
|
</LinkTo>
|
2017-11-24 16:11:34 -05:00
|
|
|
{{#if user.staged}}
|
2019-01-22 14:42:00 -05:00
|
|
|
{{d-icon "far-envelope" title="user.staged"}}
|
2017-11-24 16:11:34 -05:00
|
|
|
{{/if}}
|
2023-03-02 09:20:38 -05:00
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
class="directory-table__cell email
|
|
|
|
{{if this.showEmails '' 'hidden'}}"
|
|
|
|
>
|
|
|
|
<span class="directory-table__value">
|
|
|
|
{{~user.email~}}
|
|
|
|
</span>
|
|
|
|
</div>
|
2021-08-02 08:54:05 -04:00
|
|
|
|
|
|
|
{{#if user.last_emailed_at}}
|
2023-03-02 09:20:38 -05:00
|
|
|
<div
|
|
|
|
class="directory-table__cell last-emailed"
|
|
|
|
title={{raw-date user.last_emailed_at}}
|
|
|
|
>
|
|
|
|
<span class="directory-table__label">
|
|
|
|
<span>{{i18n "admin.users.last_emailed"}}</span>
|
|
|
|
</span>
|
|
|
|
<span class="directory-table__value">
|
|
|
|
{{format-duration user.last_emailed_age}}
|
|
|
|
</span>
|
|
|
|
</div>
|
2021-08-02 08:54:05 -04:00
|
|
|
{{else}}
|
2023-03-02 09:20:38 -05:00
|
|
|
<div class="directory-table__cell last-emailed">
|
|
|
|
<span class="directory-table__label">
|
|
|
|
<span>{{i18n "admin.users.last_emailed"}}</span>
|
|
|
|
</span>
|
|
|
|
<span class="directory-table__value">
|
|
|
|
{{format-duration user.last_emailed_age}}
|
|
|
|
</span>
|
|
|
|
</div>
|
2021-08-02 08:54:05 -04:00
|
|
|
{{/if}}
|
|
|
|
|
2023-03-02 09:20:38 -05:00
|
|
|
<div
|
|
|
|
class="directory-table__cell last-seen"
|
|
|
|
title={{raw-date user.last_seen_at}}
|
|
|
|
>
|
|
|
|
<span class="directory-table__label">
|
|
|
|
<span>{{i18n "last_seen"}}</span>
|
|
|
|
</span>
|
|
|
|
<span class="directory-table__value">
|
|
|
|
{{format-duration user.last_seen_age}}
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
<div class="directory-table__cell topics-entered">
|
|
|
|
<span class="directory-table__label">
|
|
|
|
<span>{{i18n "admin.user.topics_entered"}}</span>
|
|
|
|
</span>
|
|
|
|
<span class="directory-table__value">
|
|
|
|
{{number user.topics_entered}}
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
<div class="directory-table__cell posts-read">
|
|
|
|
<span class="directory-table__label">
|
|
|
|
<span>{{i18n "admin.user.posts_read_count"}}</span>
|
|
|
|
</span>
|
|
|
|
<span class="directory-table__value">
|
|
|
|
{{number user.posts_read_count}}
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
<div class="directory-table__cell time-read">
|
|
|
|
<span class="directory-table__label">
|
|
|
|
<span>{{i18n "admin.user.time_read"}}</span>
|
|
|
|
</span>
|
|
|
|
<span class="directory-table__value">
|
|
|
|
{{format-duration user.time_read}}
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
class="directory-table__cell created"
|
|
|
|
title={{raw-date user.created_at}}
|
|
|
|
>
|
|
|
|
<span class="directory-table__label">
|
|
|
|
<span>{{i18n "created"}}</span>
|
|
|
|
</span>
|
|
|
|
<span class="directory-table__value">
|
|
|
|
{{format-duration user.created_at_age}}
|
|
|
|
</span>
|
|
|
|
</div>
|
2014-11-26 13:05:49 -05:00
|
|
|
|
2022-10-13 22:32:48 -04:00
|
|
|
<PluginOutlet
|
|
|
|
@name="admin-users-list-td-after"
|
2023-01-31 07:58:31 -05:00
|
|
|
@outletArgs={{hash user=user query=this.query}}
|
2022-10-13 22:32:48 -04:00
|
|
|
/>
|
|
|
|
|
2022-07-05 13:41:31 -04:00
|
|
|
{{#if this.siteSettings.must_approve_users}}
|
2023-03-02 09:20:38 -05:00
|
|
|
<div class="directory-table__cell">
|
|
|
|
<span class="directory-table__label">
|
|
|
|
<span>{{i18n "admin.users.approved"}}</span>
|
|
|
|
</span>
|
|
|
|
<span class="directory-table__value">
|
|
|
|
{{i18n-yes-no user.approved}}
|
|
|
|
</span>
|
|
|
|
</div>
|
2014-11-26 13:05:49 -05:00
|
|
|
{{/if}}
|
2019-01-03 12:03:01 -05:00
|
|
|
|
2023-03-02 09:20:38 -05:00
|
|
|
<div class="directory-table__cell user-status">
|
|
|
|
<span class="directory-table__label">
|
|
|
|
<span>{{i18n "admin.users.status"}}</span>
|
|
|
|
</span>
|
|
|
|
<span class="directory-table__value">
|
|
|
|
{{#if user.admin}}
|
|
|
|
{{d-icon "shield-alt" title="admin.title"}}
|
|
|
|
{{/if}}
|
|
|
|
{{#if user.moderator}}
|
|
|
|
{{d-icon "shield-alt" title="admin.moderator"}}
|
|
|
|
{{/if}}
|
|
|
|
{{#if user.second_factor_enabled}}
|
|
|
|
{{d-icon "lock" title="admin.user.second_factor_enabled"}}
|
|
|
|
{{/if}}
|
|
|
|
</span>
|
2022-07-05 13:41:31 -04:00
|
|
|
<PluginOutlet
|
|
|
|
@name="admin-users-list-icon"
|
|
|
|
@connectorTagName="div"
|
2023-01-31 07:58:31 -05:00
|
|
|
@outletArgs={{hash user=user query=this.query}}
|
2022-07-05 13:41:31 -04:00
|
|
|
/>
|
2023-03-02 09:20:38 -05:00
|
|
|
</div>
|
|
|
|
</div>
|
2017-02-20 08:42:33 -05:00
|
|
|
{{/each}}
|
2023-03-02 09:20:38 -05:00
|
|
|
</:body>
|
|
|
|
|
|
|
|
</ResponsiveTable>
|
|
|
|
|
2022-07-05 13:41:31 -04:00
|
|
|
<ConditionalLoadingSpinner @condition={{this.refreshing}} />
|
2014-11-26 13:05:49 -05:00
|
|
|
{{else}}
|
2014-12-08 16:35:49 -05:00
|
|
|
<p>{{i18n "search.no_results"}}</p>
|
2014-11-26 13:05:49 -05:00
|
|
|
{{/if}}
|
2022-06-30 06:30:50 -04:00
|
|
|
</LoadMore>
|