source: trunk/grails-app/views/exporter/index.gsp @ 1545

Last change on this file since 1545 was 1430, checked in by work@…, 13 years ago
  • set keyword expansion
  • Property svn:keywords set to Rev Author Date
File size: 3.1 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>SimpleTox Exporter</title>
9
10   
11
12
13</head>
14<body>
15
16  <g:formRemote url="[controller:'exporter',action:'export']" name="simpleToxForm" onComplete="file://" onFailure="alert('Error while exporting the file');" >
17
18  <div class="body">
19    <h1>Export as SimpleTox</h1>
20    <br> Select the study you want to export in SimpleTox format.<br>
21    If you choose multiple studies, a ZIP file will be created.
22    <br><br>
23    <g:if test="${flash.message}">
24      <div class="message">${flash.message}</div>
25    </g:if>
26
27    <div class="list">
28      <table>
29          <thead>
30              <tr>
31                  <th></th>
32                  <g:sortableColumn property="code" title="${message(code: 'study.code.label', default: 'Code')}" />
33                      <th>Title</th>
34                  <th>Subjects</th>
35                  <th>Events</th>
36                  <th>Assays</th>
37              </tr>
38          </thead>
39          <tbody>
40          <g:each in="${studyInstanceList}" var="studyInstance" status="i" >
41              <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
42
43                  <td><input type="checkbox" name="${studyInstance.code}" id="checked_studies"></td>
44
45                  <td><g:link controller="study" action="show" id="${studyInstance.id}">${fieldValue(bean: studyInstance, field: "code")}</g:link></td>
46                      <td>
47                              ${fieldValue(bean: studyInstance, field: "title")}
48                      </td>
49                  <td>
50                    <g:if test="${studyInstance.subjects.species.size()==0}">
51                      -
52                    </g:if>
53                    <g:else>
54                      <g:each in="${studyInstance.subjects.species.unique()}" var="currentSpecies" status="j">
55                        <g:if test="${j > 0}">, </g:if>
56                        <%= studyInstance.subjects.findAll { return it.species == currentSpecies; }.size() %>
57                        ${currentSpecies}
58                      </g:each>
59                    </g:else>
60                  </td>
61
62                  <td>
63                    <g:if test="${studyInstance.giveEventTemplates().size()==0}">
64                      -
65                    </g:if>
66                    <g:else>
67                      ${studyInstance.giveEventTemplates().name.join( ', ' )}
68                    </g:else>
69                  </td>
70
71                  <td>
72                    <g:if test="${studyInstance.assays.size()==0}">
73                      -
74                    </g:if>
75                    <g:else>
76                      ${studyInstance.assays.module.platform.unique().join( ', ' )}
77                    </g:else>
78                  </td>
79              </tr>
80          </g:each>
81          </tbody>
82      </table>
83    </div>
84
85
86    <div class="paginateButtons" id="button">
87    </div>
88
89    <input type="submit" value="Export"/>
90
91  </div>
92
93</g:formRemote>
94
95</body>
96</html>
Note: See TracBrowser for help on using the repository browser.