2014-11-26 13:05:49 -05:00
|
|
|
{{#if hasSelection}}
|
|
|
|
<div id='selected-controls'>
|
2015-05-12 10:41:31 -04:00
|
|
|
<button {{action "approveUsers"}} class='btn'>{{count-i18n key="admin.users.approved_selected" count=selectedCount}}</button>
|
|
|
|
<button {{action "rejectUsers"}} class='btn btn-danger'>{{count-i18n key="admin.users.reject_selected" count=selectedCount}}</button>
|
2014-11-26 13:05:49 -05:00
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
|
|
|
|
<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}}
|
2018-10-24 16:09:36 -04:00
|
|
|
<button {{action "showEmails"}} class="show-emails btn btn-default">{{i18n 'admin.users.show_emails'}}</button>
|
2018-12-19 04:24:57 -05:00
|
|
|
{{/if}}
|
2014-11-26 13:05:49 -05:00
|
|
|
</div>
|
2018-07-02 23:14:53 -04:00
|
|
|
<div class='username controls'>
|
|
|
|
{{text-field value=listFilter placeholder=searchHint}}
|
|
|
|
|
|
|
|
</div>
|
2014-11-26 13:05:49 -05:00
|
|
|
|
2015-04-28 17:05:06 -04:00
|
|
|
{{#conditional-loading-spinner condition=refreshing}}
|
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>
|
2014-11-26 13:05:49 -05:00
|
|
|
{{#if showApproval}}
|
|
|
|
<th>{{input type="checkbox" checked=selectAll}}</th>
|
|
|
|
{{/if}}
|
2014-12-08 16:35:49 -05:00
|
|
|
<th>{{i18n 'username'}}</th>
|
2017-10-23 16:06:05 -04:00
|
|
|
<th class='email-heading'>{{i18n 'email'}}</th>
|
2014-12-08 16:35:49 -05:00
|
|
|
<th>{{i18n 'admin.users.last_emailed'}}</th>
|
2017-02-20 08:42:33 -05:00
|
|
|
{{admin-directory-toggle field="seen" i18nKey='last_seen' order=order ascending=ascending}}
|
|
|
|
{{admin-directory-toggle field="topics_viewed" i18nKey="admin.user.topics_entered" order=order ascending=ascending}}
|
|
|
|
{{admin-directory-toggle field="posts_read" i18nKey="admin.user.posts_read_count" order=order ascending=ascending}}
|
|
|
|
{{admin-directory-toggle field="read_time" i18nKey="admin.user.time_read" order=order ascending=ascending}}
|
|
|
|
{{admin-directory-toggle field="created" i18nKey="created" order=order ascending=ascending}}
|
2014-11-26 13:05:49 -05:00
|
|
|
{{#if showApproval}}
|
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'}}">
|
|
|
|
{{#if showApproval}}
|
2018-07-02 23:14:53 -04:00
|
|
|
<td class="approval">
|
2014-11-26 19:02:54 -05:00
|
|
|
{{#if user.can_approve}}
|
2014-12-02 15:30:57 -05:00
|
|
|
{{input type="checkbox" checked=user.selected}}
|
2014-11-26 13:05:49 -05:00
|
|
|
{{/if}}
|
|
|
|
</td>
|
2017-02-20 08:42:33 -05:00
|
|
|
{{/if}}
|
2018-07-02 23:14:53 -04:00
|
|
|
<td class="username">
|
2017-02-20 08:42:33 -05:00
|
|
|
<a href="{{unbound user.path}}" data-user-card="{{unbound user.username}}">
|
|
|
|
{{avatar user imageSize="small"}}
|
|
|
|
</a>
|
|
|
|
{{#link-to 'adminUser' user}}{{unbound user.username}}{{/link-to}}
|
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>
|
|
|
|
<td class='email'>
|
2018-07-02 23:14:53 -04:00
|
|
|
{{~unbound user.email~}}
|
2017-02-20 08:42:33 -05:00
|
|
|
</td>
|
2018-07-02 23:14:53 -04:00
|
|
|
<td class="last-emailed">
|
|
|
|
<div class="label">{{i18n 'admin.users.last_emailed'}}</div>
|
|
|
|
<div>{{{format-duration user.last_emailed_age}}}</div>
|
2017-02-20 08:42:33 -05:00
|
|
|
</td>
|
2018-07-02 23:14:53 -04:00
|
|
|
<td class="last-seen">
|
|
|
|
<div class="label">{{i18n 'last_seen'}}</div>
|
|
|
|
<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>
|
|
|
|
<div>{{{format-duration user.time_read}}}</div>
|
2017-02-20 08:42:33 -05:00
|
|
|
</td>
|
2014-11-26 13:05:49 -05:00
|
|
|
|
2018-07-02 23:14:53 -04:00
|
|
|
<td class="created">
|
|
|
|
<div class="label">{{i18n 'created'}}</div>
|
|
|
|
<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
|
|
|
|
2017-02-20 08:42:33 -05:00
|
|
|
{{#if showApproval}}
|
|
|
|
<td>
|
|
|
|
{{#if user.approved}}
|
|
|
|
{{i18n 'yes_value'}}
|
|
|
|
{{else}}
|
|
|
|
{{i18n 'no_value'}}
|
|
|
|
{{/if}}
|
|
|
|
</td>
|
2014-11-26 13:05:49 -05:00
|
|
|
{{/if}}
|
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}}
|
2017-02-20 08:42:33 -05:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{/each}}
|
|
|
|
</tbody>
|
2014-11-26 13:05:49 -05:00
|
|
|
</table>
|
2017-02-20 08:42:33 -05:00
|
|
|
|
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}}
|
2015-04-28 17:05:06 -04:00
|
|
|
{{/conditional-loading-spinner}}
|