<!-- 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/Course/Index')}}" method="POST">
			<div class="am-g">
				<input type="text" class="am-radius form-keyword" placeholder="{{:L('course_so_keyword_tips')}}" 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 param-where">
						<option value="0">{{:L('course_class_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 param-where" name="week_id">
						<option value="0">{{:L('course_week_text')}}</option>
						<foreach name="week_list" item="v">
							<option value="{{$v.id}}" <if condition="isset($param['week_id']) and $param['week_id'] eq $v['id']">selected</if>>{{$v.name}}</option>
						</foreach>
					</select>
					<select  class="am-radius c-p m-t-10 param-where" name="subject_id">
						<option value="0">{{:L('course_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  class="am-radius c-p m-t-10 param-where" name="interval_id">
						<option value="0">{{:L('course_interval_text')}}</option>
						<foreach name="interval_list" item="v">
							<option value="{{$v.id}}" <if condition="isset($param['interval_id']) and $param['interval_id'] eq $v['id']">selected</if>>{{$v.name}}</option>
						</foreach>
					</select>
					<select name="room_id" class="am-radius c-p m-t-10 param-where">
						<option value="0">{{:L('course_room_text')}}</option>
						<foreach name="room_list" item="v">
							<if condition="empty($v['item'])">
								<option value="{{$v.id}}" <if condition="isset($param['room_id']) and $param['room_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['room_id']) and $param['room_id'] eq $vs['id']">selected</if>>{{$vs.name}}</option>
									</foreach>
								</optgroup>
							</if>
						</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>
	        </div>
	    </if>
        <!-- operation end -->

		<!-- list start -->
		<table class="am-table am-table-striped am-table-hover am-text-middle m-t-10 m-l-5">
			<thead>
				<tr>
					<th>{{:L('course_teacher_text')}}</th>
					<th class="am-hide-sm-only">{{:L('course_class_text')}}</th>
					<th>{{:L('course_subject_text')}}</th>
					<th class="am-hide-sm-only">{{:L('course_week_text')}}</th>
					<th class="am-hide-sm-only">{{:L('course_interval_text')}}</th>
					<th class="am-hide-sm-only">{{:L('course_room_text')}}</th>
					<!-- <th>{{:L('common_view_state_title')}}</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}}" <if condition="$v['state'] eq 0">class="am-active"</if>>
							<td>{{$v.teacher_name}}</td>
							<td class="am-hide-sm-only">{{$v.class_name}}</td>
							<td>{{$v.subject_name}}</td>
							<td class="am-hide-sm-only">{{$v.week_name}}</td>
							<td class="am-hide-sm-only">{{$v.interval_name}}</td>
							<td class="am-hide-sm-only">{{$v.room_name}}</td>
							<!-- <td>
								<a href="javascript:;" class="am-icon-btn am-icon-check submit-state <if condition="$v['state'] eq 1">am-success<else />am-default</if>" data-url="{{:U('Admin/Course/StateUpdate')}}" data-id="{{$v.id}}" data-state="{{$v['state']}}"></a>
							</td> -->
							<td>
								<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('course_teacher_text')}}</dt>
												<dd>{{$v.teacher_name}}</dd>

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

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

												<dt>{{:L('course_week_text')}}</dt>
												<dd>{{$v.week_name}}</dd>

												<dt>{{:L('course_interval_text')}}</dt>
												<dd>{{$v.interval_name}}</dd>

												<dt>{{:L('course_room_text')}}</dt>
												<dd>{{$v.room_name}}</dd>

												<dt>{{:L('common_view_state_title')}}</dt>
												<dd>{{$v.state_text}}</dd>

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