2014-11-27 02:05:49 +08:00
|
|
|
{{#if hasSelection}}
|
|
|
|
<div id='selected-controls'>
|
2015-05-12 22:41:31 +08: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-27 02:05:49 +08:00
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
|
|
|
|
<div class="admin-title">
|
|
|
|
<div class="pull-left">
|
|
|
|
<h2>{{title}}</h2>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class='username controls'>
|
|
|
|
{{text-field value=listFilter placeholder=searchHint}}
|
|
|
|
{{#unless showEmails}}
|
|
|
|
<div class="pull-right">
|
2014-12-09 05:35:49 +08:00
|
|
|
<button {{action "showEmails"}} class="btn">{{i18n 'admin.users.show_emails'}}</button>
|
2014-11-27 02:05:49 +08:00
|
|
|
</div>
|
|
|
|
{{/unless}}
|
|
|
|
</div>
|
|
|
|
|
2015-04-29 05:05:06 +08:00
|
|
|
{{#conditional-loading-spinner condition=refreshing}}
|
2014-11-27 02:05:49 +08:00
|
|
|
{{#if model}}
|
2016-08-06 00:01:16 +08:00
|
|
|
<table class='table users-list'>
|
2017-02-20 21:42:33 +08:00
|
|
|
<thead>
|
2014-11-27 02:05:49 +08:00
|
|
|
{{#if showApproval}}
|
|
|
|
<th>{{input type="checkbox" checked=selectAll}}</th>
|
|
|
|
{{/if}}
|
|
|
|
<th> </th>
|
2014-12-09 05:35:49 +08:00
|
|
|
<th>{{i18n 'username'}}</th>
|
|
|
|
<th>{{i18n 'email'}}</th>
|
|
|
|
<th>{{i18n 'admin.users.last_emailed'}}</th>
|
2017-02-20 21:42:33 +08: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-27 02:05:49 +08:00
|
|
|
{{#if showApproval}}
|
2014-12-09 05:35:49 +08:00
|
|
|
<th>{{i18n 'admin.users.approved'}}</th>
|
2014-11-27 02:05:49 +08:00
|
|
|
{{/if}}
|
|
|
|
<th> </th>
|
2017-02-20 21:42:33 +08:00
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{{#each model as |user|}}
|
|
|
|
<tr class="user {{user.selected}} {{unless user.active 'not-activated'}}">
|
|
|
|
{{#if showApproval}}
|
2014-11-27 02:05:49 +08:00
|
|
|
<td>
|
2014-11-27 08:02:54 +08:00
|
|
|
{{#if user.can_approve}}
|
2014-12-03 04:30:57 +08:00
|
|
|
{{input type="checkbox" checked=user.selected}}
|
2014-11-27 02:05:49 +08:00
|
|
|
{{/if}}
|
|
|
|
</td>
|
2017-02-20 21:42:33 +08:00
|
|
|
{{/if}}
|
|
|
|
<td>
|
|
|
|
<a href="{{unbound user.path}}" data-user-card="{{unbound user.username}}">
|
|
|
|
{{avatar user imageSize="small"}}
|
|
|
|
</a>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
{{#link-to 'adminUser' user}}{{unbound user.username}}{{/link-to}}
|
|
|
|
</td>
|
|
|
|
<td class='email'>
|
|
|
|
{{unbound user.email}}
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
{{{unbound user.last_emailed_age}}}
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
{{{unbound user.last_seen_age}}}
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
{{number user.topics_entered}}
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
{{number user.posts_read_count}}
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
{{{unbound user.time_read}}}
|
|
|
|
</td>
|
2014-11-27 02:05:49 +08:00
|
|
|
|
2017-02-20 21:42:33 +08:00
|
|
|
<td>
|
|
|
|
{{{unbound user.created_at_age}}}
|
|
|
|
</td>
|
2014-11-27 02:05:49 +08:00
|
|
|
|
2017-02-20 21:42:33 +08:00
|
|
|
{{#if showApproval}}
|
|
|
|
<td>
|
|
|
|
{{#if user.approved}}
|
|
|
|
{{i18n 'yes_value'}}
|
|
|
|
{{else}}
|
|
|
|
{{i18n 'no_value'}}
|
|
|
|
{{/if}}
|
|
|
|
</td>
|
2014-11-27 02:05:49 +08:00
|
|
|
{{/if}}
|
2017-02-20 21:42:33 +08:00
|
|
|
<td>
|
|
|
|
{{#if user.admin}}
|
|
|
|
{{fa-icon "shield" title="admin.title" }}
|
|
|
|
{{/if}}
|
|
|
|
{{#if user.moderator}}
|
|
|
|
{{fa-icon "shield" title="admin.moderator" }}
|
|
|
|
{{/if}}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{/each}}
|
|
|
|
</tbody>
|
2014-11-27 02:05:49 +08:00
|
|
|
</table>
|
2017-02-20 21:42:33 +08:00
|
|
|
|
2014-11-27 02:05:49 +08:00
|
|
|
{{else}}
|
2014-12-09 05:35:49 +08:00
|
|
|
<p>{{i18n 'search.no_results'}}</p>
|
2014-11-27 02:05:49 +08:00
|
|
|
{{/if}}
|
2015-04-29 05:05:06 +08:00
|
|
|
{{/conditional-loading-spinner}}
|