2020-07-01 15:22:07 +08:00

101 lines
3.9 KiB
Handlebars

<div class="widget-box transparent" style="padding-top: 2px; border: 1px solid #ddd;">
{{#grid-header}}
{{#has-perm 'PERM_VIEW_TENANT_CREATE'}}
<li>
{{#link-to 'tenant.create'}}
<i class="ace-icon fa fa-plus-circle bigger-110 green"></i>
新建租户
{{/link-to}}
</li>
{{/has-perm}}
{{/grid-header}}
<div class="widget-body">
<!-- #section:custom/scrollbar -->
<div class="widget-main no-padding">
<table class="table table-striped table-bordered table-hover dataTable">
<thead class="thin-border-bottom">
<tr>
<th>
名称
</th>
<th>
编码
</th>
<th>
</th>
<th>
Access Key
</th>
<th>
Access Secret
</th>
<th>
<i class="ace-icon fa fa-sticky-note-o bigger-110"></i>
备注
</th>
<th>
<i class="ace-icon fa fa-exchange bigger-110 hidden-480"></i>
{{th-filter name='active'
text='状态'
dialog-title='状态'
options=(array (hash value=true text='启用')
(hash value=false text='禁用'))
}}
</th>
<th>
<i class="ace-icon fa fa-cogs bigger-110 hidden-480"></i>
管理
</th>
</tr>
</thead>
<tbody>
{{#each model.data as |it|}}
<tr>
<td>
{{it.name}}
</td>
<td>
{{it.code}}
</td>
<td>
{{it.realm}}
</td>
<td>
{{it.accessKey}}
</td>
<td>
{{if it.showAccessSecret it.accessSecret '****************'}}
</td>
<td>
{{editable-cell model=it field='note'}}
</td>
<td>
{{status-cell model=it}}
</td>
<td>
<div class="btn-group">
{{status-toggle-button model=it}}
{{#a-btn class="btn btn-xs btn-success"
title='切换显示密码'
click=(route-action 'toggleAccessSecretVisible' it)
}}
<i class="ace-icon fa fa-{{if it.showAccessSecret 'eye-slash' 'eye'}} bigger-120"></i>
{{/a-btn}}
{{edit-btn route-name='tenant.edit' model-id=it.id perm='PERM_VIEW_TENANT_EDIT'}}
{{#unless it.active}}
{{delete-button model=it}}
{{/unless}}
</div>
</td>
</tr>
{{/each}}
</tbody>
</table>
</div>
{{pagination-bar}}
</div>
</div>