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

<!-- right content start  -->
<div class="content-right">
	<div class="content">
		<!-- form start -->
		<form class="am-form view-list" action="{{:U('Admin/Fraction/Index')}}" method="POST">
			<div class="am-g">
				<input type="text" class="am-radius form-keyword" placeholder="{{:L('fraction_username_text')}}" name="keyword" <present name="param['keyword']"> value="{{$param.keyword}}"</present> />
				<button type="submit" class="am-btn am-btn-secondary am-btn-sm am-radius form-submit">{{:L('common_operation_query')}}</button>
				<label class="fs-12 m-l-5 c-p fw-100 more-submit">
					{{:L('common_more_screening')}}
					<input type="checkbox" name="is_more" value="1" id="is_more" <if condition="isset($param['is_more']) and $param['is_more'] eq 1">checked</if> />
					<i class="am-icon-angle-down"></i>
				</label>

				<div class="more-where <if condition="!isset($param['is_more']) or $param['is_more'] neq 1">none</if>">
					<select name="class_id" class="am-radius c-p m-t-10">
						<option value="0">{{:L('fraction_class_id_text')}}</option>
						<foreach name="class_list" item="v">
							<if condition="empty($v['item'])">
								<option value="{{$v.id}}" <if condition="isset($param['class_id']) and $param['class_id'] eq $v['id']">selected</if>>{{$v.name}}</option>
							<else />
								<optgroup label="{{$v.name}}">
									<foreach name="v.item" item="vs">
										<option value="{{$vs.id}}" <if condition="isset($param['class_id']) and $param['class_id'] eq $vs['id']">selected</if>>{{$vs.name}}</option>
									</foreach>
								</optgroup>
							</if>
						</foreach>
					</select>
					<select  class="am-radius c-p m-t-10" name="score_id">
						<option value="0">{{:L('fraction_score_id_text')}}</option>
						<foreach name="score_list" item="v">
							<option value="{{$v.id}}" <if condition="isset($param['score_id']) and $param['score_id'] eq $v['id']">selected</if>>{{$v.name}}</option>
						</foreach>
					</select>
					<select  class="am-radius c-p m-t-10" name="subject_id">
						<option value="0">{{:L('fraction_subject_text')}}</option>
						<foreach name="subject_list" item="v">
							<option value="{{$v.id}}" <if condition="isset($param['subject_id']) and $param['subject_id'] eq $v['id']">selected</if>>{{$v.name}}</option>
						</foreach>
					</select>
					<select name="score_level" class="am-radius c-p m-t-10">
						<option value="-1">{{:L('fraction_score_level_text')}}</option>
						<foreach name="common_fraction_level_list" item="v">
							<option value="{{$v.id}}" <if condition="isset($param['score_level']) and $param['score_level'] eq $v['id']">selected</if>>{{$v.name}}</option>
						</foreach>
					</select>
				</div>
			</div>
		</form>
		<!-- form end -->

		<!-- operation start -->
		<if condition="!IsMobile()">
	        <div class="am-g m-t-15">
	            <a href="{{$excel_url}}" class="am-btn am-btn-success am-btn-xs am-icon-file-excel-o am-radius"> {{:L('common_operation_excel_export_name')}}</a>
	            <a href="javascript:;" class="am-btn am-btn-primary am-btn-xs m-l-10 am-icon-cloud-upload am-radius" data-am-modal="{target: '#excel-import-win'}"> {{:L('common_operation_excel_import_name')}}</a>
            	<!-- excel win html start -->
				<include file="Lib/ExcelWinHtml" />
				<!-- excel win html end -->
	        </div>
	    </if>
        <!-- operation end -->

		<!-- list start -->
		<table class="am-table am-table-striped am-table-hover am-text-middle m-t-20">
			<thead>
				<tr>
					<th>{{:L('fraction_username_text')}}</th>
					<th class="am-hide-sm-only">{{:L('common_view_gender_name')}}</th>
					<th class="am-hide-sm-only">{{:L('fraction_class_id_text')}}</th>
					<th class="am-hide-sm-only">{{:L('fraction_score_id_text')}}</th>
					<th class="am-hide-sm-only">{{:L('fraction_subject_text')}}</th>
					<th class="am-hide-sm-only">{{:L('fraction_score_level_text')}}</th>
					<th>{{:L('fraction_score_text')}}</th>
					<th>{{:L('common_more_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}}-{{$v.student_id}}">
							<td>{{$v.username}}</td>
							<td class="am-hide-sm-only">{{$v.gender}}</td>
							<td class="am-hide-sm-only">{{$v.class_name}}</td>
							<td class="am-hide-sm-only">{{$v.score_name}}</td>
							<td class="am-hide-sm-only">{{$v.subject_name}}</td>
							<td class="am-hide-sm-only">{{$v.score_level}}</td>
							<td>{{$v.score}}</td>
							<td class="am-show-sm-only">
								<span class="am-icon-caret-down c-p" data-am-modal="{target: '#my-popup{{$v.id}}'}"> {{:L('common_see_more_name')}}</span>
								<div class="am-popup am-radius" id="my-popup{{$v.id}}">
									<div class="am-popup-inner">
										<div class="am-popup-hd">
											<h4 class="am-popup-title">{{:L('common_detail_content')}}</h4>
											<span data-am-modal-close
											class="am-close">&times;</span>
										</div>
										<div class="am-popup-bd">
											<dl class="dl-content">
												<dt>{{:L('fraction_username_text')}}</dt>
												<dd>{{$v.username}}</dd>

												<dt>{{:L('common_view_gender_name')}}</dt>
												<dd>{{$v.gender}}</dd>

												<dt>{{:L('fraction_class_id_text')}}</dt>
												<dd>{{$v.class_name}}</dd>

												<dt>{{:L('fraction_subject_text')}}</dt>
												<dd>{{$v.subject_name}}</dd>

												<dt>{{:L('fraction_score_level_text')}}</dt>
												<dd>{{$v.score_level}}</dd>

												<dt>{{:L('fraction_score_text')}}</dt>
												<dd>{{$v.score}}</dd>

												<dt>{{:L('fraction_comment_text')}}</dt>
												<dd>{{$v.comment}}</dd>

												<dt>{{:L('common_create_time_name')}}</dt>
												<dd>{{$v.add_time}}</dd>
											</dl>
										</div>
									</div>
								</div>
							</td>
							<td>
								<button class="am-btn am-btn-default am-btn-xs am-radius am-icon-trash-o submit-delete" data-url="{{:U('Admin/Fraction/Delete')}}" data-am-popover="{content: '{{:L('common_operation_delete')}}', trigger: 'hover focus'}" data-id="{{$v.id}}-{{$v.student_id}}"></button>
							</td>
						</tr>
					</foreach>
				<else />
					<tr><td colspan="10" 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 -->

<if condition="!IsMobile()">
	<!-- excel win js start -->
	<include file="Lib/ExcelWinJs" />
	<!-- excel win js end -->
</if>