source: trunk/grails-app/views/study/list.gsp @ 836

Last change on this file since 836 was 710, checked in by keesvb, 13 years ago

changed study view to list and sort on study code

  • Property svn:keywords set to Date Author Rev
File size: 3.2 KB
Line 
1
2<%@ page import="dbnp.studycapturing.Study" %>
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: 'study.label', default: 'Study')}" />
8    <title><g:message code="default.list.label" args="[entityName]" /></title>
9</head>
10<body>
11
12  <g:form action="list_extended">
13
14  <div class="body">
15    <h1><g:message code="default.list.label" args="[entityName]" /></h1>
16    <g:if test="${flash.message}">
17      <div class="message">${flash.message}</div>
18    </g:if>
19
20    <div class="list">
21      <table>
22          <thead>
23              <tr>
24                  <th></th>
25                  <g:sortableColumn property="code" title="${message(code: 'study.code.label', default: 'Code')}" />
26                      <th>Title</th>
27                  <th>Subjects</th>
28                  <th>Events</th>
29                  <th>Assays</th>
30              </tr>
31          </thead>
32          <tbody>
33          <g:each in="${studyInstanceList}" var="studyInstance" status="i" >
34              <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
35
36                  <td><input type="checkbox" name="${studyInstance.title}" id="${studyInstance.title}"></td>
37
38                  <td><g:link action="show" id="${studyInstance.id}">${fieldValue(bean: studyInstance, field: "code")}</g:link></td>
39                      <td>
40                              ${fieldValue(bean: studyInstance, field: "title")}
41                      </td>
42                  <td>
43                    <g:if test="${studyInstance.subjects.species.size()==0}">
44                      -
45                    </g:if>
46                    <g:else>
47                      <g:each in="${studyInstance.subjects.species.unique()}" var="currentSpecies" status="j">
48                        <g:if test="${j > 0}">, </g:if>
49                        <%= studyInstance.subjects.findAll { return it.species == currentSpecies; }.size() %>
50                        ${currentSpecies}
51                      </g:each>
52                    </g:else>
53                  </td>
54
55                  <td>
56                    <g:if test="${studyInstance.giveEventTemplates().size()==0}">
57                      -
58                    </g:if>
59                    <g:else>
60                      ${studyInstance.giveEventTemplates().name.join( ', ' )}
61                    </g:else>
62                  </td>
63
64                  <td>
65                    <g:if test="${studyInstance.assays.size()==0}">
66                      -
67                    </g:if>
68                    <g:else>
69                      ${studyInstance.assays.module.platform.unique().join( ', ' )}
70                    </g:else>
71                  </td>
72
73              </tr>
74          </g:each>
75          </tbody>
76      </table>
77    </div>
78    <div class="buttons">
79                <span class="button"><g:link class="create" controller="wizard" params="[jump:'create']"><g:message code="default.new.label" args="[entityName]" /></g:link></span>
80    </div>
81    <div class="paginateButtons">
82        <g:paginate total="${studyInstanceTotal}" prev="&laquo; Previous" next="&raquo; Next" />
83        <br>
84        <INPUT TYPE=submit name=submit Value="Compare selected studies">
85    </div>
86  </div>
87</g:form>
88</body>
89</html>
Note: See TracBrowser for help on using the repository browser.