Last change
on this file since 1213 was
1213,
checked in by robert@…, 12 years ago
|
Improved the study overview page such that the different tabs are loaded when needed. Also rewritten parts of the code. See ticket #155
|
File size:
1.0 KB
|
Line | |
---|
1 | <% |
---|
2 | // Determine a list of all persons |
---|
3 | allPersons = studyList*.persons*.person.flatten().unique() |
---|
4 | %> |
---|
5 | <g:if test="${allPersons?.size()==0}"> |
---|
6 | No persons involved in these studies |
---|
7 | </g:if> |
---|
8 | <g:else> |
---|
9 | <table> |
---|
10 | <tr> |
---|
11 | <thead> |
---|
12 | <th>Name</th> |
---|
13 | <th>Affiliations</th> |
---|
14 | <th>Phone</th> |
---|
15 | <th>Email</th> |
---|
16 | <g:if test="${multipleStudies}"> |
---|
17 | <g:each in="${studyList}" var="studyInstance"> |
---|
18 | <th>${studyInstance.title}</th> |
---|
19 | </g:each> |
---|
20 | </g:if> |
---|
21 | <g:else> |
---|
22 | <th>Role</th> |
---|
23 | </g:else> |
---|
24 | </thead> |
---|
25 | </tr> |
---|
26 | <g:each in="${allPersons}" var="person" status="i"> |
---|
27 | <tr class="${(i % 2) == 0 ? 'odd' : 'even'}"> |
---|
28 | <td>${person.firstName} ${person.prefix} ${person.lastName}</td> |
---|
29 | <td> |
---|
30 | ${person.affiliations.join(', ')} |
---|
31 | </td> |
---|
32 | <td>${person.phone}</td> |
---|
33 | <td>${person.email}</td> |
---|
34 | <g:each in="${studyList}" var="studyInstance"> |
---|
35 | <% |
---|
36 | studyperson = studyInstance.persons.find { it.person == person } |
---|
37 | %> |
---|
38 | <td> |
---|
39 | <g:if test="${studyperson}"> |
---|
40 | ${studyperson.role.name} |
---|
41 | </g:if> |
---|
42 | </td> |
---|
43 | </g:each> |
---|
44 | |
---|
45 | </tr> |
---|
46 | </g:each> |
---|
47 | </table> |
---|
48 | </g:else> |
---|
Note: See
TracBrowser
for help on using the repository browser.