mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 09:42:07 +08:00
b58867b6e9
Includes support for flags, reviewable users and queued posts, with REST API backwards compatibility. Co-Authored-By: romanrizzi <romanalejandro@gmail.com> Co-Authored-By: jjaffeux <j.jaffeux@gmail.com>
98 lines
4.1 KiB
Handlebars
98 lines
4.1 KiB
Handlebars
<div class="admin-title">
|
|
<h2>{{title}}</h2>
|
|
{{#if canCheckEmails}}
|
|
{{#if showEmails}}
|
|
<button {{action "toggleEmailVisibility"}} class="hide-emails btn btn-default">{{i18n 'admin.users.hide_emails'}}</button>
|
|
{{else}}
|
|
<button {{action "toggleEmailVisibility"}} class="show-emails btn btn-default">{{i18n 'admin.users.show_emails'}}</button>
|
|
{{/if}}
|
|
{{/if}}
|
|
</div>
|
|
<div class='username controls'>
|
|
{{text-field value=listFilter placeholder=searchHint}}
|
|
|
|
</div>
|
|
|
|
{{#conditional-loading-spinner condition=refreshing}}
|
|
{{#if model}}
|
|
<table class='table users-list grid'>
|
|
<thead>
|
|
{{admin-directory-toggle field="username" i18nKey='username' order=order ascending=ascending}}
|
|
{{admin-directory-toggle field="email" i18nKey='email' order=order ascending=ascending}}
|
|
{{admin-directory-toggle field="last_emailed" i18nKey='admin.users.last_emailed' order=order ascending=ascending}}
|
|
{{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}}
|
|
{{#if siteSettings.must_approve_users}}
|
|
<th>{{i18n 'admin.users.approved'}}</th>
|
|
{{/if}}
|
|
<th> </th>
|
|
</thead>
|
|
<tbody>
|
|
{{#each model as |user|}}
|
|
<tr class="user {{user.selected}} {{unless user.active 'not-activated'}}">
|
|
<td class="username">
|
|
<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}}
|
|
{{#if user.staged}}
|
|
{{d-icon "far-envelope" title="user.staged" }}
|
|
{{/if}}
|
|
</td>
|
|
<td class='email'>
|
|
{{~unbound user.email~}}
|
|
</td>
|
|
<td class="last-emailed">
|
|
<div class="label">{{i18n 'admin.users.last_emailed'}}</div>
|
|
<div>{{{format-duration user.last_emailed_age}}}</div>
|
|
</td>
|
|
<td class="last-seen">
|
|
<div class="label">{{i18n 'last_seen'}}</div>
|
|
<div>{{{format-duration user.last_seen_age}}}</div>
|
|
</td>
|
|
<td class="topics-entered">
|
|
<div class="label">{{i18n 'admin.user.topics_entered'}}</div>
|
|
<div>{{number user.topics_entered}}</div>
|
|
</td>
|
|
<td class="posts-read">
|
|
<div class="label">{{i18n 'admin.user.posts_read_count'}}</div>
|
|
<div>{{number user.posts_read_count}}</div>
|
|
</td>
|
|
<td class="time-read">
|
|
<div class="label">{{i18n 'admin.user.time_read'}}</div>
|
|
<div>{{{format-duration user.time_read}}}</div>
|
|
</td>
|
|
|
|
<td class="created">
|
|
<div class="label">{{i18n 'created'}}</div>
|
|
<div>{{{format-duration user.created_at_age}}}</div>
|
|
</td>
|
|
|
|
{{#if siteSettings.must_approve_users}}
|
|
<td>{{i18n-yes-no user.approved}}</td>
|
|
{{/if}}
|
|
|
|
<td class="user-status">
|
|
{{#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}}
|
|
</td>
|
|
</tr>
|
|
{{/each}}
|
|
</tbody>
|
|
</table>
|
|
|
|
{{else}}
|
|
<p>{{i18n 'search.no_results'}}</p>
|
|
{{/if}}
|
|
{{/conditional-loading-spinner}}
|