source: trunk/grails-app/views/searchable/selectsample.gsp @ 194

Last change on this file since 194 was 194, checked in by ademcan, 13 years ago

the Searchable views for the querying part

File size: 1.9 KB
RevLine 
[194]1<html>
2
3  <head>
4      <title>Generic Study Capture Framework - Query studies</title>
5      <meta name="layout" content="main" />
6    </head>
7
8<body>
9
10  <h1>Advanced query - select samples</h1>
11  <br>
12
13   <% def tmpList = [] %>
14    <% studyList = dbnp.studycapturing.Study.list() %>
15<% def selectedStudies = [] %>
16
17<% params.each{key,values-> %>
18    <% if (values=="on"){ %>
19      <% tmpList.add(key) %>
20    <%  } }%>
21
22  <% for (i in studyList) {%>
23    <% if (tmpList.contains(i.getTitle())) { %>
24      <% selectedStudies.add(i) %>
25     <% }} %>
26   
27  <% if (selectedStudies.size()>0) {%>
28       <table >
29
30         <tr>
31           <td></td>
32           <td><b> Study </b></td>
33           <td><b> Subject </b></td>
34           <td><b> Sampling Events </b></td>
35           <td><b> Sample Name </b></td>
36           <td><b> Sample Material </b></td>
37           <td><b> Duration </b></td>
38         </tr>
39     <g:each in="${selectedStudies}" status="j" var="studyIns">
40  <tr>
41  <td> <input type="checkbox" name="${studyIns.title}" id="${studyIns.title}"> </td>
42          <td> ${studyIns.title} </td>
43         
44        </tr>
45  <g:each in ="${studyIns.events}" var="events">
46        <tr>
47          <td></td><td></td>
48          <td> <input type="checkbox" name="${events.subject.name}" id="${events.subject.name}">
49  ${events.subject.name} </td>
50          <td> ${studyIns.samplingEvents} </td>
51          <td> ${studyIns.samplingEvents.samples.name}</td>
52          <td> ${studyIns.samplingEvents.samples.material}</td>
53          <td> ${events.getDurationString()}</td>
54        </tr>
55     </g:each>
56     </g:each>
57       
58       </table>
59<%}%>
60
61       <% if (selectedStudies.size()==0) {%>
62    Please select studies to query samples.
63    <% } %>
64
65    <br>
66    <INPUT TYPE=submit name=submit Value="<< Back to study selection">
67    <INPUT TYPE=submit name=submit Value=">> Execute and continue with biomarker selection">
68
69  </body>
70</html>
Note: See TracBrowser for help on using the repository browser.