<!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/app_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/app_manage.js"></script>
</head>
<body data-type="generalComponents">
	{% include 'component_header.tpl' %}
	<div class="tpl-page-container tpl-page-header-fixed">
		<div class="scrollbar-wrap">
		{% include 'component_left.tpl' %}
		<div class="tpl-content-wrapper ngco-Osz-marginT">
			<div class="tpl-content-page-title">
				应用信息管理
			</div>
			<ol class="am-breadcrumb">
				<li><a href="./" 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>&nbsp;应用信息管理
					</div>
					<div class="tpl-portlet-input tpl-fz-ml am-no-margintop ">
						<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="app_update"><span class="am-icon-plus"></span>&nbsp;新增</a>
								</div>
							</div>
						</div>
					</div>
				</div>
				<div class="tpl-block">
					<div class="am-g">
						<div class="am-u-sm-12 ngco-No-paddingR">
							<form action="" method="post">
								<table class="am-table am-table-striped am-table-hover table-main ngco-Esz-mgibdr">
									<thead>
										<tr>
											<th class="table-title">排序</th>
											<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-type">是否启用</th>
											<th class="table-set">操作</th>
										</tr>
									</thead>
									<tbody>
										{% for row in data %}
										<tr>
											<td>
												<div class="ng4_width ng4-width-border">
													<input value="{{row['sort']}}" type="text" size="4" class="zty-sort">
													<input type="hidden" name="sort" value="{{row['id']}},{{row['sort']}}">
												</div>
											</td>
											<td><img src="{% if row['logo'] %}{{row['logo']}}{% else %}../static/image/admin_default_image.png{%endif%}" class="ngap-Pmax15-height" alt=""></td>
											<td><span class="am-account-info">{{row['name']}}</span></td>
											<td><span class="am-account-info">{{row['language']}}</span></td>
											<td><span class="am-account-info">{{row['domain'][0]}}</span></td>
											<td>
												{% set temp = row['template']|length %}
												{% if temp > 0 %}
												<span class="am-account-info">固定：{{row['template']}}</span>
												{% else %}
												<span class="am-account-info">自动：{{row['template_auto']['pc']}}/{{row['template_auto']['m']}}/{{row['template_auto']['wx']}}</span>
												{% endif %}
											</td>
											<td>
												<div class="tpl-switch">
													{% if row['default']==1 %}
													<a href="app_manage?action=set_default&id={{row['id']}}">
														<input name="id" value="{{row['id']}}" type="radio" class="ios-switch bigswitch tpl-switch-btn" checked="">
														<div class="tpl-switch-btn-view title2div" title="已经默认，点击取消默认">
															<div></div>
														</div>
													</a>
												</div>
												<div class="tpl-switch">
													{% else %}
													<a href="app_manage?action=set_default&id={{row['id']}}">
														<input name="id" value="{{row['id']}}" type="radio" class="ios-switch bigswitch tpl-switch-btn">
														<div class="tpl-switch-btn-view title2div" title="还没有默认，点击设置成默认应用">
															<div></div>
														</div>
													</a>
													{% endif %}
												</div>
											</td>
											<td>
												<div class="tpl-switch">
													{% if row['enable']==1 %}
													<a href="app_manage?action=unenable&id={{row['id']}}">
														<input name="id" value="{{row['id']}}" id="enable{{loop.index}}" type="checkbox" class="ios-switch bigswitch tpl-switch-btn" checked="">
														<div class="tpl-switch-btn-view title2div" title="已经启用，点击取消启用">
															<div></div>
														</div>
													</a>
												</div>
												<div class="tpl-switch">
													{% else %}
													<a href="app_manage?action=enable&id={{row['id']}}">
														<input name="id" value="{{row['id']}}" id="enable2{{loop.index}}" type="checkbox" class="ios-switch bigswitch tpl-switch-btn">
														<div class="tpl-switch-btn-view title2div" title="还没有启用，点击设置成启用应用">
															<div></div>
														</div>
													</a>
													{% endif %}
												</div>
											</td>
											<td>
												<div class="am-btn-toolbar">
													<div class="am-btn-group am-btn-group-xs">
														<a href="./app_update?webid={{row['id']}}" title="编辑应用信息" class="am-btn am-btn-default am-btn-xs am-text-default am-hide-sm-only title2div">
															<span class="am-icon-pencil-square-o"></span>&nbsp;编辑
														</a>
														<a href="./app_manage?action=del&id={{row['id']}}" title="删除应用信息" class="am-btn am-btn-default am-btn-xs am-text-danger ngro-Jclick-shanchubi title2div">
															<span class="am-icon-trash-o"></span>&nbsp;删除
														</a>
													</div>
												</div>
											</td>
										</tr>
										{% endfor %}
									</tbody>
								</table>
								{% if not data %}<div class="no-data"><ul>没有相关数据</ul></div>{% endif %}
								<div class="tpl-portlet-input tpl-fz-ml tpl-add-fl">
									<div class="am-btn-toolbar">
										<div class="am-btn-group am-btn-group-xs ng4-width-byn">
											<input type="hidden" name="action" value="sort">
											<button class="am-btn am-btn-success" id="addList" type="submit"><span class="am-icon-refresh"></span>&nbsp;排序更新</button>
										</div>
									</div>
								</div>
							</form>
						</div>
					</div>
				</div>
			</div>
			{% include 'component_footer.tpl' %}
		</div>
		</div><!-- /.scrollbar-wrap -->
	</div>
	<script>
	kg.title2div('title2div'); //调用此方法， 把该元素的title属性替换成div
	</script>
</body>
</html>