<!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/template_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/template_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">
			<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 title-style ngco-No-marginB">
					<div class="caption font-green bold">
						<span class="am-icon-code"></span>&nbsp;文章内容管理
					</div>
					<div class="tpl-portlet-input tpl-fz-ml am-select-hover am-no-margintop">
						<div class="portlet-input input-small input-inline ngar-xiugai-width">
							<div class="input-icon right am-fr top-1">
								<div class="am-btn-group am-btn-group-xs">
									<a href="template_dump" class="am-btn am-btn-secondary ng-add-hightB"><span class="am-icon-search"></span>&nbsp;备份管理</a>
									<a class="am-btn am-btn-default am-btn-warning" href="template_install"><span class="am-icon-plus"></span>&nbsp;安装新模板</a>
								</div>
							</div>
							<div class="am-cf"></div>
						</div>
					</div>
				</div>
				<div class="am-tabs-bd ngco-all-border ngco-M2-radius">
					<div class="am-tab-panel am-fade am-in am-active" id="tab1">
						<div class="am-g">
							<div class="am-u-sm-12">
								<form class="am-form">
									<table class="am-table am-table-striped am-table-hover table-main">
										<thead>
											<tr>
												<th class="table-title">模板缩略图</th>
												<th class="table-title">模板信息</th>
												<th class="table-title">启用应用</th>
												<th class="table-set">操作</th>
											</tr>
										</thead>
										<tbody>
											{% for row in list %}
											<tr>
												<div id="container" class="column">
													<div id="center">
														<td align="center" class="underline ty-preview">
															<img src="/{{row['thumbnail']}}" width="120" height="160" border="0" style="padding:2px; margin:10px 0; border:1px #CCC solid;" />
														</td>
													</div>
												</div>
												<div id="left" class="column">
													<td class="info underline ">
														<b>模板名称：</b>{{row['name']}}<font color="#F37B1D">{%if kg['web']['template'] == row['dir']%} 通用模板{%endif%}
															{%if kg['web']['template_auto']['pc'] == row['dir']%}电脑模板 {%endif%}
															{%if kg['web']['template_auto']['m'] == row['dir']%}手机模板 {%endif%}
															{%if kg['web']['template_auto']['wx'] == row['dir']%}微信模板 {%endif%}
														</font><br />
														<b>适用版本：</b>{{row['version']}}<br />
														<b>模板作者：</b><a target="_blank" href="{{row['website']}}">{{row['production']}}</a><br />
														<b>发布日期：</b>{{row['date']}}<br />
														<b>适用类型：</b>{{row['types']}}<br />
														<b>模板路径：</b>../templates/frontend/{{row['dir']}}<br />
														<b>模板简介：</b>无
													</td>
												</div>
												<td>
													{% if row['app'] %}{{'、'.join(row['app'])}}{% else %}-- --{%endif%}
												</td>
												<div id="right" class="column">
													<td class="underline" align="center">
														<table class="hidden_tab ngte-Qtable-style" cellpadding="0" cellspacing="0" border="0">
															<tr>
																<td>{% if kg['web']['template'] %}<a href="template_manage?action=enable&template={{row['dir']}}" class="am-btn am-btn-default am-btn-xs am-recom-bright"><span class="am-icon-power-off"></span>&nbsp;启用模板</a>{%endif%}</td>
															</tr>
															<tr class="ngte-Qtr-style">
																<td>{% if kg['web']['template_auto'] and "电脑" in row['types']%}<a href="template_manage?action=pc&template={{row['dir']}}" class="am-btn am-btn-default am-btn-xs am-text-secondary"><span class="am-icon-laptop"></span>&nbsp;设为PC版</a>{%endif%}</td>
															</tr class="ngte-Qtr-style">
															<tr class="ngte-Qtr-style">
																<td>{% if kg['web']['template_auto'] and "手机" in row['types']%}<a href="template_manage?action=m&template={{row['dir']}}" class="am-btn am-btn-default am-btn-xs ngco-text-red"><span class="am-icon-tablet"></span>&nbsp;设为手机版</a>{%endif%}</td>
															</tr>
															<tr class="ngte-Qtr-style">
																<td>{% if kg['web']['template_auto'] and "微信" in row['types']%}<a href="template_manage?action=wx&template={{row['dir']}}" class="am-btn am-btn-default am-btn-xs am-audit-bright"><span class="am-icon-comments"></span>&nbsp;设为微信版</a>{%endif%}</td>
															</tr>
															<tr class="ngte-Qtr-style">
																<td><a href="template_update?template={{row['dir']}}" class="am-btn am-btn-default am-btn-xs am-text-secondary"><span class="am-icon-pencil-square-o"></span>&nbsp;编辑模板</a></td>
															</tr>
															<tr class="ngte-Qtr-style">
																<td><a href="template_manage?action=backup&template={{row['dir']}}" class="am-btn am-btn-default am-btn-xs am-audit-bright"><span class="am-icon-clipboard"></span>&nbsp;备份模板</a></td>
															</tr>
															<tr class="ngte-Qtr-style">
																<td>{% if not row['app'] %}<a onclick="return confirm('确定要完全删除该模板吗？');" href="template_manage?action=del&template={{row['dir']}}" class="am-btn am-btn-default am-btn-xs ngco-text-red"><span class="am-icon-unlink"></span>&nbsp;模板卸载</a>{% endif %}</td>
															</tr>
														</table>
													</td>
												</div>
											</tr>
											{% endfor %}
									</table>
									{% if not list %}<div class="no-data">
										<ul>没有相关数据</ul>
									</div>{% endif %}
									</td>
							</div>
							</tr>
							</tbody>
							</table>
							</form>
						</div>
					</div>
				</div>
				<div class="am-alert am-alert-warning">
					<h4><i class="am-icon-warning"></i>&nbsp;模板管理操作说明：</h4>
					<ul>
						<li>1、当前应用：<font color="#003399">{{kg['web']['name']}}</font> 模板类型：<font color="#003399">{% if kg['web']['template'] %}通用模板{% else %}自动模板{%endif%}</font>
						</li>
						<li>2、启用模板只会作用到当前应用。</li>
						<li>3、只有应用启用了自动模板，才能在本页修改对应设备的模板文件。</li>
					</ul>
				</div>
			</div>
			{% include 'component_footer.tpl' %}
		</div>
		</div><!-- /.scrollbar-wrap -->
	</div>
	

	
	
</body>
</html>