source: trunk/grails-app/views/personRole/list.gsp @ 379

Last change on this file since 379 was 379, checked in by roberth, 9 years ago

Updated the person, personrole and personaffiliation view templates in order to create a consistent example for simple tables.
Also updated bootstrap.groovy to contain several persons and roles

File size: 2.5 KB
Line 
1
2<%@ page import="dbnp.studycapturing.PersonRole" %>
3<html>
4    <head>
5        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6        <meta name="layout" content="main" />
7        <g:set var="entityName" value="${message(code: 'personRole.label', default: 'PersonRole')}" />
8        <title><g:message code="default.list.label" args="['Role']" /></title>
9    </head>
10    <body>
11
12        <div class="body">
13            <h1><g:message code="default.list.label" args="['Role']" /></h1>
14            <g:if test="${flash.message}">
15            <div class="message">${flash.message}</div>
16            </g:if>
17            <div class="list">
18                <table>
19                    <thead>
20                        <tr>
21                            <g:sortableColumn property="name" title="${message(code: 'personRole.name.label', default: 'Name')}" />
22                            <th></th>
23                        </tr>
24                    </thead>
25                    <tbody>
26                    <g:each in="${personRoleInstanceList}" status="i" var="personRoleInstance">
27                        <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
28                       
29                            <td>${fieldValue(bean: personRoleInstance, field: "name")}</td>
30                            <td class="buttons">
31                              <g:form>
32                                  <g:hiddenField name="id" value="${personRoleInstance?.id}" />
33                                  <span class="button"><g:actionSubmit class="edit" action="edit" value="${message(code: 'default.button.edit.label', default: 'Edit')}" /></span>
34                                  <span class="button"><g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" /></span>
35                              </g:form>
36                            </td>
37                        </tr>
38                    </g:each>
39                    </tbody>
40                </table>
41            </div>
42            <div class="paginateButtons">
43                <g:paginate total="${personRoleInstanceTotal}" />
44            </div>
45            <div class="buttons">
46                <span class="button"><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></span>
47            </div>
48        </div>
49    </body>
50</html>
Note: See TracBrowser for help on using the repository browser.