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.show.label" args="[entityName]" /></title> |
---|
9 | <script type="text/javascript"> |
---|
10 | $(function() { |
---|
11 | $("#tabs").tabs(); |
---|
12 | }); |
---|
13 | </script> |
---|
14 | |
---|
15 | </head> |
---|
16 | <body> |
---|
17 | |
---|
18 | <div class="nav"> |
---|
19 | <span class="menuButton"><a class="home" href="${createLink(uri: '/')}">Home</a></span> |
---|
20 | <span class="menuButton"><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></span> |
---|
21 | <span class="menuButton"><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></span> |
---|
22 | </div> |
---|
23 | |
---|
24 | <div class="body"> |
---|
25 | <h1><g:message code="default.show.label" args="[entityName]" /></h1> |
---|
26 | <g:if test="${flash.message}"> |
---|
27 | <div class="message">${flash.message}</div> |
---|
28 | </g:if> |
---|
29 | <div class="dialog"> |
---|
30 | |
---|
31 | <% protocolList = dbnp.studycapturing.Protocol.list() %> |
---|
32 | |
---|
33 | |
---|
34 | |
---|
35 | <div id="tabs"> |
---|
36 | <ul> |
---|
37 | <li><a href="#study">Study Information</a></li> |
---|
38 | <li><a href="#subjects">Subjects</a></li> |
---|
39 | <li><a href="#groups">Groups</a></li> |
---|
40 | <li><a href="#protocols">Protocols</a></li> |
---|
41 | <li><a href="#events">Events</a></li> |
---|
42 | <li><a href="#event-description">Event Description</a></li> |
---|
43 | <li><a href="#event-group">Event Groups</a></li> |
---|
44 | <li><a href="#assays">Assays</a></li> |
---|
45 | </ul> |
---|
46 | |
---|
47 | <div id="study"> |
---|
48 | |
---|
49 | <b> Id </b>: ${fieldValue(bean: studyInstance, field: "id")} <br> |
---|
50 | <b>Template </b>:<g:link controller="template" action="show" id="${studyInstance?.template?.id}">${studyInstance?.template?.encodeAsHTML()}</g:link><br> |
---|
51 | <b> Start </b>:<g:formatDate date="${studyInstance?.startDate}" /> <br> |
---|
52 | <b> Events </b>: |
---|
53 | <% def eventList = [] %> |
---|
54 | |
---|
55 | <g:each in="${studyInstance.events}" var="s"> |
---|
56 | <% eventList.add(s.eventDescription) %> |
---|
57 | </g:each> |
---|
58 | |
---|
59 | <g:if test="${eventList.size()==0}"> |
---|
60 | - |
---|
61 | </g:if> |
---|
62 | |
---|
63 | <g:else> |
---|
64 | <% def sampEvent = eventList.get(0).name %> |
---|
65 | ${sampEvent} |
---|
66 | <g:each in="${eventList}" var="samplingEvent"> |
---|
67 | <g:if test="${(samplingEvent.name!=sampEvent)}"> |
---|
68 | ${samplingEvent.name} |
---|
69 | </g:if> |
---|
70 | </g:each> |
---|
71 | </g:else> |
---|
72 | <br> |
---|
73 | |
---|
74 | |
---|
75 | <b>Sampling Events </b>: |
---|
76 | <% def tmpList = [] %> |
---|
77 | |
---|
78 | <g:each in="${studyInstance.samplingEvents}" var="s"> |
---|
79 | <% tmpList.add(s.eventDescription) %> |
---|
80 | </g:each> |
---|
81 | |
---|
82 | <g:if test="${tmpList.size()==0}"> |
---|
83 | - |
---|
84 | </g:if> |
---|
85 | |
---|
86 | <g:else> |
---|
87 | <% def sampEvent = tmpList.get(0).name %> |
---|
88 | ${sampEvent} |
---|
89 | <g:each in="${tmpList}" var="samplingEvent"> |
---|
90 | <g:if test="${(samplingEvent.name!=sampEvent)}"> |
---|
91 | ${samplingEvent.name} |
---|
92 | </g:if> |
---|
93 | </g:each> |
---|
94 | </g:else> |
---|
95 | <br> |
---|
96 | <b>Last Updated </b>:<g:formatDate date="${studyInstance?.lastUpdated}" /><br> |
---|
97 | <b>Readers </b>: |
---|
98 | |
---|
99 | <g:if test="${studyInstance.readers.size()==0}"> |
---|
100 | - |
---|
101 | </g:if> |
---|
102 | <g:else> |
---|
103 | <ul> |
---|
104 | <g:each in="${studyInstance.readers}" var="r"> |
---|
105 | <li><g:link controller="user" action="show" id="${r.id}">${r?.encodeAsHTML()}</g:link></li> |
---|
106 | </g:each> |
---|
107 | </ul> |
---|
108 | </g:else> |
---|
109 | <br> |
---|
110 | <b>Code </b>: ${fieldValue(bean: studyInstance, field: "code")} <br> |
---|
111 | <b>Editors </b>: |
---|
112 | <g:if test="${studyInstance.editors.size()==0}"> |
---|
113 | - |
---|
114 | </g:if> |
---|
115 | <g:else> |
---|
116 | <ul> |
---|
117 | <g:each in="${studyInstance.editors}" var="e"> |
---|
118 | <li><g:link controller="user" action="show" id="${e.id}">${e?.encodeAsHTML()}</g:link></li> |
---|
119 | </g:each> |
---|
120 | </ul> |
---|
121 | </g:else> |
---|
122 | <br> |
---|
123 | <b>EC Code </b>: ${fieldValue(bean: studyInstance, field: "ecCode")} <br> |
---|
124 | <b>Research Question </b>: ${fieldValue(bean: studyInstance, field: "researchQuestion")} <br> |
---|
125 | <b>Title </b>: ${fieldValue(bean: studyInstance, field: "title")} <br> |
---|
126 | <b>Description </b>: ${fieldValue(bean: studyInstance, field: "description")} <br> |
---|
127 | <b>Owner </b>:<g:link controller="user" action="show" id="${studyInstance?.owner?.id}">${studyInstance?.owner?.encodeAsHTML()}</g:link> <br> |
---|
128 | <b>Date Created </b>:<g:formatDate date="${studyInstance?.dateCreated}" /> <br> |
---|
129 | </div> |
---|
130 | |
---|
131 | <div id="subjects"> |
---|
132 | <g:each in="${studyInstance.giveSubjectTemplates()}" var="template"> |
---|
133 | <table> |
---|
134 | <tr> |
---|
135 | <td><b>Id </b></td> |
---|
136 | <td><b>Species</b></td> |
---|
137 | <td><b>Name</b></td> |
---|
138 | <g:each in="${template.fields}" var="g"> |
---|
139 | <td><b> |
---|
140 | <g:link controller="templateField" action="show" id="${g.id}"> |
---|
141 | ${g}</b></td> |
---|
142 | </g:link> |
---|
143 | </g:each> |
---|
144 | </tr> |
---|
145 | |
---|
146 | <g:each in="${studyInstance.subjects.findAll { it.template == template}}" var="s"> |
---|
147 | <tr> |
---|
148 | <td><g:link controller="subject" action="show" id="${s.id}">${s.id}</g:link></td> |
---|
149 | <td>${s.species}</td> |
---|
150 | <td>${s.name}</td> |
---|
151 | <g:each in="${template.fields}" var="g"> |
---|
152 | <td> |
---|
153 | <% print s.getFieldValue(g.toString()) %> |
---|
154 | </td> |
---|
155 | </g:each> |
---|
156 | </tr> |
---|
157 | </g:each> |
---|
158 | |
---|
159 | </table> |
---|
160 | |
---|
161 | </g:each> |
---|
162 | </div> |
---|
163 | |
---|
164 | <div id="groups"> |
---|
165 | <g:if test="${studyInstance.groups.size()==0}"> |
---|
166 | No groups in this study |
---|
167 | </g:if> |
---|
168 | <g:else> |
---|
169 | <g:each in="${studyInstance.groups}" var="g"> |
---|
170 | ${g.name} |
---|
171 | </g:each> |
---|
172 | </g:else> |
---|
173 | </div> |
---|
174 | |
---|
175 | <div id="protocols"> |
---|
176 | <table> |
---|
177 | <tr> |
---|
178 | <td><b>Id </b></td> |
---|
179 | <td><b>Name</b></td> |
---|
180 | <td><b>Parameters</b></td> |
---|
181 | <td><b>Reference</b></td> |
---|
182 | </tr> |
---|
183 | |
---|
184 | <% def protocol_list = [] %> |
---|
185 | <% def tmp_protocol = studyInstance.events.eventDescription.protocol.get(0) %> |
---|
186 | <% def tmpBis_protocol = studyInstance.samplingEvents.eventDescription.protocol.get(0) %> |
---|
187 | <% protocol_list.add(tmp_protocol) %> |
---|
188 | <% protocol_list.add(tmpBis_protocol) %> |
---|
189 | |
---|
190 | <g:each in="${studyInstance.events.eventDescription.protocol}" var="s"> |
---|
191 | |
---|
192 | <% if (tmp_protocol!=s) { %> |
---|
193 | <% protocol_list.add(s) %> |
---|
194 | <%}%> |
---|
195 | </g:each> |
---|
196 | |
---|
197 | <g:each in="${studyInstance.samplingEvents.eventDescription.protocol}" var="s"> |
---|
198 | |
---|
199 | <% if (tmpBis_protocol!=s) { %> |
---|
200 | <% protocol_list.add(s) %> |
---|
201 | <%}%> |
---|
202 | </g:each> |
---|
203 | |
---|
204 | |
---|
205 | <g:each in="${protocol_list}" var="protocol"> |
---|
206 | <tr> |
---|
207 | <td><g:link controller="protocol" action="show" id="${protocol.id}">${protocol.id}</g:link></td> |
---|
208 | <td>${protocol.name}</td> |
---|
209 | <td> |
---|
210 | <g:each in="${protocol.parameters}" var="p"><ul><li> |
---|
211 | <g:link controller="protocolParameter" action="show" id="${p.id}">${p.name}</g:link> |
---|
212 | </li></ul> |
---|
213 | </g:each> |
---|
214 | </td> |
---|
215 | <td>${protocol.reference}</td> |
---|
216 | </tr> |
---|
217 | |
---|
218 | </g:each> |
---|
219 | </table> |
---|
220 | </div> |
---|
221 | |
---|
222 | <div id="events"> |
---|
223 | <table> |
---|
224 | <tr> |
---|
225 | |
---|
226 | <td><b>Subject</b></td> |
---|
227 | <td><b>Start Time</b></td> |
---|
228 | <td><b>Duration</b></td> |
---|
229 | <td><b>Event Description</b></td> |
---|
230 | <td><b>Sampling Event</b></td> |
---|
231 | <td><b>Parameters</b></td> |
---|
232 | </tr> |
---|
233 | <g:each in="${studyInstance.events}" var="e"> |
---|
234 | <tr> |
---|
235 | <td><g:link controller="event" action="edit" id="${e.id}">${e.subject.id}</g:link></td> |
---|
236 | <td>${e.getPrettyDuration(studyInstance.startDate,e.startTime)}</td> |
---|
237 | <td>${e.getPrettyDuration()}</td> |
---|
238 | <td><g:link controller="event" action="show" id="${e.id}"> ${e.eventDescription.name}</g:link></td> |
---|
239 | <td><g:checkBox name="event" disabled="${true}" value="${false}"/></td> |
---|
240 | |
---|
241 | <g:each in="${e.eventDescription.protocol.parameters}" var="param"> |
---|
242 | <td> |
---|
243 | ${param.name} : ${param.listEntries} |
---|
244 | </td> |
---|
245 | </g:each> |
---|
246 | </tr> |
---|
247 | </g:each> |
---|
248 | |
---|
249 | <g:each in="${studyInstance.samplingEvents}" var="e"> |
---|
250 | <tr> |
---|
251 | <td><g:link controller="event" action="edit" id="${e.id}">${e.subject.id}</g:link></td> |
---|
252 | <td>${e.getPrettyDuration(studyInstance.startDate,e.startTime)}</td> |
---|
253 | <td>${e.getPrettyDuration()}</td> |
---|
254 | <td><g:link controller="event" action="show" id="${e.id}"> ${e.eventDescription.name}</g:link></td> |
---|
255 | <td><g:checkBox name="samplingEvent" disabled="${true}" value="${true}"/></td> |
---|
256 | |
---|
257 | <g:each in="${e.eventDescription.protocol.parameters}" var="param"> |
---|
258 | <td> |
---|
259 | ${param.name} : ${param.listEntries} |
---|
260 | </td> |
---|
261 | </g:each> |
---|
262 | </tr> |
---|
263 | </g:each> |
---|
264 | |
---|
265 | </table> |
---|
266 | </div> |
---|
267 | |
---|
268 | <div id="event-description"> |
---|
269 | <table> |
---|
270 | <tr> |
---|
271 | |
---|
272 | <td><b>Event Name</b></td> |
---|
273 | <td><b>Parameters </b></td> |
---|
274 | </tr> |
---|
275 | <tr> |
---|
276 | <td><b></b></td> |
---|
277 | <td><b>Name</b></td> |
---|
278 | <td><b>Description</b></td> |
---|
279 | <td><b>Unit</b></td> |
---|
280 | <td><b>Reference</b></td> |
---|
281 | <td><b>Options</b></td> |
---|
282 | <td><b>Type</b></td> |
---|
283 | </tr> |
---|
284 | <g:each in="${dbnp.studycapturing.EventDescription.list()}" var="e"> |
---|
285 | <g:if test="${(studyInstance.events.eventDescription.contains(e))}" > |
---|
286 | <tr> |
---|
287 | <td>${e.name} </td></tr><tr> |
---|
288 | <g:each in="${e.protocol.parameters}" var="p"> |
---|
289 | <td></td> |
---|
290 | <td>${p.name}</td> |
---|
291 | <td>${p.description}</td> |
---|
292 | <td>${p.unit}</td> |
---|
293 | <td>${p.reference}</td> |
---|
294 | <g:if test="${(p.listEntries.size()==0)}" > |
---|
295 | <td>-</td> |
---|
296 | </g:if> |
---|
297 | <g:else> |
---|
298 | <td>${p.listEntries}</td> |
---|
299 | </g:else> |
---|
300 | <td>${p.type}</td> |
---|
301 | </tr> |
---|
302 | </g:each> |
---|
303 | </g:if> |
---|
304 | </g:each> |
---|
305 | |
---|
306 | <g:each in="${dbnp.studycapturing.EventDescription.list()}" var="e"> |
---|
307 | <g:if test="${(studyInstance.samplingEvents.eventDescription.contains(e))}" > |
---|
308 | <tr> |
---|
309 | <td>${e.name} </td></tr><tr> |
---|
310 | <g:each in="${e.protocol.parameters}" var="p"> |
---|
311 | <td></td> |
---|
312 | <td>${p.name}</td> |
---|
313 | <td>${p.description}</td> |
---|
314 | <td>${p.unit}</td> |
---|
315 | <td>${p.reference}</td> |
---|
316 | <g:if test="${(p.listEntries.size()==0)}" > |
---|
317 | <td>-</td> |
---|
318 | </g:if> |
---|
319 | <g:else> |
---|
320 | <td>${p.listEntries}</td> |
---|
321 | </g:else> |
---|
322 | <td>${p.type}</td> |
---|
323 | </tr> |
---|
324 | </g:each> |
---|
325 | </g:if> |
---|
326 | </g:each> |
---|
327 | |
---|
328 | </table> |
---|
329 | |
---|
330 | <g:form controller="eventDescription" action="create"> |
---|
331 | <INPUT TYPE=submit name=submit Value="New Event Description"> |
---|
332 | </g:form> |
---|
333 | |
---|
334 | </div> |
---|
335 | |
---|
336 | <div id="event-group"> |
---|
337 | </div> |
---|
338 | |
---|
339 | <div id="assays"> |
---|
340 | <g:if test="${studyInstance.assays.size()==0}"> |
---|
341 | No assays in this study |
---|
342 | </g:if> |
---|
343 | <g:else> |
---|
344 | <table> |
---|
345 | <tr> |
---|
346 | <td width="100"><b>Assay Name</b></td> |
---|
347 | <td width="100"><b>Module</b></td> |
---|
348 | <td><b>Type</b></td> |
---|
349 | <td width="150"><b>Platform</b></td> |
---|
350 | <td><b>Url</b></td> |
---|
351 | <td><b>Samples</b></td> |
---|
352 | </tr> |
---|
353 | <g:each in="${studyInstance.assays}" var="assay"> |
---|
354 | <tr> |
---|
355 | <td>${assay.name}</td> |
---|
356 | <td>${assay.module.name}</td> |
---|
357 | <td>${assay.module.type}</td> |
---|
358 | <td>${assay.module.platform}</td> |
---|
359 | <td>${assay.module.url}</td> |
---|
360 | <td> |
---|
361 | <g:each in="${assay.samples}" var="assaySample"> |
---|
362 | ${assaySample.name}<br> |
---|
363 | </g:each> |
---|
364 | </td> |
---|
365 | </tr> |
---|
366 | </g:each> |
---|
367 | |
---|
368 | </table> |
---|
369 | </g:else> |
---|
370 | </div> |
---|
371 | |
---|
372 | </div> |
---|
373 | </div> |
---|
374 | <br> |
---|
375 | <div class="buttons"> |
---|
376 | <g:form> |
---|
377 | <g:hiddenField name="id" value="${studyInstance?.id}" /> |
---|
378 | <span class="button"><g:actionSubmit class="edit" action="edit" value="${message(code: 'default.button.edit.label', default: 'Edit')}" /></span> |
---|
379 | <span class="button"><g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" /></span> |
---|
380 | </g:form> |
---|
381 | </div> |
---|
382 | </div> |
---|
383 | </div> |
---|
384 | </body> |
---|
385 | </html> |
---|