favorite.vm 4.96 KB
#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>