2014-11-26 13:05:49 -05:00
|
|
|
<div class="admin-title">
|
2017-10-23 16:06:05 -04:00
|
|
|
<h2>{{title}}</h2>
|
2018-12-19 04:24:57 -05:00
|
|
|
{{#if canCheckEmails}}
|
2019-11-04 05:23:54 -05:00
|
|
|
{{#if 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-06-30 06:30:50 -04:00
|
|
|
<TextField @value={{listFilter}} @placeholder={{searchHint}} @title={{searchHint}} />
|
2018-07-02 23:14:53 -04:00
|
|
|
</div>
|
2014-11-26 13:05:49 -05:00
|
|
|
|
2022-06-30 06:30:50 -04:00
|
|
|
<LoadMore @class="users-list-container" @selector=".users-list tr" @action={{action "loadMore"}}>
|
2014-11-26 13:05:49 -05:00
|
|
|
{{#if model}}
|
2018-07-02 23:14:53 -04:00
|
|
|
<table class="table users-list grid">
|
2017-02-20 08:42:33 -05:00
|
|
|
<thead>
|
2022-06-30 06:30:50 -04:00
|
|
|
<TableHeaderToggle @field="username" @labelKey="username" @order={{order}} @asc={{asc}} @automatic={{true}} />
|
|
|
|
<TableHeaderToggle @class={{if showEmails "" "hidden"}} @field="email" @labelKey="email" @order={{order}} @asc={{asc}} @automatic={{true}} />
|
|
|
|
<TableHeaderToggle @field="last_emailed" @labelKey="admin.users.last_emailed" @order={{order}} @asc={{asc}} @automatic={{true}} />
|
|
|
|
<TableHeaderToggle @field="seen" @labelKey="last_seen" @order={{order}} @asc={{asc}} @automatic={{true}} />
|
|
|
|
<TableHeaderToggle @field="topics_viewed" @labelKey="admin.user.topics_entered" @order={{order}} @asc={{asc}} @automatic={{true}} />
|
|
|
|
<TableHeaderToggle @field="posts_read" @labelKey="admin.user.posts_read_count" @order={{order}} @asc={{asc}} @automatic={{true}} />
|
|
|
|
<TableHeaderToggle @field="read_time" @labelKey="admin.user.time_read" @order={{order}} @asc={{asc}} @automatic={{true}} />
|
|
|
|
<TableHeaderToggle @field="created" @labelKey="created" @order={{order}} @asc={{asc}} @automatic={{true}} />
|
2019-01-03 12:03:01 -05:00
|
|
|
{{#if siteSettings.must_approve_users}}
|
2014-12-08 16:35:49 -05:00
|
|
|
<th>{{i18n "admin.users.approved"}}</th>
|
2014-11-26 13:05:49 -05:00
|
|
|
{{/if}}
|
|
|
|
<th> </th>
|
2017-02-20 08:42:33 -05:00
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{{#each model as |user|}}
|
|
|
|
<tr class="user {{user.selected}} {{unless user.active "not-activated"}}">
|
2018-07-02 23:14:53 -04:00
|
|
|
<td class="username">
|
2020-03-09 10:28:31 -04:00
|
|
|
<a href={{user.path}} data-user-card={{user.username}}>
|
2017-02-20 08:42:33 -05:00
|
|
|
{{avatar user imageSize="small"}}
|
|
|
|
</a>
|
2022-06-30 06:30:50 -04: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}}
|
2017-02-20 08:42:33 -05:00
|
|
|
</td>
|
2021-06-23 13:42:16 -04:00
|
|
|
<td class="email {{if showEmails "" "hidden"}}">
|
2020-03-09 10:28:31 -04:00
|
|
|
{{~user.email~}}
|
2017-02-20 08:42:33 -05:00
|
|
|
</td>
|
2021-08-02 08:54:05 -04:00
|
|
|
|
|
|
|
{{#if user.last_emailed_at}}
|
|
|
|
<td class="last-emailed" title={{raw-date user.last_emailed_at}}>
|
|
|
|
<div class="label">{{i18n "admin.users.last_emailed"}}</div>
|
|
|
|
<div>{{format-duration user.last_emailed_age}}</div>
|
|
|
|
</td>
|
|
|
|
{{else}}
|
|
|
|
<td class="last-emailed">
|
|
|
|
<div class="label">{{i18n "admin.users.last_emailed"}}</div>
|
|
|
|
<div>{{format-duration user.last_emailed_age}}</div>
|
|
|
|
</td>
|
|
|
|
{{/if}}
|
|
|
|
|
|
|
|
<td class="last-seen" title={{raw-date user.last_seen_at}}>
|
2018-07-02 23:14:53 -04:00
|
|
|
<div class="label">{{i18n "last_seen"}}</div>
|
2020-03-11 04:23:10 -04:00
|
|
|
<div>{{format-duration user.last_seen_age}}</div>
|
2017-02-20 08:42:33 -05:00
|
|
|
</td>
|
2018-07-02 23:14:53 -04:00
|
|
|
<td class="topics-entered">
|
|
|
|
<div class="label">{{i18n "admin.user.topics_entered"}}</div>
|
|
|
|
<div>{{number user.topics_entered}}</div>
|
2017-02-20 08:42:33 -05:00
|
|
|
</td>
|
2018-07-02 23:14:53 -04:00
|
|
|
<td class="posts-read">
|
|
|
|
<div class="label">{{i18n "admin.user.posts_read_count"}}</div>
|
|
|
|
<div>{{number user.posts_read_count}}</div>
|
2017-02-20 08:42:33 -05:00
|
|
|
</td>
|
2018-07-02 23:14:53 -04:00
|
|
|
<td class="time-read">
|
|
|
|
<div class="label">{{i18n "admin.user.time_read"}}</div>
|
2020-03-11 04:23:10 -04:00
|
|
|
<div>{{format-duration user.time_read}}</div>
|
2017-02-20 08:42:33 -05:00
|
|
|
</td>
|
2014-11-26 13:05:49 -05:00
|
|
|
|
2021-08-02 08:54:05 -04:00
|
|
|
<td class="created" title={{raw-date user.created_at}}>
|
2018-07-02 23:14:53 -04:00
|
|
|
<div class="label">{{i18n "created"}}</div>
|
2020-03-11 04:23:10 -04:00
|
|
|
<div>{{format-duration user.created_at_age}}</div>
|
2017-02-20 08:42:33 -05:00
|
|
|
</td>
|
2014-11-26 13:05:49 -05:00
|
|
|
|
2019-01-03 12:03:01 -05:00
|
|
|
{{#if siteSettings.must_approve_users}}
|
|
|
|
<td>{{i18n-yes-no user.approved}}</td>
|
2014-11-26 13:05:49 -05:00
|
|
|
{{/if}}
|
2019-01-03 12:03:01 -05:00
|
|
|
|
2018-07-02 23:14:53 -04:00
|
|
|
<td class="user-status">
|
2017-02-20 08:42:33 -05:00
|
|
|
{{#if user.admin}}
|
2019-01-21 10:56:05 -05:00
|
|
|
{{d-icon "shield-alt" title="admin.title" }}
|
2017-02-20 08:42:33 -05:00
|
|
|
{{/if}}
|
|
|
|
{{#if user.moderator}}
|
2019-01-21 10:56:05 -05:00
|
|
|
{{d-icon "shield-alt" title="admin.moderator" }}
|
2017-02-20 08:42:33 -05:00
|
|
|
{{/if}}
|
2018-02-21 19:59:11 -05:00
|
|
|
{{#if user.second_factor_enabled}}
|
|
|
|
{{d-icon "lock" title="admin.user.second_factor_enabled" }}
|
|
|
|
{{/if}}
|
2022-06-30 06:30:50 -04:00
|
|
|
<PluginOutlet @name="admin-users-list-icon" @connectorTagName="div" @args={{hash user=user query=query}} />
|
2017-02-20 08:42:33 -05:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{/each}}
|
|
|
|
</tbody>
|
2014-11-26 13:05:49 -05:00
|
|
|
</table>
|
2022-06-30 06:30:50 -04:00
|
|
|
<ConditionalLoadingSpinner @condition={{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>
|