Changeset 223
- Timestamp:
- Mar 2, 2010, 1:37:40 PM (13 years ago)
- Location:
- trunk/grails-app/views/study
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/views/study/list_extended.gsp
r212 r223 11 11 <script type="text/javascript"> 12 12 $(function() { 13 $("# accordions").accordion();13 $("#tabs").tabs(); 14 14 }); 15 15 </script> … … 19 19 20 20 <% studyList = dbnp.studycapturing.Study.list() %> 21 <% def att_list = ['template','startDate',' samplingEvents','lastUpdated','readers','code','editors','ecCode','researchQuestion','title','description','owner','dateCreated'] %>21 <% def att_list = ['template','startDate','events','samplingEvents','lastUpdated','readers','code','editors','ecCode','researchQuestion','title','description','owner','dateCreated'] %> 22 22 <% def selectedStudies = [] %> 23 23 <% def tmpList = [] %> … … 47 47 <% if (selectedStudies.size()>0) {%> 48 48 49 <div id="accordions"> 50 51 <a href="#"> Study Information </a> 52 <div> 49 50 <div id="tabs"> 51 <ul> 52 <li><a href="#study">Study Information</a></li> 53 <li><a href="#subjects">Subjects</a></li> 54 <li><a href="#groups">Groups</a></li> 55 <li><a href="#protocols">Protocols</a></li> 56 <li><a href="#events">Events</a></li> 57 <li><a href="#event-description">Event Description</a></li> 58 <li><a href="#event-group">Event Groups</a></li> 59 <li><a href="#assays">Assays</a></li> 60 </ul> 61 62 63 <div id="study"> 53 64 <br> 54 65 <table> … … 56 67 <td></td> 57 68 <g:each in="${selectedStudies}" status="j" var="studyIns"> 58 <td><b>${studyIns.title}</b></td>69 <td width="50%"><b>${studyIns.title}</b></td> 59 70 </g:each> 60 71 </tr> … … 71 82 <td><b>${att[0].toUpperCase()+att.substring(1)}</b></td> 72 83 <g:each in="${selectedStudies}" status="k" var="studyIns"> 84 85 <g:if test="${att == 'events'}"> 86 <td> 87 <% def eventList = [] %> 88 <g:each in="${studyIns.events}" var="s"> 89 <% eventList.add(s.eventDescription) %> 90 </g:each> 91 <g:if test="${eventList.size()==0}"> 92 - 93 </g:if> 94 <g:else> 95 <% def sampEvent = eventList.get(0).name %> 96 ${sampEvent} 97 <g:each in="${eventList}" var="event"> 98 <g:if test="${(event.name!=sampEvent)}"> 99 ${event.name} 100 </g:if> 101 </g:each> 102 </g:else> 103 </td> 104 </g:if> 105 106 <g:elseif test="${att == 'samplingEvents'}"> 107 <td> 108 <% def SampeventList = [] %> 109 <g:each in="${studyIns.samplingEvents}" var="s"> 110 <% SampeventList.add(s.eventDescription) %> 111 </g:each> 112 <g:if test="${SampeventList.size()==0}"> 113 - 114 </g:if> 115 <g:else> 116 <% def samplEvent = SampeventList.get(0).name %> 117 ${samplEvent} 118 <g:each in="${SampeventList}" var="samplingEvent"> 119 <g:if test="${(samplingEvent.name!=samplEvent)}"> 120 ${samplingEvent.name} 121 </g:if> 122 </g:each> 123 </g:else> 124 </td> 125 </g:elseif> 126 127 <g:else> 73 128 <td>${fieldValue(bean: studyIns, field: att)}</td> 129 </g:else> 74 130 </g:each> 75 131 </tr> … … 79 135 </div> 80 136 81 <a href="#"> Subjects </a><div>137 <div id="subjects"> 82 138 83 139 <table border="2"> … … 127 183 </div> 128 184 129 <a href="#"> Groups </a> <div> 130 185 <div id="groups"> 186 <table border="2"> 187 <tr> 188 <g:each in="${selectedStudies}" var="study"> 189 <td width="50%"><center><b>${study.title}</b></center></td> 190 </g:each> 191 </tr> 192 <tr> 193 <g:each in="${selectedStudies}" var="study"> 194 <td> 195 <g:if test="${study.groups.size()==0}"> No groups in this study </g:if> 196 <g:else><center><b>${study.groups}</b></center></g:else> 197 </td> 198 </g:each> 199 </tr> 200 </table> 131 201 </div> 132 202 133 <a href="#"> Protocols </a><div>203 <div id="protocols"> 134 204 <table border="2"> 135 205 <tr> 136 206 <g:each in="${selectedStudies}" var="study"> 137 <td ><center><b>${study.title}</b></center></td>207 <td width="50%"><center><b>${study.title}</b></center></td> 138 208 </g:each> 139 209 </tr> … … 152 222 <% def protocol_list = [] %> 153 223 <% def tmp_protocol = stud.events.eventDescription.protocol.get(0) %> 224 <% def tmpBis_protocol = stud.samplingEvents.eventDescription.protocol.get(0) %> 154 225 <% protocol_list.add(tmp_protocol) %> 226 <% protocol_list.add(tmpBis_protocol) %> 227 155 228 <g:each in="${stud.events.eventDescription.protocol}" var="s"> 156 157 229 <% if (tmp_protocol!=s) { %> 158 230 <% protocol_list.add(s) %> … … 160 232 </g:each> 161 233 162 <g:each in="${protocol_list}" var="protocol"> 234 <g:each in="${stud.samplingEvents.eventDescription.protocol}" var="s"> 235 <% if (tmpBis_protocol!=s) { %> 236 <% protocol_list.add(s) %> 237 <%}%> 238 </g:each> 239 240 <g:each in="${protocol_list}" var="protocol"> 163 241 <tr> 164 242 <td><g:link controller="protocol" action="show" id="${protocol.id}">${protocol.id}</g:link></td> … … 181 259 </div> 182 260 183 <a href="#"> Events </a><div>261 <div id="events"> 184 262 <table border="2"> 185 263 <tr> … … 198 276 <td><b>Subject</b></td> 199 277 <td><b>Start Time</b></td> 200 <td><b>End Time</b></td>201 278 <td><b>Duration</b></td> 202 </tr> 279 <td><b>Sampling Event</b></td> 280 <td><b>Parameters</b></td> 281 </tr> 282 203 283 <g:each in="${stud.events}" var="e"> 204 284 <tr> 205 285 <td><g:link controller="event" action="show" id="${e.id}"> ${e.eventDescription.name}</g:link></td> 206 286 <td>${e.subject.id}</td> 207 <td>${e.startTime}</td> 208 <td>${e.endTime}</td> 209 <td>${e.getDurationString()}</td> 210 </tr> 211 </g:each> 212 </table> 287 <td>${e.getPrettyDuration(stud.startDate,e.startTime)}</td> 288 <td>${e.getPrettyDuration()}</td> 289 <td><g:checkBox name="event" disabled="${true}" value="${false}"/></td> 290 <g:each in="${e.eventDescription.protocol.parameters}" var="param"> 291 <td> 292 ${param.name} : ${param.listEntries} 293 </td> 294 </g:each> 295 </tr> 296 </g:each> 297 298 <g:each in="${stud.samplingEvents}" var="e"> 299 <tr> 300 <td><g:link controller="event" action="show" id="${e.id}">${e.eventDescription.name}</g:link></td> 301 <td>${e.subject.id}</td> 302 <td>${e.getPrettyDuration(stud.startDate,e.startTime)}</td> 303 <td>${e.getPrettyDuration()}</td> 304 <td><g:checkBox name="samplingEvent" disabled="${true}" value="${true}"/></td> 305 306 <g:each in="${e.eventDescription.protocol.parameters}" var="param"> 307 <td> 308 ${param.name} : ${param.listEntries} 309 </td> 310 </g:each> 311 </tr> 312 </g:each> 313 314 315 </table> 213 316 </td> 214 317 </g:each> … … 217 320 218 321 </div> 219 220 <a href="#"> Assays </a><div> 322 323 <div id="event-description"> 324 <table border="2"> 325 <tr> 326 <g:each in="${selectedStudies}" var="study"> 327 <td><center><b>${study.title}</b></center></td> 328 </g:each> 329 </tr> 330 <tr> 331 <g:each in="${selectedStudies}" var="stud"> 332 <td> 333 <table> 334 <tr> 335 336 <td><b>Event Name</b></td> 337 <td><b>Parameters </b></td> 338 </tr> 339 <tr> 340 <td><b></b></td> 341 <td><b>Name</b></td> 342 <td><b>Description</b></td> 343 <td><b>Unit</b></td> 344 <td><b>Reference</b></td> 345 <td><b>Options</b></td> 346 <td><b>Type</b></td> 347 </tr> 348 <g:each in="${dbnp.studycapturing.EventDescription.list()}" var="e"> 349 <g:if test="${(stud.events.eventDescription.contains(e))}" > 350 <tr> 351 <td>${e.name} </td></tr><tr> 352 <g:each in="${e.protocol.parameters}" var="p"> 353 <td></td> 354 <td>${p.name}</td> 355 <td>${p.description}</td> 356 <td>${p.unit}</td> 357 <td>${p.reference}</td> 358 <g:if test="${(p.listEntries.size()==0)}" > 359 <td>-</td> 360 </g:if> 361 <g:else> 362 <td>${p.listEntries}</td> 363 </g:else> 364 <td>${p.type}</td> 365 </tr> 366 </g:each> 367 </g:if> 368 </g:each> 369 370 <g:each in="${dbnp.studycapturing.EventDescription.list()}" var="e"> 371 <g:if test="${(stud.samplingEvents.eventDescription.contains(e))}" > 372 <tr> 373 <td>${e.name} </td></tr><tr> 374 <g:each in="${e.protocol.parameters}" var="p"> 375 <td></td> 376 <td>${p.name}</td> 377 <td>${p.description}</td> 378 <td>${p.unit}</td> 379 <td>${p.reference}</td> 380 <g:if test="${(p.listEntries.size()==0)}" > 381 <td>-</td> 382 </g:if> 383 <g:else> 384 <td>${p.listEntries}</td> 385 </g:else> 386 <td>${p.type}</td> 387 </tr> 388 </g:each> 389 </g:if> 390 </g:each> 391 392 </table> 393 </td> 394 </g:each> 395 </tr> 396 </table> 397 398 </div> 399 400 <div id="event-group"> 401 </div> 402 403 <div id="assays"> 404 <table border="2"> 405 <tr> 406 <g:each in="${selectedStudies}" var="study"> 407 <td><center><b>${study.title}</b></center></td> 408 </g:each> 409 </tr> 410 <tr> 411 <g:each in="${selectedStudies}" var="stud"> 412 <td> 413 <table> 414 <tr><td> 415 <g:if test="${stud.assays.size()==0}"> 416 No assays in this study 417 </g:if> 418 <g:else> 419 <table> 420 <tr> 421 422 <td width="100"><b>Assay Name</b></td> 423 <td width="100"><b>Module</b></td> 424 <td><b>Type</b></td> 425 <td width="150"><b>Platform</b></td> 426 <td><b>Url</b></td> 427 <td><b>Samples</b></td> 428 </tr> 429 <g:each in="${stud.assays}" var="assay"> 430 <tr> 431 <td>${assay.name}</td> 432 <td>${assay.module.name}</td> 433 <td>${assay.module.type}</td> 434 <td>${assay.module.platform}</td> 435 <td>${assay.module.url}</td> 436 <td> 437 <g:each in="${assay.samples}" var="assaySample"> 438 ${assaySample.name}<br> 439 </g:each> 440 </td> 441 </tr> 442 </g:each> 443 </table> 444 </g:else> 445 446 447 </table> 448 </td> 449 </g:each> 450 </tr> 451 </table> 452 221 453 </div> 222 454 -
trunk/grails-app/views/study/show.gsp
r212 r223 9 9 <script type="text/javascript"> 10 10 $(function() { 11 $("# accordion").accordion();11 $("#tabs").tabs(); 12 12 }); 13 13 </script> … … 31 31 <% protocolList = dbnp.studycapturing.Protocol.list() %> 32 32 33 <div id="accordion"> 34 <a href="#"> Study Information </a> 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"> 35 48 36 <div><b> Id </b>: ${fieldValue(bean: studyInstance, field: "id")} <br>49 <b> Id </b>: ${fieldValue(bean: studyInstance, field: "id")} <br> 37 50 <b>Template </b>:<g:link controller="template" action="show" id="${studyInstance?.template?.id}">${studyInstance?.template?.encodeAsHTML()}</g:link><br> 38 51 <b> Start </b>:<g:formatDate date="${studyInstance?.startDate}" /> <br> … … 116 129 </div> 117 130 118 <a href="#"> Subjects </a><div>131 <div id="subjects"> 119 132 <table> 120 133 <tr> … … 146 159 </div> 147 160 148 <a href="#"> Groups </a> <div>161 <div id="groups"> 149 162 <g:if test="${studyInstance.groups.size()==0}"> 150 163 No groups in this study … … 157 170 </div> 158 171 159 <a href="#"> Protocols </a><div>172 <div id="protocols"> 160 173 <table> 161 174 <tr> … … 165 178 <td><b>Reference</b></td> 166 179 </tr> 167 <g:each in="${dbnp.studycapturing .Protocol.list()}" var="s"> 168 169 <% if ((studyInstance.events.eventDescription.protocol.contains(s))|| 170 (studyInstance.samplingEvents.eventDescription.protocol.contains(s))) { %> 171 172 <tr> 173 <td><g:link controller="protocol" action="show" id="${s.id}">${s.id}</g:link></td> 174 <td>${s.name}</td> 180 181 <% def protocol_list = [] %> 182 <% def tmp_protocol = studyInstance.events.eventDescription.protocol.get(0) %> 183 <% def tmpBis_protocol = studyInstance.samplingEvents.eventDescription.protocol.get(0) %> 184 <% protocol_list.add(tmp_protocol) %> 185 <% protocol_list.add(tmpBis_protocol) %> 186 187 <g:each in="${studyInstance.events.eventDescription.protocol}" var="s"> 188 189 <% if (tmp_protocol!=s) { %> 190 <% protocol_list.add(s) %> 191 <%}%> 192 </g:each> 193 194 <g:each in="${studyInstance.samplingEvents.eventDescription.protocol}" var="s"> 195 196 <% if (tmpBis_protocol!=s) { %> 197 <% protocol_list.add(s) %> 198 <%}%> 199 </g:each> 200 201 202 <g:each in="${protocol_list}" var="protocol"> 203 <tr> 204 <td><g:link controller="protocol" action="show" id="${protocol.id}">${protocol.id}</g:link></td> 205 <td>${protocol.name}</td> 175 206 <td> 176 <g:each in="${ s.parameters}" var="p"><ul><li>207 <g:each in="${protocol.parameters}" var="p"><ul><li> 177 208 <g:link controller="protocolParameter" action="show" id="${p.id}">${p.name}</g:link> 178 209 </li></ul> 179 210 </g:each> 180 211 </td> 181 <td>${s.reference}</td> 182 </tr> 183 <% } %> 212 <td>${protocol.reference}</td> 213 </tr> 184 214 185 215 </g:each> … … 187 217 </div> 188 218 189 <a href="#"> Events </a><div>219 <div id="events"> 190 220 <table> 191 221 <tr> … … 205 235 <td><g:link controller="event" action="show" id="${e.id}"> ${e.eventDescription.name}</g:link></td> 206 236 <td><g:checkBox name="event" disabled="${true}" value="${false}"/></td> 207 <td>${e.eventDescription.protocol.parameters.name}</td> 208 </tr> 237 238 <g:each in="${e.eventDescription.protocol.parameters}" var="param"> 239 <td> 240 ${param.name} : ${param.listEntries} 241 </td> 242 </g:each> 243 </tr> 209 244 </g:each> 210 245 … … 215 250 <td>${e.getPrettyDuration()}</td> 216 251 <td><g:link controller="event" action="show" id="${e.id}"> ${e.eventDescription.name}</g:link></td> 217 <td><g:checkBox name="samplingEvent" disabled="${true}" value="${true}"/> 218 </td> 219 <td>${e.eventDescription.protocol.parameters.name}</td> 252 <td><g:checkBox name="samplingEvent" disabled="${true}" value="${true}"/></td> 253 254 <g:each in="${e.eventDescription.protocol.parameters}" var="param"> 255 <td> 256 ${param.name} : ${param.listEntries} 257 </td> 258 </g:each> 220 259 </tr> 221 260 </g:each> … … 224 263 </div> 225 264 226 <a href="#"> Event Description </a><div>265 <div id="event-description"> 227 266 <table> 228 267 <tr> … … 292 331 </div> 293 332 294 <a href="#"> Assays </a><div> 333 <div id="event-group"> 334 </div> 335 336 <div id="assays"> 295 337 <g:if test="${studyInstance.assays.size()==0}"> 296 338 No assays in this study
Note: See TracChangeset
for help on using the changeset viewer.