folderrollpicture_list.html 4.42 KB
<% 
	var headContent = {
	include("/pages/template/head.html"){}
%>

<script type="text/javascript">
		
	var oper;
	jQuery(function($) {
		// 页面方法
		oper = {
			width : 400,
			height : 500,
			form : document.form1,
			list : function() {
				var url = 'admin/folderrollpicture/list';
				this.form.action = url;
				this.form.submit();
			},
			view : function(id) {
				var url = 'admin/folderrollpicture/view/'+id;
				var title = '查看栏目轮播图';
				Iframe(url, this.width, this.height, title, false, false, false, EmptyFunc);
			},
			add : function() {
				var url = 'admin/folderrollpicture/add';
				var title = '添加栏目轮播图';
				Iframe(url, this.width, this.height, title);
			},
			edit : function(id) {
				var url = 'admin/folderrollpicture/edit/'+id;
				var title = '修改栏目轮播图';
				Iframe(url, this.width, this.height, title);
			},
			del : function(id) {
				var url = 'admin/folderrollpicture/delete/'+id;
				var title = '确认要删除该栏目轮播图信息?';
				Confirm(title, function() {
					form1.action = url;
					form1.submit();
				});
			}
		};
		//显示Menu索引
		showMenu('page_folderrollpicture');
	});
	
	//分页
	var paginator = function(page) {
		oper.list();
	};
</script>

<%
};

var bodyContent = {
%>
	<form name="form1" action="" method="post"  class="form-inline" role="form">
		<input type="hidden" name="form.orderColumn" value="${form.orderColumn!''}" />
		<input type="hidden" name="form.orderAsc" value="${form.orderAsc!''}" />
		<!-- 菜单 -->
		<% include("/pages/template/menu.html"){} %>

		<div class="tableSearch">
			<%  //查询列表 %>
			<div class="form-group">
				<select name="attr.folder_id" class="form-control" >
				<option value="-1">--请选择--</option>
				${selectFolder }
				</select>
			</div>
			
			<button type="button" class="btn btn-default" onclick="oper.list();" name="search">
			 		<span class="glyphicon glyphicon-search"></span> 查 询
			</button>
			<button type="button" class="btn btn-default" onclick="resetForm();">
			 		<span class="glyphicon glyphicon-refresh"></span> 重 置
			</button>
			<button type="button" class="btn btn-default" onclick="oper.add();">
			 		<span class="glyphicon glyphicon-plus"></span> 新 增
			</button>
		</div>
		
		<!-- 数据列表 -->
		<table class="table table-striped table-bordered table-hover">
			<thead>
				<tr>
					<th>序号</th>
					<%  // 列表头部 %>
					<th name="folder_id" class="sorting">栏目</th> 
					<th name="title" class="sorting">题目</th> 
					<th name="content" class="sorting">内容</th> 
					<th name="sort" class="sorting">排序</th> 
					<th name="status" class="sorting">状态</th> 
					<th>图片</th> 
					<th>链接地址</th> 
					<th name="update_time" class="sorting">更新时间</th> 
 					<th>操作</th>
				</tr>
			</thead>
			<tbody>
			<% for(item in page.list){ %>
				<tr>
				<td>${itemLP.index }</td>
					<%  // 列表内容 %>
					<td>${item.folderName}</td> 
					<td title="${item.title}">
					<% if (strutil.length(item.title) > 15) { %>
						${strutil.subStringTo(item.title, 0, 15)}...
					<% 	} else { %>
						${item.title}
					<%  } %>
					</td>  
					<td title="${item.content}">
					<% if (strutil.length(item.content) > 15) { %>
						${strutil.subStringTo(item.content, 0, 15)}...
					<% 	} else { %>
						${item.content}
					<%  } %>
					</td> 
					<td>${item.sort}</td> 
					<td>
						<% if(item.status==2) { %>
						隐藏
						<%	} %>
						<% if(item.status==1) { %>
						显示
						<%	} %>
					</td>  
					<td>
					<% if(!strutil.isEmpty(item.image_url)||!strutil.isEmpty(item.image_net_url)){ %>
						<a href="${flyfox.getImage(item)}" target="_blank" style="text-decoration:none;">
							<img alt="图片" title="点击浏览" src="${flyfox.getImage(item)}" width="40" height="40">
						</a>
					<% } %>
					</td> 
					<td>${item.url}</td> 
					<td>${item.update_time}</td> 
				<td>
				<a href="javascript:void(0);" class="btn btn-sm btn-success" onclick="oper.view(${item.id});">查看</a> 
				<a href="javascript:void(0);" class="btn btn-sm btn-primary" onclick="oper.edit(${item.id});">修改</a> 
				<a href="javascript:void(0);" class="btn btn-sm btn-danger" onclick="oper.del(${item.id});">删除</a>
				</td>
				</tr>
			<% } %>
			</tbody>
		</table>
		<%include("/pages/includes/paginator.html"){} %>
	</form>
<%}; %>


<% layout("/pages/template/_layout.html",{head:headContent,body:bodyContent}){ %>
<%} %>