<!-- header start -->
<include file="Public/Header" />
<!-- header end -->

<!-- right content start  -->
<div class="content-right">
	<div class="content">
		<!-- form start -->
		<form class="am-form admin-list" action="{{:U('Admin/Admin/Index')}}" method="POST">
			<div class="am-g">
				<select  class="am-radius c-p" name="role_id">
					<option value="">{{:L('common_select_can_choose')}}</option>
					<foreach name="role" item="v">
						<option value="{{$v.id}}" <if condition="isset($param['role_id']) and $param['role_id'] eq $v['id']">selected</if>>{{$v.name}}</option>
					</foreach>
				</select>
				<input type="text" class="am-radius" placeholder="{{:L('login_username_text')}}" name="username" <present name="param['username']"> value="{{$param.username}}"</present> />
				<button type="submit" class="am-btn am-btn-secondary am-btn-sm am-radius">{{:L('common_operation_query')}}</button>
			</div>
		</form>
		<!-- form end -->

		<!-- operation start -->
		<div class="am-g m-t-15">
			<a href="{{:U('Admin/Admin/SaveInfo')}}" class="am-btn am-btn-secondary am-radius am-btn-xs am-icon-plus"> {{:L('common_operation_add')}}</a>
		</div>
		<!-- operation end -->

		<!-- list start -->
		<table class="am-table am-table-striped am-table-hover am-text-middle m-t-10">
			<thead>
				<tr>
					<th>{{:L('common_admin_name')}}</th>
					<th>{{:L('common_view_gender_name')}}</th>
					<th>{{:L('login_total_name')}}</th>
					<th class="am-hide-sm-only">{{:L('login_last_time_name')}}</th>
					<th class="am-hide-sm-only">{{:L('common_create_time_name')}}</th>
					<th>{{:L('common_operation_name')}}</th>
				</tr>
			</thead>
			<tbody>
				<if condition="!empty($list)">
					<foreach name="list" item="v">
						<tr id="data-list-{{$v.id}}">
							<td>{{$v.username}}</td>
							<td>{{:L('common_gender_list')[$v['gender']]['name']}}</td>
							<td>{{$v.login_total}}</td>
							<td class="am-hide-sm-only">
								<if condition="$v['login_total'] eq 0">
									{{:L('common_not_login_name')}}
								<else />
									{{:date('Y-m-d H:i:s', $v['login_time'])}}
								</if>
							</td>
							<td class="am-hide-sm-only">{{:date('Y-m-d H:i:s', $v['add_time'])}}</td>
							<td>
								<if condition="$v['id'] eq 1">
									<span class="cr-ccc">{{:L('common_do_not_operate')}}</span>
								<else />
									<a href="{{:U('Admin/Admin/SaveInfo', array('id'=>$v['id']))}}">
										<button class="am-btn am-btn-default am-btn-xs am-radius am-icon-edit" data-am-popover="{content: '{{:L('common_operation_edit')}}', trigger: 'hover focus'}"></button>
									</a>
									<if condition="$v['id'] neq $admin['id']">
										<button class="am-btn am-btn-default am-btn-xs am-radius am-icon-trash-o submit-delete" data-url="{{:U('Admin/Admin/Delete')}}" data-am-popover="{content: '{{:L('common_operation_delete')}}', trigger: 'hover focus'}" data-id="{{$v.id}}"></button>
									</if>
								</if>
							</td>
						</tr>
					</foreach>
				<else />
					<tr><td colspan="5" class="table-no">{{:L('common_not_data_tips')}}</td></tr>
				</if>
			</tbody>
		</table>
		<!-- list end -->

		<!-- page start -->
		<if condition="!empty($list)">
			{{$page_html}}
		</if>
		<!-- page end -->
	</div>
</div>
<!-- right content end  -->

<!-- footer start -->
<include file="Public/Footer" />
<!-- footer end -->