list.vm
2.95 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
<DIV id="navBar" class="page-header">
<li><a href="$!{contextPath}/">首页</a><span class="divider">></span>
<a href="$!{contextPath}/titan/attribute">属性管理</a></li>
</DIV>
<div class="navbar-fixed-top">
<form class="well" name="attributeListForm" action="/titan/attribute/" method="POST">
<!-- 智能分页与排序 -->
<input type="hidden" name="currentPage" value="$!{page.currentPage}"/>
<input type="hidden" name="pageSize" value="$!{page.pageSize}"/>
<input type="hidden" name="orderField" value="$!{attribute.orderField}"/>
<input type="hidden" name="orderFieldType" value="$!{attribute.orderFieldType}"/>
<!-- 查询条件 -->
<input class="span2" type="hidden" name="id" value="$!{attribute.id}" />
<input class="span2 align-middle" type="text" name="name" value="$!{attribute.name}" placeholder="属性名"/>
<input class="span2 align-middle" type="text" name="alias" value="$!{attribute.alias}" placeholder="属性显示名"/>
<span class="align-middle">
<button type="submit" class="btn btn-sm btn-primary"><i class="icon-search icon-white"></i>搜索</button>
<button type="button" class="btn btn-sm btn-primary btn-clear">清空</button>
</span>
<!-- <a href="/titan/attribute/saveAttrItem" class="pull-right">添加属性</a> -->
<!-- 新增按钮 -->
#if($!{addOrEdit})
<div class="btn-group pull-right">
<a class="btn btn-sm btn-primary" href="/titan/attribute/saveAttrItem"><i class="icon-pencil"></i>新增</a>
</div>
#end
</form>
</div>
<!-- 表格数据 -->
<table class="table table-striped table-bordered table-condensed grid">
<thead>
<tr>
<th #sorting($!{attribute} "name")>属性后台名称</th>
<th #sorting($!{attribute} "alias")>属性前台名称</th>
<th>操作</th>
</tr>
</thead>
<tbody>
#foreach(${item} in ${page.result})
<tr attrId="$!{item.id}">
<td>$!{item.name}</td>
<td>$!{item.alias}</td>
<td class="textC">
#if($!{addOrEdit})
<a href="/titan/attribute/editAttrItem?id=${item.id}"><i class="icon-pencil"></i> 编辑</a>
#end
#if($!{item.inputtype} != 4 && $!{item.inputtype} != 5 && $!{viewAttrValue})
<a class="blue" onclick="XUI.Attribute.AttrItem.showAttrVal('${item.id}')"><i class="icon-eye-open"></i> 属性值</a>
#end
#if($!{item.status} == 10)
#if($!{lock})
<a class="green" onclick="XUI.Attribute.AttrItem.unlockAttr('${item.id}')"><i class="icon-lock"></i> 已锁定</a>
#else
已锁定
#end
#else
#if($!{lock})
<a class="green" onclick="XUI.Attribute.AttrItem.lockAttr('${item.id}')"><i class="icon-lock"></i> 锁定</a>
#else
锁定
#end
#end
#if($!{delete})
<a class="red" onclick="XUI.Attribute.AttrItem.deleteAttr('${item.id}')"><i class="icon-trash"></i> 删除</a>
#end
</td>
</tr>
#end
</tbody>
</table>
<!-- 分页栏 -->
#showPage($!{page})
<script>
$(document).ready(function(){
XUI.Attribute.List.init();
});
</script>