Changeset 165
- Timestamp:
- Feb 3, 2010, 10:09:19 AM (14 years ago)
- Location:
- trunk/grails-app
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/conf/BootStrap.groovy
r162 r165 135 135 ).with { if (!validate()) { errors.each { println it} } else save()} 136 136 137 def eventTreatment2 = new EventDescription( 138 name: 'Treatment2', 139 description: 'Treatment Protocol NuGO PPS1', 140 classification: treatmentTerm, 141 protocol: treatmentProtocol2 142 ).with { if (!validate()) { errors.each { println it} } else save()} 137 143 138 144 // studies … … 193 199 startTime: Date.parse('yyyy-MM-dd','2008-01-07'), 194 200 endTime: Date.parse('yyyy-MM-dd','2008-01-14'), 195 eventDescription: eventTreatment ,201 eventDescription: eventTreatment2, 196 202 parameterStringValues: ['Diet':'10% fat (palm oil)','Compound':'Vehicle','Administration':'intraperitoneal injection']) 197 203 ).with { if (!validate()) { errors.each { println it} } else save()} -
trunk/grails-app/controllers/StudyController.groovy
r162 r165 16 16 def scaffold = dbnp.studycapturing.Study 17 17 18 def list_extended = { 19 20 } 21 18 22 def see = { 19 23 render params -
trunk/grails-app/views/study/list.gsp
r148 r165 10 10 <body> 11 11 12 <g:form action="list_extended .gsp">12 <g:form action="list_extended"> 13 13 14 14 <div class="nav"> -
trunk/grails-app/views/study/list_extended.gsp
r156 r165 82 82 <table border="2"> 83 83 <tr> 84 <td></td> 85 <g:each in="${dbnp.studycapturing.Study.list()}" var="stud"> 84 <g:each in="${selectedStudies}" var="study"> 85 <td><center><b>${study.title}</b></center></td> 86 </g:each> 87 </tr> 88 89 <tr> 90 <g:each in="${selectedStudies}" var="stud"> 86 91 <td> 87 ${stud} 92 93 <table> 94 <tr> 95 <td><b>Id </b></td> 96 <td><b>Species</b></td> 97 <td><b>Name</b></td> 98 <g:each in="${stud.template.subjectFields}" var="g"> 99 <td><b> 100 <g:link controller="templateSubjectField" action="show" id="${g.id}"> 101 ${g}</b></td> 102 </g:link> 103 </g:each> 104 </tr> 105 106 <g:each in="${stud.subjects}" var="s"> 107 <tr> 108 <td><g:link controller="subject" action="show" id="${s.id}">${s.id}</g:link></td> 109 <td>${s.species}</td> 110 <td>${s.name}</td> 111 112 <g:each in="${stud.template.subjectFields}" var="g"> 113 <td> 114 <% if (g.type==dbnp.studycapturing.TemplateFieldType.INTEGER){ %> 115 <% print s.templateIntegerFields.get(g.toString()) %> 116 <% } %> 117 <% if (g.type==dbnp.studycapturing.TemplateFieldType.STRINGLIST){ %> 118 <% print s.templateStringFields.get(g.toString()) %> 119 <% } %> 120 121 </td> 122 </g:each> 123 </tr> 124 </g:each> 125 </table> 126 88 127 </td> 89 128 </g:each> … … 94 133 95 134 <a href="#"> Groups </a> <div> 96 <g:each in="${selectedStudies}" var="stud"> 97 ${stud} 98 </g:each> 135 99 136 </div> 100 137 101 138 <a href="#"> Protocols </a><div> 139 <table border="2"> 140 <tr> 141 <g:each in="${selectedStudies}" var="study"> 142 <td><center><b>${study.title}</b></center></td> 143 </g:each> 144 </tr> 145 146 <tr> 102 147 <g:each in="${selectedStudies}" var="stud"> 103 ${stud} 104 </g:each> 148 <td> 149 <table> 150 <tr> 151 <td><b>Id </b></td> 152 <td><b>Name</b></td> 153 <td><b>Parameters</b></td> 154 <td><b>Reference</b></td> 155 </tr> 156 157 <% def protocol_list = [] %> 158 <% def tmp_protocol = stud.events.eventDescription.protocol.get(0) %> 159 <% protocol_list.add(tmp_protocol) %> 160 <g:each in="${stud.events.eventDescription.protocol}" var="s"> 161 162 <% if (tmp_protocol!=s) { %> 163 <% protocol_list.add(s) %> 164 <%}%> 165 </g:each> 166 167 <g:each in="${protocol_list}" var="protocol"> 168 <tr> 169 <td><g:link controller="protocol" action="show" id="${protocol.id}">${protocol.id}</g:link></td> 170 <td>${protocol.name}</td> 171 <td> 172 <g:each in="${protocol.parameters}" var="p"><ul><li> 173 <g:link controller="protocolParameter" action="show" id="${p.id}">${p.name}</g:link> 174 </li></ul> 175 </g:each> 176 </td> 177 <td>${protocol.reference}</td> 178 </tr> 179 </g:each> 180 </table> 181 182 </td> 183 </g:each> 184 </tr> 185 </table> 105 186 </div> 106 187 107 188 <a href="#"> Events </a><div> 189 <table border="2"> 190 <tr> 191 <g:each in="${selectedStudies}" var="study"> 192 <td><center><b>${study.title}</b></center></td> 193 </g:each> 194 </tr> 195 196 <tr> 197 <g:each in="${selectedStudies}" var="stud"> 198 <td> 199 200 <table> 201 <tr> 202 <td><b>Event Description</b></td> 203 <td><b>Subject</b></td> 204 <td><b>Start Time</b></td> 205 <td><b>End Time</b></td> 206 <td><b>Duration</b></td> 207 </tr> 208 <g:each in="${stud.events}" var="e"> 209 <tr> 210 <td><g:link controller="event" action="show" id="${e.id}"> ${e.eventDescription.name}</g:link></td> 211 <td>${e.subject.id}</td> 212 <td>${e.startTime}</td> 213 <td>${e.endTime}</td> 214 <td>${e.getDurationString()}</td> 215 </tr> 216 </g:each> 217 </table> 218 </td> 219 </g:each> 220 </tr> 221 </table> 222 108 223 </div> 109 224 -
trunk/grails-app/views/study/show.gsp
r148 r165 38 38 Start :<g:formatDate date="${studyInstance?.startDate}" /> <br> 39 39 Sampling Events : 40 <g:each in="${studyInstance.samplingEvents}" var="s"> 40 <g:each in="${studyInstance.samplingEvents}" var="s"><ul> 41 41 <li><g:link controller="samplingEvent" action="show" id="${s.id}">${s?.encodeAsHTML()}</g:link></li> 42 42 </g:each> … … 112 112 <td><b>Reference</b></td> 113 113 </tr> 114 <g:each in="${protocolList}" var="s"> 114 <g:each in="${dbnp.studycapturing .Protocol.list()}" var="s"> 115 116 <% if (studyInstance.events.eventDescription.protocol.contains(s)) { %> 117 115 118 <tr> 116 119 <td><g:link controller="protocol" action="show" id="${s.id}">${s.id}</g:link></td> … … 124 127 <td>${s.reference}</td> 125 128 </tr> 129 <% } %> 130 126 131 </g:each> 127 132 </table>
Note: See TracChangeset
for help on using the changeset viewer.