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