<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>KGCMS企业应用管理平台 - Powered by KGCMS</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="renderer" content="webkit">
<!-- <meta http-equiv="cache-control" content="no-siteapp" /> -->
<link rel="stylesheet" href="{{kg['tpl_url']}}style/set_web_manage.css">
<script src="{{kg['tpl_url']}}script/jquery.min.js"></script>
<script src="{{kg['server']['HTTP_HOST']}}/tools/amazeui/js/amazeui.min.js"></script>
<script src="{{kg['tpl_url']}}script/common.js"></script> 
<script src="{{kg['tpl_url']}}script/set_web_manage.js"></script>
</head>
	<body data-type="generalComponents">
		{% include 'component_header.tpl' %}
		<div class="tpl-page-container tpl-page-header-fixed">
			{% include 'component_left.tpl' %}
				<div class="tpl-content-wrapper ngco-Osz-marginT">
			<div class="tpl-content-page-title">
				网站信息管理
			</div>
			{% set res = 10| list %}
			<ol class="am-breadcrumb">
				<li><a href="/kgcms_admin" class="am-icon-home">首页</a></li>
				<li class="am-active">网站信息管理</li>
			</ol>
			<div class="tpl-portlet-components">
				<div class="portlet-title">
					<div class="caption font-green bold">
						<span class="am-icon-code"></span> 信息管理列表
					</div>
					<div class="tpl-portlet-input tpl-fz-ml">
						<div class="portlet-input input-small input-inline">
							<div class="input-icon right am-cf">
								<div class="am-btn-group am-btn-group-xs am-fr">
									<a  class="am-btn am-btn-default am-btn-success" href="set_web"><span class="am-icon-plus"></span> 新增</a>
								</div>
							</div>
						</div>
					</div>
				</div>
				<div class="tpl-block">
					
					<div class="am-g">
						<div class="am-u-sm-12">
								<table class="am-table am-table-striped am-table-hover table-main">
									<thead>
										<tr>
											<th class="table-title">网站logo</th>
											<th class="table-title">网站标题</th>
											<th class="table-title">语言名称</th>
											<th class="table-title">域名</th>
											<th class="table-type">模板文件</th>
											<th class="table-type">是否默认</th>
											<th class="table-set">操作</th>
										</tr>
									</thead>
									<tbody>
										{% for data in res['data'] %}
										<tr>
											<td><img src="{{data['logo']}}" alt="" style="max-height: 15px;"></td>
											<td>
												<span class="am-account-info">{{data['name']}}</span>
											</td>
											<td>
												<span class="am-account-info">{{data['language']}}</span>
											</td>
											<td>
												<span class="am-account-info">{{data['domain'][0]}}</span>
											</td>
											<td>
												<span class="am-account-info">{{data['template']}}</span>
											</td>
											<td>
												<form method="post" action="/kgcms_admin/app" enctype="multipart/form-data">
													<div class="tpl-switch">
														{% if data['default']==1 %}
														<input name="is_default" value="{{data['id']}}" id="default" type="radio" class="ios-switch bigswitch tpl-switch-btn" checked="" name='default'>
														{% else %}
														<input name="is_default" value="{{data['id']}}" id="default" type="radio" class="ios-switch bigswitch tpl-switch-btn"  name='default'>
														{% endif %}
														<div class="tpl-switch-btn-view">
															<div>
															</div>
														</div>
													</div>
												</from>
											</td>
											<td>
												<div class="am-btn-toolbar">
													<div class="am-btn-group am-btn-group-xs">
														<a href="/kgcms_admin/set_web?id={{data['id']}}" class="am-btn am-btn-default am-btn-xs am-text-default am-hide-sm-only">
															<span class="am-icon-pencil-square-o"></span>&nbsp;编辑
														</a>
														<button data-value="/kgcms_admin/app?del_id={{data['id']}}" class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only" type="button">
															<span class="am-icon-trash-o"></span>&nbsp;删除
														</button>
													</div>
												</div>
											</td>
										</tr>
										{% endfor %}
									</tbody>
								</table>
						</div>
					</div>
				</div>
			</div>
			{% include 'component_footer.tpl' %}
			</div>
		</div>
		<script>
		$(function(){
			$('.tpl-switch-btn-view').click(function(){
				$('form').submit();
			})
		})
	</script>
	</body>
</html>
