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

<!-- right content start  -->
<div class="content-right">
	<div class="content">
		<!-- operation start -->
		<div class="am-g">
			<button class="am-btn am-btn-secondary am-radius am-btn-xs am-icon-plus submit-add" data-am-modal="{target: '#nav-custom-save-win'}" data-tag="nav-custom-save-win"> {{:L('navheader_custom_operation_add')}}</button>
			<button class="am-btn am-btn-secondary am-radius am-btn-xs am-icon-plus submit-add" data-am-modal="{target: '#nav-article_class-save-win'}" data-tag="nav-article_class-save-win"> {{:L('navheader_article_class_operation_add')}}</button>
			<button class="am-btn am-btn-secondary am-radius am-btn-xs am-icon-plus submit-add" data-am-modal="{target: '#nav-customview-save-win'}" data-tag="nav-customview-save-win"> {{:L('navheader_customview_operation_add')}}</button>
		</div>
		<!-- operation end -->

		<!-- custom save win start -->
		<div class="am-popup am-radius" id="nav-custom-save-win">
			<div class="am-popup-inner">
				<div class="am-popup-hd">
					<h4 class="am-popup-title" data-add-title="{{:L('navheader_custom_operation_add')}}{{:L('navheader_add_name')}}" data-edit-title="{{:L('navheader_custom_operation_add')}}{{:L('navheader_edit_name')}}">{{:L('navheader_custom_operation_add')}}{{:L('navheader_add_name')}}</h4>
					<span data-am-modal-close class="am-close">&times;</span>
				</div>
				<div class="am-popup-bd">
					<!-- form start -->
					<form class="am-form form-validation" action="{{:U('Admin/NavHeader/Save')}}" method="POST" request-type="ajax-reload" request-value="">
						<div class="am-form-group">
							<label>{{:L('navheader_level_text')}}</label>
							<select  class="am-radius c-p" name="pid" data-validation-message="{{:L('navheader_level_format')}}">
								<option value="0">{{:L('common_select_level_one_choice')}}</option>
								<foreach name="nav_header_pid_list" item="v">
									<option value="{{$v.id}}">{{$v.name}}</option>
								</foreach>
							</select>
						</div>
						<div class="am-form-group">
							<label>{{:L('navheader_name_text')}}</label>
							<input type="text" placeholder="{{:L('navheader_name_text')}}" name="name" minlength="2" maxlength="16" data-validation-message="{{:L('navheader_name_format')}}" class="am-radius" required />
						</div>
						<div class="am-form-group">
							<label>{{:L('navheader_url_text')}}<span class="fs-12 fw-100 cr-999">（{{:L('navheader_url_text_tips')}}）</span></label>
							<input type="url" placeholder="{{:L('navheader_url_text')}}" name="url"  data-validation-message="{{:L('navheader_url_format')}}" class="am-radius" required />
						</div>
						<div class="am-form-group">
							<label>{{:L('common_view_sort_title')}}</label>
							<input type="number" placeholder="{{:L('common_view_sort_title')}}" name="sort" min="0" max="255" data-validation-message="{{:L('common_sort_error')}}" class="am-radius" value="0" required />
						</div>
						<include file="Lib/IsShow" />
						<include file="Lib/IsNewWindowOpen" />
						<div class="am-form-group">
							<input type="hidden" name="id" />
							<input type="hidden" name="data_type" value="custom" />
							<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm w100" data-am-loading="{loadingText:'{{:L('common_form_loading_tips')}}'}">{{:L('common_operation_save')}}</button>
						</div>
					</form>
					<!-- form end -->
				</div>
			</div>
		</div>
		<!-- custom save win end -->

		<!-- article_class save win start -->
		<div class="am-popup am-radius" id="nav-article_class-save-win">
			<div class="am-popup-inner">
				<div class="am-popup-hd">
					<h4 class="am-popup-title" data-add-title="{{:L('navheader_article_class_operation_add')}}{{:L('navheader_add_name')}}" data-edit-title="{{:L('navheader_article_class_operation_add')}}{{:L('navheader_edit_name')}}">{{:L('navheader_article_class_operation_add')}}{{:L('navheader_add_name')}}</h4>
					<span data-am-modal-close class="am-close">&times;</span>
				</div>
				<div class="am-popup-bd">
					<!-- form start -->
					<form class="am-form form-validation-article_class" action="{{:U('Admin/NavHeader/Save')}}" method="POST" request-type="ajax-reload" request-value="">
						<div class="am-form-group">
							<label>{{:L('navheader_level_text')}}</label>
							<select  class="am-radius c-p" name="pid" data-validation-message="{{:L('navheader_level_format')}}">
								<option value="0">{{:L('common_select_level_one_choice')}}</option>
								<foreach name="nav_header_pid_list" item="v">
									<option value="{{$v.id}}">{{$v.name}}</option>
								</foreach>
							</select>
						</div>
						<div class="am-form-group">
							<label>{{:L('navheader_article_class_id_text')}}</label>
							<select  class="am-radius c-p" name="value" data-validation-message="{{:L('navheader_article_class_id_format')}}" required>
								<option value="">{{:L('common_please_select_choose')}}</option>
								<foreach name="article_class_list" item="v">
									<option value="{{$v.id}}">{{$v.name}}</option>
								</foreach>
							</select>
						</div>
						<div class="am-form-group">
							<label>{{:L('navheader_name_text')}}<span class="fs-12 fw-100 cr-999">（{{:L('navheader_article_class_name_format')}}）</span></label>
							<input type="text" placeholder="{{:L('navheader_name_text')}}" name="name" maxlength="16" data-validation-message="{{:L('navheader_name_format')}}" class="am-radius" />
						</div>
						<div class="am-form-group">
							<label>{{:L('common_view_sort_title')}}</label>
							<input type="number" placeholder="{{:L('common_view_sort_title')}}" name="sort" min="0" max="255" data-validation-message="{{:L('common_sort_error')}}" class="am-radius" value="0" required />
						</div>
						<include file="Lib/IsShow" />
						<include file="Lib/IsNewWindowOpen" />
						<div class="am-form-group">
							<input type="hidden" name="id" />
							<input type="hidden" name="data_type" value="article_class" />
							<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm w100" data-am-loading="{loadingText:'{{:L('common_form_loading_tips')}}'}">{{:L('common_operation_save')}}</button>
						</div>
					</form>
					<!-- form end -->
				</div>
			</div>
		</div>
		<!-- article_class save win end -->

		<!-- customview save win start -->
		<div class="am-popup am-radius" id="nav-customview-save-win">
			<div class="am-popup-inner">
				<div class="am-popup-hd">
					<h4 class="am-popup-title" data-add-title="{{:L('navheader_customview_operation_add')}}{{:L('navheader_add_name')}}" data-edit-title="{{:L('navheader_customview_operation_add')}}{{:L('navheader_edit_name')}}">{{:L('navheader_customview_operation_add')}}{{:L('navheader_add_name')}}</h4>
					<span data-am-modal-close
					class="am-close">&times;</span>
					</div>
				<div class="am-popup-bd">
					<!-- form start -->
					<form class="am-form form-validation-customview" action="{{:U('Admin/NavHeader/Save')}}" method="POST" request-type="ajax-reload" request-value="">
						<div class="am-form-group">
							<label>{{:L('navheader_level_text')}}</label>
							<select  class="am-radius c-p" name="pid" data-validation-message="{{:L('navheader_level_format')}}">
								<option value="0">{{:L('common_select_level_one_choice')}}</option>
								<foreach name="nav_header_pid_list" item="v">
									<option value="{{$v.id}}">{{$v.name}}</option>
								</foreach>
							</select>
						</div>
						<div class="am-form-group">
							<label>{{:L('navheader_customview_id_text')}}</label>
							<select  class="am-radius c-p" name="value" data-validation-message="{{:L('navheader_customview_id_format')}}" required>
								<option value="">{{:L('common_please_select_choose')}}</option>
								<foreach name="customview_list" item="v">
									<option value="{{$v.id}}">{{$v.title}}</option>
								</foreach>
							</select>
						</div>
						<div class="am-form-group">
							<label>{{:L('navheader_name_text')}}<span class="fs-12 fw-100 cr-999">（{{:L('navheader_customview_name_format')}}）</span></label>
							<input type="text" placeholder="{{:L('navheader_name_text')}}" name="name" maxlength="16" data-validation-message="{{:L('navheader_name_format')}}" class="am-radius" />
						</div>
						<div class="am-form-group">
							<label>{{:L('common_view_sort_title')}}</label>
							<input type="number" placeholder="{{:L('common_view_sort_title')}}" name="sort" min="0" max="255" data-validation-message="{{:L('common_sort_error')}}" class="am-radius" value="0" required />
						</div>
						<include file="Lib/IsShow" />
						<include file="Lib/IsNewWindowOpen" />
						<div class="am-form-group">
							<input type="hidden" name="id" />
							<input type="hidden" name="data_type" value="customview" />
							<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm w100" data-am-loading="{loadingText:'{{:L('common_form_loading_tips')}}'}">{{:L('common_operation_save')}}</button>
						</div>
					</form>
					<!-- form end -->
				</div>
			</div>
		</div>
		<!-- customview save win end -->

		<!-- list start -->
		<table class="am-table am-table-striped am-table-hover am-text-middle m-t-10">
			<thead>
				<tr>
					<th>{{:L('navheader_name_text')}}</th>
					<th>{{:L('common_nav_type_name')}}</th>
					<th>{{:L('common_view_state_title')}}</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['is_show'] eq 0">class="am-active"</if>>
							<td>{{$v.name}}
								<a href="{{$v.url}}" target="_blank">
									<i class="am-icon-external-link"></i>
								</a>
							</td>
							<td>{{:L('common_nav_type_list')[$v['data_type']]}}</td>
							<td>
								<a href="javascript:;" class="am-icon-btn am-icon-check submit-state <if condition="$v['is_show'] eq 1">am-success<else />am-default</if>" data-url="{{:U('Admin/NavHeader/StateUpdate')}}" data-id="{{$v.id}}" data-state="{{$v['is_show']}}"></a>
							</td>
							<td>
								<button class="am-btn am-btn-default am-btn-xs am-radius am-icon-edit submit-edit" data-am-popover="{content: '{{:L('common_operation_edit')}}', trigger: 'hover focus'}" data-am-modal="{target: '#nav-{{$v.data_type}}-save-win'}" data-json='{{:json_encode($v)}}' data-tag="nav-{{$v.data_type}}-save-win"></button>
								<button class="am-btn am-btn-default am-btn-xs am-radius am-icon-trash-o submit-delete" data-url="{{:U('Admin/NavHeader/Delete')}}" data-am-popover="{content: '{{:L('common_operation_delete')}}', trigger: 'hover focus'}" data-id="{{$v.id}}"></button>
							</td>
						</tr>
						<if condition="!empty($list)">
							<foreach name="v.item" item="vs">
								<tr id="data-list-{{$vs.id}}" <if condition="$vs['is_show'] eq 0">class="am-active"</if>>
									<td class="p-l-30">{{$vs.name}}
										<a href="{{$vs.url}}" target="_blank">
											<i class="am-icon-external-link"></i>
										</a>
									</td>
									<td>{{:L('common_nav_type_list')[$vs['data_type']]}}</td>
									<td>
										<a href="javascript:;" class="am-icon-btn am-icon-check submit-state <if condition="$vs['is_show'] eq 1">am-success<else />am-default</if>" data-url="{{:U('Admin/NavHeader/StateUpdate')}}" data-id="{{$vs.id}}" data-state="{{$vs['is_show']}}"></a>
									</td>
									<td>
										<button class="am-btn am-btn-default am-btn-xs am-radius am-icon-edit submit-edit" data-am-popover="{content: '{{:L('common_operation_edit')}}', trigger: 'hover focus'}" data-am-modal="{target: '#nav-{{$vs.data_type}}-save-win'}" data-json='{{:json_encode($vs)}}' data-tag="nav-{{$vs.data_type}}-save-win"></button>
										<button class="am-btn am-btn-default am-btn-xs am-radius am-icon-trash-o submit-delete" data-url="{{:U('Admin/NavHeader/Delete')}}" data-am-popover="{content: '{{:L('common_operation_delete')}}', trigger: 'hover focus'}" data-id="{{$vs.id}}"></button>
									</td>
								</tr>
							</foreach>
						</if>
					</foreach>
				<else />
					<tr><td colspan="5" class="table-no">{{:L('common_not_data_tips')}}</td></tr>
				</if>
			</tbody>
		</table>
		<!-- list end -->
	</div>
</div>
<!-- right content end  -->

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