list.vm 3.28 KB
<DIV id="navBar" class="page-header">
    <li><a href="$!{contextPath}/">首页</a><span class="divider">></span>
        <a href="$!{contextPath}/titan/templete">模板管理</a></li>
</DIV>
<form class="well form-search" name="templeteListForm" action="/titan/templete" method="POST">
	<!-- 智能分页与排序 -->
	<input type="hidden" name="currentPage" value="$!{page.currentPage}"/>
	<input type="hidden" name="pageSize" value="$!{page.pageSize}"/>
	<input type="hidden" name="orderField" value="$!{templete.orderField}"/>
	<input type="hidden" name="orderFieldType" value="$!{templete.orderFieldType}"/>
	<!-- 查询条件 -->

	模板名称:<input class="span2" type="text" name="name" value="$!{templete.name}" placeholder="模板名称"/>

	<button type="submit" class="btn btn-sm btn-primary"><i class="icon-search"></i>搜索</button>
    &nbsp;<button type="button" class="btn btn-sm btn-primary btn-clear">清空</button>
	<!-- 新增按钮 -->
	<div class="btn-group pull-right">
		#*<a class="btn" onclick="XUI.window.open('/titan/templete/add',null,'PUT',{title:$(this).text()})"><i class="icon-pencil"></i>新增</a>*#
        <a class="btn btn-sm btn-primary"  href="/titan/templete/add"><i class="icon-pencil"></i>新增</a>
	</div>
</form>

<!-- 表格数据 -->
<table class="table table-striped table-bordered table-condensed grid">
	<thead>
		<tr>
			<th #sorting($!{templete} "id")>模板ID</th>
			<th #sorting($!{templete} "name")>模板后台名称</th>
			<th #sorting($!{templete} "alias")>模板前台名称</th>
			<th #sorting($!{templete} "order")>所属分类</th>
            <th #sorting($!{templete} "order")>关联商品</th>
			<th>操作</th>
		</tr>
	</thead>
	<tbody>
#foreach(${item} in ${page.result})
		<tr>
			<td  width="6%">$!{item.id}</td>
			<td>$!{item.name}</td>
			<td width="10%">$!{item.alias}</td>
			<td>
                #set($cates=$!{item.categoryTempletes})
                #foreach($c in $cates)
                $c.cateName,
                #end
            </td>
            <td width="8%">
                #if(${item.isProductTemp}=="true")

                    #else

                #end
            </td>
			<td class="textC">

                    <a  href="javascript:void(0);"onclick="window.open('/titan/templete/${item.id}')"><i class="icon-eye-open"></i>查看</a>
                    <a href="/titan/templete/edit?tempId=${item.id}"><i class="icon-pencil"></i>修改</a>
                    #if((${item.isProductTemp}=="false")&& (0 == ${item.categoryTempletes.size()} ))
                        <a class="red" onclick="XUI.Templete.deleteTemplete(${item.id})"><i class="icon-trash"></i>删除</a>
                    #end
					#*<a class="btn btn-mini" onclick="XUI.ajax.delete('/templete/${item.id}',null,{refresh:true})"><i class="icon-trash"></i> 删除</a>
					<a class="btn btn-mini" onclick="XUI.window.open('/templete/${item.id}',null,'PUT',{title:$(this).text()})"><i class="icon-pencil"></i> 修改</a>
					<a class="btn btn-mini" onclick="XUI.window.open('/templete/${item.id}',null,'GET',{title:$(this).text()})"><i class="icon-eye-open"></i> 查看</a>*#
			</td>
		</tr>
#end
	</tbody>
</table>
<!-- 分页栏 -->
#showPage($!{page})
<script>
    $(document).ready(function(){
        XUI.Templete.init();
    });
</script>