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

Last change on this file since 370 was 370, checked in by roberth, 11 years ago

Updated studies list to handle the new data model.
Updated the bootstrap to contain some studies with attached events and persons in order to test the updated studies list
Added fieldExists method to TemplateEntity? to check whether a given field exists or not

  • Property svn:keywords set to Date Author Rev
File size: 2.8 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="nav">
15    <span class="menuButton"><a class="home" href="${createLink(uri: '/')}">Home</a></span>
16    <span class="menuButton"><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></span>
17  </div>
18  <div class="body">
19    <h1><g:message code="default.list.label" args="[entityName]" /></h1>
20    <g:if test="${flash.message}">
21      <div class="message">${flash.message}</div>
22    </g:if>
23
24      <g:each in="${studyInstanceList}" var="studyInstance">
25        <br>
26        <table>
27          <tr>
28            <td width="50"></td>
29            <td colspan="3">
30              <center><b>${studyInstance.title}</b></center>
31            </td>
32          </tr>
33          <tr>
34            <td>
35
36              <input type="checkbox" name="${studyInstance.title}" id="${studyInstance.title}"></td>
37
38            <td width="150">
39          <g:link action="show" id="${studyInstance.id}">
40${message(code: 'study.id.label', default: 'Id')} :
41${fieldValue(bean: studyInstance, field: "id")}</g:link></td>
42
43        <td width="300">
44<b>${message(code: 'study.template.label', default: 'Template')} </b>:
45${fieldValue(bean: studyInstance, field: "template")}</td>
46
47<td >
48<b>${message(code: 'study.subjects.label', default: 'Subjects')} </b>:
49${studyInstance.subjects.size()} subjects</td>
50
51        </tr>
52        <tr>
53          <td></td>
54          <td >
55<b>${message(code: 'study.owner.label', default: 'Owner')} </b>:
56${fieldValue(bean: studyInstance, field: "owner")}</td>
57
58          <td >
59<b>Assays </b>:
60        <g:each in="${studyInstance.assays}" var="assay">
61          ${assay.name}
62        </g:each>
63          </td>
64
65          <td><b> Samples </b>:
66          <g:each in="${studyInstance.assays.samples}" var="samples">
67          ${samples.name}
68          </g:each>
69          </td>
70
71
72        </tr>
73        <g:if test="${studyInstance.fieldExists( 'Description' )}">
74        <tr>
75          <td></td>
76          <td colspan="3">
77            <b>${message(code: 'study.description.label', default: 'Description')} </b>:
78            ${studyInstance.getFieldValue( 'Description' )}
79           
80          </td>
81        </tr>
82        </g:if>
83        </table>
84      </g:each>
85   
86    <div class="paginateButtons">
87      <g:paginate total="${studyInstanceTotal}" />
88      <br>
89      <INPUT TYPE=submit name=submit Value="Compare selected studies">
90    </div>
91  </div>
92</g:form>
93</body>
94</html>
Note: See TracBrowser for help on using the repository browser.