discourse/app/assets/javascripts/admin/templates/api.hbs

34 lines
940 B
Handlebars
Raw Normal View History

2013-10-23 03:53:08 +08:00
{{#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>
2014-05-17 15:54:20 +08:00
<button class='btn' {{action regenerateKey this}}><i class="fa fa-undo"></i>{{i18n admin.api.regenerate}}</button>
<button class='btn' {{action revokeKey this}}><i class="fa fa-times"></i>{{i18n admin.api.revoke}}</button>
2013-10-23 03:53:08 +08:00
</td>
</tr>
{{/each}}
</table>
2013-03-26 09:04:28 +08:00
{{else}}
2013-10-23 03:53:08 +08:00
<p>{{i18n admin.api.none}}</p>
2013-03-26 09:04:28 +08:00
{{/if}}
2013-10-23 03:53:08 +08:00
{{#unless hasMasterKey}}
2014-05-17 15:57:01 +08:00
<button class='btn' {{action generateMasterKey}}><i class="fa fa-key"></i>{{i18n admin.api.generate_master}}</button>
2013-10-23 03:53:08 +08:00
{{/unless }}