discourse/app/assets/javascripts/admin/templates/api.js.handlebars
2013-10-22 17:34:39 -04:00

33 lines
862 B
Handlebars

{{#if model}}
<table class='api-keys'>
<tr>
<th>{{i18n admin.api.key}}</th>
<th>{{i18n admin.api.user}}</th>
<th>&nbsp;</th>
</tr>
{{#each model}}
<tr>
<td class='key'>{{key}}</td>
<td>
{{#if user}}
{{#link-to 'adminUser' user}}
{{avatar user imageSize="small"}}
{{/link-to}}
{{else}}
{{i18n admin.api.all_users}}
{{/if}}
</td>
<td>
<button class='btn' {{action regenerateKey this}}>{{i18n admin.api.regenerate}}</button>
<button class='btn' {{action revokeKey this}}>{{i18n admin.api.revoke}}</button>
</td>
</tr>
{{/each}}
</table>
{{else}}
<p>{{i18n admin.api.none}}</p>
{{/if}}
{{#unless hasMasterKey}}
<button class='btn' {{action generateMasterKey}}>{{i18n admin.api.generate_master}}</button>
{{/unless }}