2014-03-19 22:27:21 +08:00
|
|
|
<div class='admin-controls'>
|
|
|
|
<div class='span15'>
|
|
|
|
<ul class='nav nav-pills'>
|
|
|
|
<li>{{#link-to 'adminUser' user}}<i class="fa fa-caret-left"></i> {{user.username}}{{/link-to}}</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2014-11-13 04:10:36 +08:00
|
|
|
{{#loading-spinner condition=loading}}
|
2014-03-19 22:27:21 +08:00
|
|
|
<div class='admin-container user-badges'>
|
2014-12-09 05:35:49 +08:00
|
|
|
<h2>{{i18n 'admin.badges.grant_badge'}}</h2>
|
2014-03-19 22:27:21 +08:00
|
|
|
{{#if noBadges}}
|
2014-12-09 05:35:49 +08:00
|
|
|
<p>{{i18n 'admin.badges.no_badges'}}</p>
|
2014-03-19 22:27:21 +08:00
|
|
|
{{else}}
|
|
|
|
<br>
|
2014-06-11 22:57:30 +08:00
|
|
|
{{combo-box valueAttribute="id" value=controller.selectedBadgeId content=controller.grantableBadges}}
|
2014-12-09 05:35:49 +08:00
|
|
|
<button class='btn btn-primary' {{action "grantBadge" controller.selectedBadgeId}}>{{i18n 'admin.badges.grant'}}</button>
|
2014-03-19 22:27:21 +08:00
|
|
|
{{/if}}
|
|
|
|
|
|
|
|
<br>
|
|
|
|
<br>
|
|
|
|
|
2014-12-09 05:35:49 +08:00
|
|
|
<h2>{{i18n 'admin.badges.granted_badges'}}</h2>
|
2014-03-19 22:27:21 +08:00
|
|
|
<br>
|
|
|
|
|
|
|
|
<table>
|
|
|
|
<tr>
|
2014-12-09 05:35:49 +08:00
|
|
|
<th>{{i18n 'admin.badges.badge'}}</th>
|
|
|
|
<th>{{i18n 'admin.badges.granted_by'}}</th>
|
|
|
|
<th>{{i18n 'admin.badges.granted_at'}}</th>
|
2014-03-19 22:27:21 +08:00
|
|
|
<th></th>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
{{#each}}
|
|
|
|
<tr>
|
2014-04-22 17:43:26 +08:00
|
|
|
<td>{{user-badge badge=badge}}</td>
|
2014-03-19 22:27:21 +08:00
|
|
|
<td>
|
|
|
|
{{#link-to 'adminUser' badge.granted_by}}
|
|
|
|
{{avatar granted_by imageSize="tiny"}}
|
|
|
|
{{granted_by.username}}
|
|
|
|
{{/link-to}}
|
|
|
|
</td>
|
2014-06-11 01:04:31 +08:00
|
|
|
<td>{{age-with-tooltip granted_at}}</td>
|
2014-03-19 22:27:21 +08:00
|
|
|
<td>
|
2014-12-09 05:35:49 +08:00
|
|
|
<button class='btn' {{action "revokeBadge" this}}>{{i18n 'admin.badges.revoke'}}</button>
|
2014-03-19 22:27:21 +08:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{else}}
|
|
|
|
<tr>
|
|
|
|
<td colspan="5">
|
2014-12-09 05:35:49 +08:00
|
|
|
<p>{{i18n 'admin.badges.no_user_badges' name=user.username}}</p>
|
2014-03-19 22:27:21 +08:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{/each}}
|
|
|
|
</table>
|
|
|
|
</div>
|
2014-11-13 04:10:36 +08:00
|
|
|
{{/loading-spinner}}
|