<!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/picture_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/picture_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>
				{% if trash %}
				<li><a href="picture_manage"> 相册管理</a></li>
				<li class="am-active">回收站</li>
				{% else %}
				<li class="am-active">相册管理</li>
				{% endif %}
			</ol>
			<div class="tpl-portlet-components">
				<div class="portlet-title">
					<div class="caption font-green bold">
						<span class="am-icon-code"></span>&nbsp;相册管理
					</div>
					<ul class="list-inline ngsty-boxR">
						<li>
							<div class="ng-width-box am-no-marginbtm am-no-outline">
								<select onchange="window.open(this.options[this.selectedIndex].value,'_self')" data-am-selected="{searchBox: 1}" name="menu" class="" style="display: none;" id="selected-search2">
									{% set cate = category|length %}
									{% if cate > 1 %}
									{% for row in category %}
									{% if row['id'] == cid %}
									<option selected="selected" value="picture_manage?{{url['cid']}}cid={{row['id']}}">
										{%- if row['level'] > 1 -%}
										├
										{%- for i in range(row['level']-1) -%}
										───
										{%- endfor -%}
										{%- endif -%}
										{{row['title']}}</option>
									{% else %}
									<option value="picture_manage?{{url['cid']}}cid={{row['id']}}">
										{%- if row['level'] > 1 -%}
										├
										{%- for i in range(row['level']-1) -%}
										───
										{%- endfor -%}
										{%- endif -%}
										{{row['title']}}</option>
									{% endif %}
									{% endfor %}
									{% endif %}
								</select>
							</div>
						</li>
						<li>
							<div class="am-select-hover am-no-marginbtm am-no-outline">
								<select onchange="window.open(this.options[this.selectedIndex].value,'_self')" data-am-selected="{sbtnSize: 'sm'}">
									<option {% if sort==0 %} selected="selected" {% endif %} value="picture_manage?{{url['sort']}}sort=0">内容ID降序</option>
									<option {% if sort==1 %} selected="selected" {% endif %} value="picture_manage?{{url['sort']}}sort=1">内容ID升序</option>
									<option {% if sort==2 %} selected="selected" {% endif %} value="picture_manage?{{url['sort']}}sort=2">发布时间降序</option>
									<option {% if sort==3 %} selected="selected" {% endif %} value="picture_manage?{{url['sort']}}sort=3">发布时间升序</option>
									<option {% if sort==4 %} selected="selected" {% endif %} value="picture_manage?{{url['sort']}}sort=4">浏览次数降序</option>
									<option {% if sort==5 %} selected="selected" {% endif %} value="picture_manage?{{url['sort']}}sort=5">浏览次数升序</option>
									<option {% if sort==6 %} selected="selected" {% endif %} value="picture_manage?{{url['sort']}}sort=6">评论次数降序</option>
									<option {% if sort==7 %} selected="selected" {% endif %} value="picture_manage?{{url['sort']}}sort=7">评论次数升序</option>
									<option {% if sort==8 %} selected="selected" {% endif %} value="picture_manage?{{url['sort']}}sort=8">自定义排序值</option>
								</select>
							</div>
						</li>
						<li>
							<div class="am-select-hover am-no-marginbtm am-no-outline">
								<select onchange="window.open(this.options[this.selectedIndex].value,'_self')" data-am-selected="{btnSize: 'sm'}">
									<option {% if filter==0 %} selected="selected" {% endif %} value="picture_manage?{{url['filter']}}filter=0">数据筛选</option>
									<option {% if filter==1 %} selected="selected" {% endif %} value="picture_manage?{{url['filter']}}filter=1">推荐的内容</option>
									<option {% if filter==2 %} selected="selected" {% endif %} value="picture_manage?{{url['filter']}}filter=2">不推荐的内容</option>
									<option {% if filter==3 %} selected="selected" {% endif %} value="picture_manage?{{url['filter']}}filter=3">已审核的内容</option>
									<option {% if filter==4 %} selected="selected" {% endif %} value="picture_manage?{{url['filter']}}filter=4">未审核的内容</option>
									<option {% if filter==5 %} selected="selected" {% endif %} value="picture_manage?{{url['filter']}}filter=5">允许评论的内容</option>
									<option {% if filter==6 %} selected="selected" {% endif %} value="picture_manage?{{url['filter']}}filter=6">不允许评论的内容</option>
								</select>
							</div>
						</li>
						<li>
							<div class="portlet-input input-small input-inline">
								<form action="#" method="get" id="search">
									<div class="input-icon right">
										<i class="am-icon-search log-search"></i>
										<input type="text" class="ngar-Vxiugai-radius form-control am-hover form-control-solid ngco-Alo-Noborder" placeholder="搜索..." name="word" value="{{word}}" id="word">
									</div>
								</form>
							</div>
						</li>
						<li>
							<div class="am-btn-group am-btn-group-xs">
								<a href="picture_manage?{{ kg['run_start_time'][1] }}" 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="picture_update"><span class="am-icon-plus"></span>&nbsp;添加图片</a>
								<a class="am-btn am-btn-default am-btn-success" href="picture_manage?trash=1"><span class="am-icon-recycle"></span>&nbsp;回收站</a>
							</div>
						</li>
					</ul>
					
				</div>
				{% if not data %}<div class="no-data">
					<ul>没有相关数据</ul>
				</div>{% endif %}
				<div class="tpl-block">
					<div class="am-g">
						<div class="tpl-table-images">
							{% for row in data %}
							<div class="am-u-sm-12 am-u-md-6 am-u-lg-4 picture-div">
								<div class="tpl-table-images-content">
									<div class="tpl-table-images-content-i-time">发布时间：{{row['date']}}</div>
									<div class="tpl-i-title">
										{{row['cut_title']}}
									</div>
									<a href="javascript:;" class="tpl-table-images-content-i" style="z-index: 9">
										<div class="tpl-table-images-content-i-info">
											<span class="ico"><img src="{{row['image']}}" alt="">{{row['publisher']}}</span>
										</div>
										<span class="tpl-table-images-content-i-shadow" style="z-index: 10"></span>
										<ul data-am-widget="gallery" class="am-gallery sm-block-grid-2 md-block-grid-3 lg-block-grid-4 am-gallery-bordered " data-am-gallery="{ pureview: true }" style="height: 251px">
											{% for var in row['picture'] %}
											<li {% if loop.index0> 0 %}style="display: none"{% endif %}><img src="{{var}}" alt="" style="height: 251px"></li>
											{% endfor %}
										</ul>
									</a>
									<div class="tpl-table-images-content-block">
										<div class="tpl-i-font"></div>
										<div class="tpl-i-more">
											<ul>
												<li><span class="am-icon-mouse-pointer am-text-warning"> {{row['click']}}+</span></li>
												<li><span class="am-icon-comment-o am-text-success"> {{row['commenttotal']}}+</span></li>
												<li><span class="am-icon-hand-stop-o font-green"> {{row['agree']}}+</span></li>
											</ul>
										</div>
										<div class="am-btn-toolbar">
											<div class="am-btn-group am-btn-group-xs tpl-edit-content-btn{% if trash == 1 %} trash{% endif %}">
												{% if trash == 1 %}
												<a href="picture_manage?action=recovery&id={{row['id']}}" class="am-btn am-btn-default am-btn-warning"><span class="am-icon-archive"></span> 还原</a>
												<a href="picture_manage?action=del_true&id={{row['id']}}" class="am-btn am-btn-default am-btn-danger"><span class="am-icon-trash-o"></span> 彻底删除</a>
												{% else %}
												<a href="picture_update?id={{row['id']}}" class="am-btn am-btn-default am-btn-secondary"><span class="am-icon-edit"></span> 编辑</a>
												{% if row['audit'] == 1 %}
												<a href="picture_manage?action=unaudit&id={{row['id']}}" class="am-btn am-btn-default am-btn-warning"><span class="am-icon-archive"></span> 取消</a>
												{%else%}
												<a href="picture_manage?action=audit&id={{row['id']}}" class="am-btn am-btn-default am-btn-warning"><span class="am-icon-archive"></span> 审核</a>
												{% endif %}
												<a href="picture_manage?action=del&id={{row['id']}}" class="am-btn am-btn-default am-btn-danger"><span class="am-icon-trash-o"></span> 删除</a>
												{% if row['recom'] == 1 %}
												<a href="picture_manage?action=unrecom&id={{row['id']}}" class="am-btn am-btn-default am-btn-success"><span class="am-icon-plus"></span> 取消</a>
												{%else%}
												<a href="picture_manage?action=recom&id={{row['id']}}" class="am-btn am-btn-default am-btn-success"><span class="am-icon-plus"></span> 推荐</a>
												{% endif %}
												{% endif %}
											</div>
										</div>
									</div>
								</div>
							</div>
							{% endfor %}
						</div>
					</div>
					{% if page_data['total_page'] > 1 %}
					{{branch}}
					{% endif %}
					<div style="clear: both;"></div>
				</div>
			</div>
			{% include 'component_footer.tpl' %}
		</div>
		</div><!-- /.scrollbar-wrap -->
	</div>
</body>
</html>