favorite.vm
4.96 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
#set($link=${webUtils.getLocalPath("member/list.do")})
#set($page_title="会员中心")
#set($crumbs="首页:/home,会员管理:"+$link+"")
<div class="row">
<div class="page-header">
##<span class="pull-right"><a href="${webUtils.getLocalPath("member/list.do")}" class="btn btn-white btn-default">返回</a></span>
<span class="pull-right"><a href="javascript:history.back();" class="btn btn-white btn-default">返回</a></span>
<h1>
<small>
<i class="icon-double-angle-right"></i>
会员收藏
</small>
</h1>
</div>
<div class="col-xs-12">
<div class="table-header">
列表
</div>
<div class="table-responsive">
<div id="sample-table-2_wrapper" class="dataTables_wrapper" role="grid">
<div class="row">
<div class="col-sm-6" style="width:100%">
<div id="sample-table-2_length" class="dataTables_length">
<form action="${webUtils.getLocalPath("member/memberFavorite.do")}" id="form" method="post"
class="form-horizontal">
<input type="hidden" name="currPage" value=""/>
<input type="hidden" name="userId" value="$!{userId}"/>
<div class="row">
<div class="col-xs-4">
<div class="form-group">
<label class="col-xs-3 control-label text-right">收藏时间: </label>
<div class="col-xs-9">
<select style="width:100%" name="dateType">
<option value="1" #if($type == 1)selected#end defaultItem="true">最近一个月</option>
<option value="2" #if($type == 2)selected#end>最近三个月</option>
<option value="3" #if($type == 3)selected#end>最近一年</option>
<option value="4" #if($type == 4)selected#end>全部</option>
</select>
</div>
</div>
</div>
</div>
<div class="clearfix">
<span class="pull-right">
<input type="submit" value="查询结果">
<input type="button" value="清空条件" onclick="cleanForm('form');">
</span>
</div>
</form>
</div>
</div>
</div>
<table id="sample-table-2"
class="table table-striped table-bordered table-hover dataTable"
aria-describedby="sample-table-2_info">
<thead>
<tr role="row">
<th width="20%">收藏时间</th>
<th>收藏商品</th>
</tr>
</thead>
<tbody role="alert" aria-live="polite" aria-relevant="all">
#foreach($data in $!list)
<tr>
<td>$!{dateFormatUtils.format($!data.created,"yyyy-MM-dd HH:mm")}</td>
<td>
#if($!products.containsKey($!data.resource))
<a href="$!{webUtils.getProductPath($!data.resource)}" target="_blank">
$!{products.get($!data.resource).name}
</a>
#end
</td>
</tr>
#end
</tbody>
</table>
<div class="row">
<div class="col-sm-6">
</div>
<div class="col-sm-6">
<div class="dataTables_paginate paging_bootstrap">
<div class="pull-right">
#page($!{page.totalPage},$!{page.currPage})
</div>
<span class="pull-right" style="line-height: 33px;">
#set($tmpPage = $page.currPage + 1)
查询出
#if(!${page.totalSize})
0
#else
$!{page.totalSize}
#end
条数据,共
#if(!${page.totalPage})
1
#else
$!{page.totalPage}
#end
页,当前第
#if(!${tmpPage})
1
#else
$!{tmpPage}
#end
页
</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="$!{webUtils.getAssetsPath("/js/diligrp.form.js")}"></script>
<script type="text/javascript">
function cleanForm(id) {
var form = $("#" + id);
form.find("input[type=text]").each(function () {
var obj = $(this);
obj.val("");
});
form.find("select option").each(function (){
if($(this).attr("defaultitem")){
$(this).attr("selected", "selected");
}else {
$(this).removeAttr("selected");
}
});
form.find("input[type=radio],input[type=checkbox]").each(function () {
if($(this).attr("defaultitem")){
$(this).attr("checked", true);
}else {
$(this).attr("checked", false);
}
})
}
</script>