Changeset 562
- Timestamp:
- Jun 14, 2010, 1:36:56 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/application.properties
r561 r562 9 9 app.name=gscf 10 10 app.servlet.version=2.4 11 app.version=0.3. 011 app.version=0.3.1 12 12 plugins.crypto=2.0 13 13 plugins.db-util=0.4 -
trunk/grails-app/conf/BootStrap.groovy
r561 r562 118 118 ).with { if (!validate()) { errors.each { println it} } else save()} 119 119 120 // Create a few persons, roles and Affiliations121 println ".adding persons, roles and affiliations"122 def affiliation1 = new PersonAffiliation(123 institute: "Science Institute NYC",124 department: "Department of Mathematics"125 ).save();126 def affiliation2 = new PersonAffiliation(127 institute: "InfoStats GmbH, Hamburg",128 department: "Life Sciences"129 ).save();130 def role1 = new PersonRole(131 name: "Principal Investigator"132 ).save();133 def role2 = new PersonRole(134 name: "Statician"135 ).save();136 137 // Create persons138 def person1 = new Person(139 lastName: "Scientist",140 firstName: "John",141 gender: "Male",142 initials: "J.R.",143 email: "john@scienceinstitute.com",144 phone: "1-555-3049",145 address: "First street 2,NYC"146 )147 .addToAffiliations( affiliation1 )148 .addToAffiliations( affiliation2 )149 .save();150 151 def person2 = new Person(152 lastName: "Statician",153 firstName: "Jane",154 gender: "Female",155 initials: "W.J.",156 email: "jane@statisticalcompany.de",157 phone: "49-555-8291",158 address: "Dritten strasse 38, Hamburg, Germany"159 )160 .addToAffiliations( affiliation2 )161 .save();162 163 // Create 30 persons to test pagination164 120 if (GrailsUtil.environment == GrailsApplication.ENV_DEVELOPMENT) { 165 def personCounter = 1; 166 30.times { new Person( firstName: "Person #${personCounter}", lastName: "Testperson", email: "email${personCounter++}@testdomain.com" ).save() } 167 } 168 169 // Create a few publications 170 println ".adding publications" 171 def publication1 = new Publication( 172 title: "Postnatal development of hypothalamic leptin receptors", 173 authorsList: "Cottrell EC, Mercer JG, Ozanne SE.", 174 pubMedID: "20472140", 175 comments: "Not published yet", 176 DOI: "unknown" 177 ) 178 .save(); 179 180 def publication2 = new Publication( 181 title: "Induction of regulatory T cells decreases adipose inflammation and alleviates insulin resistance in ob/ob mice", 182 authorsList: "Ilan Y, Maron R, Tukpah AM, Maioli TU, Murugaiyan G, Yang K, Wu HY, Weiner HL.", 183 pubMedID: "20445103", 184 comments: "", 185 DOI: "" 186 ) 187 .save(); 121 122 // Create a few persons, roles and Affiliations 123 println ".adding persons, roles and affiliations" 124 def affiliation1 = new PersonAffiliation( 125 institute: "Science Institute NYC", 126 department: "Department of Mathematics" 127 ).save(); 128 def affiliation2 = new PersonAffiliation( 129 institute: "InfoStats GmbH, Hamburg", 130 department: "Life Sciences" 131 ).save(); 132 def role1 = new PersonRole( 133 name: "Principal Investigator" 134 ).save(); 135 def role2 = new PersonRole( 136 name: "Statician" 137 ).save(); 138 139 // Create persons 140 def person1 = new Person( 141 lastName: "Scientist", 142 firstName: "John", 143 gender: "Male", 144 initials: "J.R.", 145 email: "john@scienceinstitute.com", 146 phone: "1-555-3049", 147 address: "First street 2,NYC" 148 ) 149 .addToAffiliations( affiliation1 ) 150 .addToAffiliations( affiliation2 ) 151 .save(); 152 153 def person2 = new Person( 154 lastName: "Statician", 155 firstName: "Jane", 156 gender: "Female", 157 initials: "W.J.", 158 email: "jane@statisticalcompany.de", 159 phone: "49-555-8291", 160 address: "Dritten strasse 38, Hamburg, Germany" 161 ) 162 .addToAffiliations( affiliation2 ) 163 .save(); 164 165 // Create 30 persons to test pagination 166 def personCounter = 1; 167 30.times { new Person( firstName: "Person #${personCounter}", lastName: "Testperson", email: "email${personCounter++}@testdomain.com" ).save() } 168 169 // Create a few publications 170 println ".adding publications" 171 def publication1 = new Publication( 172 title: "Postnatal development of hypothalamic leptin receptors", 173 authorsList: "Cottrell EC, Mercer JG, Ozanne SE.", 174 pubMedID: "20472140", 175 comments: "Not published yet", 176 DOI: "unknown" 177 ) 178 .save(); 179 180 def publication2 = new Publication( 181 title: "Induction of regulatory T cells decreases adipose inflammation and alleviates insulin resistance in ob/ob mice", 182 authorsList: "Ilan Y, Maron R, Tukpah AM, Maioli TU, Murugaiyan G, Yang K, Wu HY, Weiner HL.", 183 pubMedID: "20445103", 184 comments: "", 185 DOI: "" 186 ) 187 .save(); 188 } 188 189 189 190 // Create templates … … 755 756 756 757 // Add example studies 757 if (grails.util.GrailsUtil.environment == GrailsApplication.ENV_DEVELOPMENT) {758 if (grails.util.GrailsUtil.environment != GrailsApplication.ENV_TEST) { 758 759 println ".adding NuGO PPS3 leptin example study..." 759 760 def mouseStudy = new Study( -
trunk/grails-app/controllers/dbnp/studycapturing/WizardController.groovy
r557 r562 373 373 flash.errors = [:] 374 374 375 // check if we have at least one subject 376 // and check form data 377 if (flow.subjects.size() < 1) { 378 // append error map 379 this.appendErrorMap(['subjects': 'You need at least to create one subject for your study'], flash.errors) 380 error() 381 } else if (!this.handleSubjects(flow, flash, params)) { 375 // check form data 376 if (!this.handleSubjects(flow, flash, params)) { 382 377 error() 383 378 } else { … … 388 383 flash.errors = [:] 389 384 390 // check if we have at least one subject 391 // and check form data 392 if (flow.subjects.size() < 1) { 393 // append error map 394 this.appendErrorMap(['subjects': 'You need at least to create one subject for your study'], flash.errors) 395 error() 396 } else if (!this.handleSubjects(flow, flash, params)) { 385 // check form data 386 if (!this.handleSubjects(flow, flash, params)) { 397 387 error() 398 388 } else { … … 663 653 on("next") { 664 654 success() 665 }.to " samples"655 }.to "confirm" 666 656 on("quickSave") { 667 657 success()
Note: See TracChangeset
for help on using the changeset viewer.