Changeset 1046
- Timestamp:
- Nov 2, 2010, 10:25:06 AM (13 years ago)
- Location:
- trunk/grails-app
- Files:
-
- 1 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/conf/BootStrapTemplates.groovy
r870 r1046 229 229 .with { if (!validate()) { errors.each { println it} } else save()} 230 230 231 232 /* 233 * Add NMC - DCL Sample Mapping Template 234 * by Michael van Vliet 235 * 236 * For the Pilot running in Leiden (NOV2010) 237 */ 238 println ".adding sample DCL-Sample-Reference" 239 def sampleDCLTextField = new TemplateField( 240 name: 'DCL Sample Reference', 241 type: TemplateFieldType.STRING, 242 entity: Sample 243 ) 244 .with { if (!validate()) { errors.each { println it} } else save()} 245 246 // Human tissue sample template 247 println ".adding DCL Sample template..." 248 def dclSampleTemplate = new Template( 249 name: 'DCL Sample information', 250 entity: dbnp.studycapturing.Sample 251 ) 252 .addToFields(sampleDCLTextField) 253 .with { if (!validate()) { errors.each { println it} } else save()} 254 // EO DCL Sample Mapping Template********************************** 255 256 231 257 /* 232 258 def GrowthTreatmentTemplate = new Template( -
trunk/grails-app/controllers/nmc/PilotController.groovy
r959 r1046 36 36 37 37 def index = { 38 38 39 def studyInstance = new Study() 40 studyInstance.properties = params 41 42 [studyInstanceList: Study.list(params), studyInstance: studyInstance] 39 43 } 40 44 … … 43 47 [studyInstanceList: Study.list(params), studyInstanceTotal: Study.count()] 44 48 } 45 46 /** 47 * create closure 48 */ 49 def create = { 50 def studyInstance = new Study() 51 studyInstance.properties = params 52 return [studyInstance: studyInstance] 53 } 54 49 55 50 def save = { 56 51 def studyInstance = new Study(params) … … 80 75 } 81 76 else { 82 render(view: " create", model: [studyInstance: studyInstance])77 render(view: "index", model: [studyInstance: studyInstance]) 83 78 } 84 79 } -
trunk/grails-app/views/pilot/index.gsp
r959 r1046 11 11 <p>Thank you for participating in the 2010 Pilot of the NMC-DSP/GSCF application</p> 12 12 <br /> 13 <center> 14 <g:link action="create" ><font size="+5" style="padding: 5px; border: 2px solid #CDCDCD;">Start here</font></g:link> 15 </center> 16 <br /> 17 <br /> 13 <table> 14 <tr> 15 <g:if test="${studyInstanceList}"> 16 <td width="50%"> 17 <h3>Continue with an existing Pilot Study</h3> 18 <g:each in="${studyInstanceList}" var="study"> 19 - <g:link controller="pilot" action="show" id="${study.id}">${study.title}</g:link><br /> 20 </g:each> 21 </td> 22 </g:if> 23 <td width="50%"> 24 <h3>Start new Pilot here</h3> 25 <g:if test="${flash.message}"> 26 <div class="message">${flash.message}</div> 27 </g:if> 28 29 <g:hasErrors bean="${studyInstance}"> 30 <div class="errors"> 31 <g:renderErrors bean="${studyInstance}" as="list" /> 32 </div> 33 </g:hasErrors> 34 35 <g:form action="save" method="post" > 36 <div class="dialog"> 37 <p>Start by creating a study. For this pilot a title and start date are sufficient. When finished click on the "Create/Invoeren" button.</p> 38 <table> 39 <tbody> 40 41 <tr class="prop"> 42 <td valign="top" class="name"> 43 <label for="title"><g:message code="study.title.label" default="Title" /></label> 44 </td> 45 <td valign="top" class="value ${hasErrors(bean: studyInstance, field: 'title', 'errors')}"> 46 <g:textField name="title" value="${studyInstance?.title}" /> 47 </td> 48 </tr> 49 50 <tr class="prop"> 51 <td valign="top" class="name"> 52 <label for="startDate"><g:message code="study.startDate.label" default="Start Date" /></label> 53 </td> 54 <td valign="top" class="value ${hasErrors(bean: studyInstance, field: 'startDate', 'errors')}"> 55 <g:datePicker name="startDate" precision="day" value="${studyInstance?.startDate}" /> 56 </td> 57 </tr> 58 59 </tbody> 60 </table> 61 </div> 62 <div class="buttons"> 63 <g:each in="${extraparams}" var="param"> 64 <input type="hidden" name="${param.key}" value="${param.value}"> 65 </g:each> 66 <span class="button"><g:submitButton name="create" class="save" value="${message(code: 'default.button.create.label', default: 'Create')}" /></span> 67 <span class="button"><g:link class="cancel" action="list" params="${extraparams}">Cancel</g:link></span> 68 </div> 69 </g:form> 70 </td> 71 </tr> 72 </table> 73 <br /><br /> 18 74 </body> 19 75 </html> -
trunk/grails-app/views/pilot/show.gsp
r959 r1046 18 18 <b>Instructions</b>: You are now on the Study page. 19 19 All information within the application is related to a study. 20 For this pilot a Metabolomics Assay has been created. 21 Click on this assay to continue with the pilot. 20 For this pilot a Metabolomics Assay has been created.<br /><br /> 21 22 <g:if test="${studyInstance.samples.size() == 0}"> 23 Currently there are no samples registered for this study. Please use the <b>"Import Samples"</b> to add samples to this study. 24 </g:if> 25 26 <g:if test="${studyInstance.samples.size() > 0}"> 27 Click on this assay to continue with the pilot. 28 </g:if> 29 30 22 31 </p> 23 32 <table> … … 27 36 <td valign="top" class="name"><g:message code="study.title.label" default="Title" /></td> 28 37 29 <td valign="top" class="value">${fieldValue(bean: studyInstance, field: "title")} </td>38 <td valign="top" class="value">${fieldValue(bean: studyInstance, field: "title")} (${fieldValue(bean: studyInstance, field: "code")})</td> 30 39 31 40 </tr> 32 41 <tr class="prop"> 33 <td valign="top" class="name"> <g:message code="study.code.label" default="Code" /></td>42 <td valign="top" class="name">Samples (${studyInstance.samples.size()})</td> 34 43 35 <td valign="top" class="value">${fieldValue(bean: studyInstance, field: "code")}</td> 44 <td valign="top" class="value"> 45 46 <g:if test="${studyInstance.samples.size() == 0}"> 47 <g:link controller="importer" action="simpleWizard">Import Samples</g:link> 48 </g:if> 49 50 <g:if test="${studyInstance.samples.size() > 0}"> 51 ${studyInstance.samples.join( ', ' )} 52 </g:if> 53 </td> 36 54 37 55 </tr>
Note: See TracChangeset
for help on using the changeset viewer.