Changeset 211 for trunk/grails-app/views
- Timestamp:
- Feb 24, 2010, 1:04:40 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/views/study/show.gsp
r210 r211 37 37 <b>Template </b>:<g:link controller="template" action="show" id="${studyInstance?.template?.id}">${studyInstance?.template?.encodeAsHTML()}</g:link><br> 38 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 39 62 <b>Sampling Events </b>: 40 41 63 <% def tmpList = [] %> 42 64 43 <g:each in="${studyInstance.events}" var="s"> 44 <g:if test="${s.eventDescription.isSamplingEvent}"> 45 tmpList.add(s.eventDescription) 46 </g:if> 65 <g:each in="${studyInstance.samplingEvents}" var="s"> 66 <% tmpList.add(s.eventDescription) %> 47 67 </g:each> 48 68 … … 56 76 <g:each in="${tmpList}" var="samplingEvent"> 57 77 <g:if test="${(samplingEvent.name!=sampEvent)}"> 58 ${samplingEvent s.name}78 ${samplingEvent.name} 59 79 </g:if> 60 80 </g:each> 61 81 </g:else> 62 82 <br> 63 64 65 83 <b>Last Updated </b>:<g:formatDate date="${studyInstance?.lastUpdated}" /><br> 66 <b>Readers </b>:<ul> 84 <b>Readers </b>: 85 86 <g:if test="${studyInstance.readers.size()==0}"> 87 - 88 </g:if> 89 <g:else> 90 <ul> 67 91 <g:each in="${studyInstance.readers}" var="r"> 68 92 <li><g:link controller="user" action="show" id="${r.id}">${r?.encodeAsHTML()}</g:link></li> 69 93 </g:each> 70 </ul> <br> 94 </ul> 95 </g:else> 96 <br> 71 97 <b>Code </b>: ${fieldValue(bean: studyInstance, field: "code")} <br> 72 <b>Editors </b>: <ul> 98 <b>Editors </b>: 99 <g:if test="${studyInstance.editors.size()==0}"> 100 - 101 </g:if> 102 <g:else> 103 <ul> 73 104 <g:each in="${studyInstance.editors}" var="e"> 74 105 <li><g:link controller="user" action="show" id="${e.id}">${e?.encodeAsHTML()}</g:link></li> 75 106 </g:each> 76 </ul> <br> 107 </ul> 108 </g:else> 109 <br> 77 110 <b>EC Code </b>: ${fieldValue(bean: studyInstance, field: "ecCode")} <br> 78 111 <b>Research Question </b>: ${fieldValue(bean: studyInstance, field: "researchQuestion")} <br> … … 143 176 <g:each in="${dbnp.studycapturing .Protocol.list()}" var="s"> 144 177 145 <% if (studyInstance.events.eventDescription.protocol.contains(s)) { %> 178 <% if ((studyInstance.events.eventDescription.protocol.contains(s))|| 179 (studyInstance.samplingEvents.eventDescription.protocol.contains(s))) { %> 146 180 147 181 <tr> … … 175 209 <g:each in="${studyInstance.events}" var="e"> 176 210 <tr> 177 178 211 <td><g:link controller="event" action="edit" id="${e.id}">${e.subject.id}</g:link></td> 179 212 <td>${e.getPrettyDuration(studyInstance.startDate,e.startTime)}</td> 180 213 <td>${e.getPrettyDuration()}</td> 181 214 <td><g:link controller="event" action="show" id="${e.id}"> ${e.eventDescription.name}</g:link></td> 182 <g:if test="${e.eventDescription.isSamplingEvent}"> 183 <td><input type="checkbox" id="" disabled="false" value="true"></td> 184 </g:if> 185 <g:else> 186 <td><input type="checkbox" id="" disabled="false" value="false"></td> 187 </g:else> 215 <td><g:checkBox name="event" disabled="${true}" value="${false}"/></td> 188 216 <td>${e.eventDescription.protocol.parameters.name}</td> 189 217 </tr> 190 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 191 232 </table> 192 233 </div> … … 196 237 <tr> 197 238 198 <td><b> Name</b></td>239 <td><b>Event Name</b></td> 199 240 <td><b>Parameters </b></td> 200 241 </tr> … … 229 270 </g:if> 230 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 231 295 </table> 232 296 233 <g:form> 234 235 <span class="button"><g:actionSubmit class="event" action="create" value="${message(code: 'default.button.create.label', default: 'Create')}" /></span> 297 <g:form controller="eventDescription" action="create"> 298 <INPUT TYPE=submit name=submit Value="New Event Description"> 236 299 </g:form> 237 300 … … 243 306 </g:if> 244 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> 245 317 <g:each in="${studyInstance.assays}" var="assay"> 246 ${assay.name} 247 </g:each> 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> 248 333 </g:else> 249 334 </div>
Note: See TracChangeset
for help on using the changeset viewer.