{$layout}
{$template "menu"}

<table class="ui table selectable">
	<thead>
		<tr>
			<th>用户名</th>
			<th>全名</th>
            <th>允许登录</th>
            <th>OTP认证</th>
			<th class="center width10">状态</th>
			<th class="two op">操作</th>
		</tr>
	</thead>
	<tr v-for="admin in admins">
        <td :class="{disabled:!admin.isOn}"><a :href="'/admins/admin?adminId=' + admin.id">{{admin.username}}</a>
			<div v-if="admin.isSuper" style="margin-top: 0.5em">
				<tiny-basic-label class="olive">超级管理员</tiny-basic-label>
			</div>
		</td>
		<td :class="{disabled:!admin.isOn}">{{admin.fullname}}</td>
        <td>
            <span v-if="admin.canLogin" class="green">Y</span>
            <span v-else class="disabled">N</span>
        </td>
        <td>
            <span v-if="admin.otpLoginIsOn" class="green">Y</span>
            <span v-else class="disabled">N</span>
        </td>
		<td class="center">
			<label-on :v-is-on="admin.isOn"></label-on>
		</td>
		<td>
			<a :href="'/admins/admin?adminId=' + admin.id">详情</a> &nbsp; <a href="" @click.prevent="deleteAdmin(admin.id)">删除</a>
		</td>
	</tr>
</table>

<div class="page" v-html="page"></div>