discourse/app/assets/javascripts/admin/templates/users-list-show.hbs

115 lines
3.9 KiB
Handlebars
Raw Normal View History

{{#if hasSelection}}
<div id='selected-controls'>
<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>
</div>
{{/if}}
<div class="admin-title">
<h2>{{title}}</h2>
</div>
<div class='username controls'>
{{text-field value=listFilter placeholder=searchHint}}
{{#unless showEmails}}
<div class="pull-right">
<button {{action "showEmails"}} class="show-emails btn">{{i18n 'admin.users.show_emails'}}</button>
</div>
{{/unless}}
</div>
2015-04-28 17:05:06 -04:00
{{#conditional-loading-spinner condition=refreshing}}
{{#if model}}
<table class='table users-list'>
<thead>
{{#if showApproval}}
<th>{{input type="checkbox" checked=selectAll}}</th>
{{/if}}
<th>&nbsp;</th>
<th>{{i18n 'username'}}</th>
<th class='email-heading'>{{i18n 'email'}}</th>
<th>{{i18n 'admin.users.last_emailed'}}</th>
{{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 showApproval}}
<th>{{i18n 'admin.users.approved'}}</th>
{{/if}}
<th>&nbsp;</th>
</thead>
<tbody>
{{#each model as |user|}}
<tr class="user {{user.selected}} {{unless user.active 'not-activated'}}">
{{#if showApproval}}
<td>
2014-11-26 19:02:54 -05:00
{{#if user.can_approve}}
{{input type="checkbox" checked=user.selected}}
{{/if}}
</td>
{{/if}}
<td>
<a href="{{unbound user.path}}" data-user-card="{{unbound user.username}}">
{{avatar user imageSize="small"}}
</a>
</td>
<td class="username">
{{#link-to 'adminUser' user}}{{unbound user.username}}{{/link-to}}
{{#if user.staged}}
{{d-icon "envelope-o" title="user.staged" }}
{{/if}}
</td>
<td class='email'>
{{unbound user.email}}
</td>
<td>
{{{format-duration user.last_emailed_age}}}
</td>
<td>
{{{format-duration user.last_seen_age}}}
</td>
<td>
{{number user.topics_entered}}
</td>
<td>
{{number user.posts_read_count}}
</td>
<td>
{{{format-duration user.time_read}}}
</td>
<td>
{{{format-duration user.created_at_age}}}
</td>
{{#if showApproval}}
<td>
{{#if user.approved}}
{{i18n 'yes_value'}}
{{else}}
{{i18n 'no_value'}}
{{/if}}
</td>
{{/if}}
<td>
{{#if user.admin}}
{{d-icon "shield" title="admin.title" }}
{{/if}}
{{#if user.moderator}}
{{d-icon "shield" 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}}
2015-04-28 17:05:06 -04:00
{{/conditional-loading-spinner}}