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

85 lines
2.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">
<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">
<button {{action "showEmails"}} class="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'>
<tr>
{{#if showApproval}}
<th>{{input type="checkbox" checked=selectAll}}</th>
{{/if}}
<th>&nbsp;</th>
<th>{{i18n 'username'}}</th>
<th>{{i18n 'email'}}</th>
<th>{{i18n 'admin.users.last_emailed'}}</th>
<th>{{i18n 'last_seen'}}</th>
<th>{{i18n 'admin.user.topics_entered'}}</th>
<th>{{i18n 'admin.user.posts_read_count'}}</th>
<th>{{i18n 'admin.user.time_read'}}</th>
<th>{{i18n 'created'}}</th>
{{#if showApproval}}
<th>{{i18n 'admin.users.approved'}}</th>
{{/if}}
<th>&nbsp;</th>
</tr>
{{#each model as |user|}}
<tr class="{{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>{{#link-to 'adminUser' user}}{{unbound user.username}}{{/link-to}}</td>
<td>{{{unbound user.email}}}</td>
<td>{{{unbound user.last_emailed_age}}}</td>
<td>{{{unbound user.last_seen_age}}}</td>
<td>{{{unbound user.topics_entered}}}</td>
<td>{{{unbound user.posts_read_count}}}</td>
<td>{{{unbound user.time_read}}}</td>
<td>{{{unbound 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}}<i class="fa fa-shield" title="{{i18n 'admin.title'}}"></i>{{/if}}
{{#if user.moderator}}<i class="fa fa-shield" title="{{i18n 'admin.moderator'}}"></i>{{/if}}
2014-12-05 17:02:52 -05:00
</td>
</tr>
{{/each}}
</table>
{{else}}
<p>{{i18n 'search.no_results'}}</p>
{{/if}}
2015-04-28 17:05:06 -04:00
{{/conditional-loading-spinner}}