videoalbum_list.html
4.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<%
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/videoalbum/list';
this.form.action = url;
this.form.submit();
},
view : function(id) {
var url = 'admin/videoalbum/view/'+id;
var title = '查看专辑';
Iframe(url, this.width, this.height, title, false, false, false, EmptyFunc);
},
add : function() {
var url = 'admin/videoalbum/add';
var title = '添加专辑';
Iframe(url, this.width, this.height, title);
},
edit : function(id) {
var url = 'admin/videoalbum/edit/'+id;
var title = '修改专辑';
Iframe(url, this.width, this.height, title);
},
del : function(id) {
var url = 'admin/videoalbum/delete/'+id;
var title = '确认要删除该专辑信息?';
Confirm(title, function() {
form1.action = url;
form1.submit();
});
}
};
//显示Menu索引
showMenu('page_videoalbum');
});
//分页
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">
<input class="form-control" type="text" name="attr.name" value="${attr.name!''}"
placeholder="请输入名称" required='required' />
</div>
<div class="form-group">
<select name="attr.status" class="form-control" >
<option value="-1">--请选择--</option>
<option value="1" ${attr.status==1?'selected':''}>显示</option>
<option value="2" ${attr.status==2?'selected':''}>隐藏</option>
</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="parent_id" class="sorting">父专辑</th>
<th name="name" class="sorting">专辑名称</th>
<th name="sort" class="sorting">排序</th>
<th name="status" class="sorting">状态</th>
<th name="remark" class="sorting">描述</th>
<th name="create_time" class="sorting">创建时间</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<% for(item in page.list){ %>
<tr>
<td>${itemLP.index }</td>
<% // 列表内容 %>
<td>${item.parentName!'根相册'}</td>
<td>${item.name}</td>
<td>${item.sort}</td>
<td>
<% if(item.status==2) { %>
隐藏
<% } %>
<% if(item.status==1) { %>
显示
<% } %>
</td>
<td title="${item.remark}">
<% if (strutil.length(item.remark) > 25) { %>
${strutil.subStringTo(item.remark, 0, 25)}...
<% } else { %>
${item.remark}
<% } %>
</td>
<td>${item.create_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}){ %>
<%} %>