/
old-list.gsp
60 lines (46 loc) · 2.42 KB
/
old-list.gsp
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
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="layout" content="main" />
<title>Entry List</title>
</head>
<body>
<div class="nav">
<span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span>
<span class="menuButton"><g:link class="create" action="create">New Entry</g:link></span>
</div>
<div class="body">
<h1>Entry List</h1>
<g:if test="${flash.message}">
<div class="message">${flash.message}</div>
</g:if>
<div class="list">
<table>
<thead>
<tr>
<g:sortableColumn property="id" title="Id" />
<g:sortableColumn property="title" title="Title" />
<g:sortableColumn property="summary" title="Summary" />
<g:sortableColumn property="dateCreated" title="Date Created" />
<g:sortableColumn property="lastUpdated" title="Last Updated" />
</tr>
</thead>
<tbody>
<g:each in="${entryInstanceList}" status="i" var="entryInstance">
<tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
<td><g:link action="show" id="${entryInstance.id}">${fieldValue(bean:entryInstance, field:'id')}</g:link></td>
<td>${fieldValue(bean:entryInstance, field:'title')}</td>
<td>${fieldValue(bean:entryInstance, field:'summary')}</td>
<td>${fieldValue(bean:entryInstance, field:'dateCreated')}</td>
<td>${fieldValue(bean:entryInstance, field:'lastUpdated')}</td>
</tr>
</g:each>
</tbody>
</table>
</div>
<div class="paginateButtons">
<g:paginate total="${Entry.count()}" />
</div>
</div>
</body>
</html>