<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<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/article_manage.css" charset="utf-8">
<script src="{{ kg['tpl_url'] }}script/jquery.min.js" type="text/javascript"></script>
<script src="{{ kg['server']['HTTP_HOST'] }}/tools/amazeui/js/amazeui.min.js" type="text/javascript"></script>
<script src="{{ kg['tpl_url'] }}script/app.js" type="text/javascript"></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">
				<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> 文章列表
						</div>
					</div>
					<div class="tpl-block ">
						<div class="am-g">
							<div class="am-u-sm-12 am-u-md-6">
								<div class="am-btn-toolbar">
									<div class="am-btn-group am-btn-group-xs">
										<a href="article_update" class="am-btn am-btn-success"><span class="am-icon-plus"></span> 新增</a>
										<button type="button" class="am-btn am-btn-warning"><span class="am-icon-archive"></span> 审核</button>
										<button type="button" class="am-btn  am-btn-danger"><span class="am-icon-trash-o"></span> 删除</button>
									</div>
								</div>
							</div>
							<div class="am-u-sm-12 am-u-md-3">
								<div class="am-form-group">
									<select data-am-selected="{btnSize: 'sm'}">
										<option value="option1">所有类别</option>
										
										<option value="option2">测试1</option>
										<option value="option3">测试2</option>
										<option value="option3">测试3</option>
									</select>
								</div>
							</div>
							<div class="am-u-sm-12 am-u-md-3">
								<div class="am-input-group am-input-group-sm">
									<input type="text" class="am-form-field">
									<span class="am-input-group-btn">
										<button class="am-btn  am-btn-success tpl-am-btn-success am-icon-search" type="button"></button>
									</span>
								</div>
							</div>
						</div>
						<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-check"><input type="checkbox" class="tpl-table-fz-check"></th>
												<th class="table-id">ID</th>
												<th class="table-title">标题</th>
												<th class="table-type">类别</th>
												<th class="table-author am-hide-sm-only">作者</th>
												<th class="table-date am-hide-sm-only">修改日期</th>
												<th class="table-set">操作</th>
											</tr>
										</thead>
										<tbody>
										{% set res = 4|page_list(-1,['id','title','category','author','addtime','audit','recom'],'%Y-%m-%d %H:%M:%S') %}
										{% for data in res["data"] %}
											<tr>
												<td><input type="checkbox"></td>
												<td>{{data['id']}}</td>
												<td><a href="#">{{data['title']}}</a></td>
												<td>{{data['category_title'][0]}}</td>
												<td class="am-hide-sm-only">{{data['author']}}</td>
												<td class="am-hide-sm-only">{{data['addtime']}}</td>
												<td>
													<div class="am-btn-toolbar">
														<div class="am-btn-group am-btn-group-xs">
															<button class="am-btn am-btn-default am-btn-xs am-text-secondary"><span class="am-icon-pencil-square-o"></span>
																编辑</button>
															<button type="button" class="am-btn am-btn-default am-btn-xs am-text-warning"><span class="am-icon-archive"></span> {{data['audit']}}</button>
															<button type="button" class="am-btn am-btn-default am-btn-xs am-hide-sm-only"><span class="am-icon-star-o"></span>                  {{data['recom']}}</button>
															<button type="button" class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only"><span class="am-icon-trash-o"></span>
																删除</button>
														</div>
													</div>
												</td>
											</tr>
										{% endfor %}
											
										</tbody>
									</table>
									<div class="am-cf">

										<div class="am-fr">
											<ul class="am-pagination tpl-pagination">
												{% if res['page']==1 %}
													<li class="am-disabled"><a href='#'>«</a></li>
													<li class="am-disabled"><a href='#'>‹</a></li>
												{% else %}
													<li><a href={{res['first_page']}}>«</a></li>
													<li><a href={{res['up_page']}}>‹</a></li>
												{% endif %}
												{% for i in range(res['start'],res['end']+1) %}
													{% if i == res['page'] %}
														<li class="am-active"><a href="#">{{i}}</a></li>
													{% else %}
														<li><a href={{res['page_url'][i-1]}}>{{i}}</a></li>
													{% endif %}
												{% endfor %}
												{% if res['page']==res['total_page'] %}
													<li class="am-disabled"><a href='#'>›</a></li>
													<li class="am-disabled"><a href='#'>»</a></li>
												{% else %}
													<li><a href={{res['down_page']}}>›</a></li>
													<li><a href={{res['last_page']}}>»</a></li>
												{% endif %}
											</ul>
										</div>
									</div>
									<hr>
								</form>
							</div>

						</div>
					</div>
				</div>
				{% include 'component_footer.tpl' %}
			</div>
		</div>
	</body>
</html>
