Changeset 557
- Timestamp:
- Jun 11, 2010, 3:50:48 PM (13 years ago)
- Location:
- trunk/grails-app
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/dbnp/studycapturing/WizardController.groovy
r544 r557 218 218 } 219 219 on("refresh") { 220 println ".refreshing...." 220 221 flash.values = params 221 222 222 223 // handle study data 223 224 this.handleStudy(flow, flash, params) 225 226 // force refresh of the template 227 if (flow.study.template) { 228 flow.study.template.refresh() 229 } 224 230 225 231 // remove errors as we don't want any warnings now … … 233 239 // handle study data 234 240 this.handleStudy(flow, flash, params) 241 242 // force refresh of the template 243 if (flow.study.template) { 244 flow.study.template.refresh() 245 } 235 246 236 247 // remove errors as we don't want any warnings now … … 285 296 on("refresh") { 286 297 flash.values = params 298 299 // refresh templates 300 flow.subjectTemplates.each() { 301 it.value.template.refresh() 302 } 303 287 304 success() 288 305 }.to "subjects" … … 409 426 // handle study data 410 427 this.handleEvents(flow, flash, params) 428 429 // refresh event templates 430 flow.eventTemplates.each() { 431 it.value.template.refresh() 432 } 433 434 // refresh flow template 435 if (flow.event.template) flow.event.template.refresh() 436 437 // remove errors as we don't want any warnings now 438 flash.errors = [:] 439 }.to "events" 440 on("refresh") { 441 flash.values = params 442 443 // handle study data 444 this.handleEvents(flow, flash, params) 445 446 // refresh templates 447 flow.eventTemplates.each() { 448 it.value.template.refresh() 449 } 450 451 // refresh flow template 452 if (flow.event.template) flow.event.template.refresh() 411 453 412 454 // remove errors as we don't want any warnings now … … 581 623 onRender { 582 624 flow.page = 6 583 flow.bla = "samples" 625 626 flow.samples = [] 584 627 585 628 // iterate through eventGroups … … 595 638 596 639 println sampleName 640 flow.samples[ flow.samples.size() ] = [ 641 sample : new Sample( 642 parentSubject: subject, 643 parentEvent: event, 644 name: sampleName 645 ), 646 name : sampleName, 647 eventGroup : eventGroup, 648 event : event, 649 subject : subject 650 ] 597 651 } 598 652 } … … 600 654 } 601 655 656 println flow.samples 657 602 658 success() 603 659 } … … 607 663 on("next") { 608 664 success() 609 }.to " confirm"665 }.to "samples" 610 666 on("quickSave") { 611 667 success() … … 1013 1069 } 1014 1070 1015 1016 1071 /** 1017 1072 * groovy / java equivalent of php's ucwords function -
trunk/grails-app/domain/dbnp/data/Term.groovy
r540 r557 30 30 return name 31 31 } 32 33 /** 34 * Return all terms for a string of comma separated ontology ncboId's. 35 * @see Ontology.groovy 36 * @param ontologies 37 * @return 38 */ 39 def giveAllByOntologies( ontologies ) { 40 // this method does not seem to work (see taglibrary:termSelect) 41 // i'll try to get it working later, or delete this altogether 42 // - Jeroen 43 def data = [] 44 def terms = [] 45 46 // got a string? 47 if (ontologies instanceof String) { 48 // split the ontologies string 49 ontologies.split(/\,/).each() { ncboId -> 50 // trim the id 51 ncboId.trim() 52 53 // fetch all terms for this ontology 54 def ontology = Ontology.findAllByNcboId(ncboId) 55 56 // does this ontology exist? 57 if (ontology) { 58 ontology.each() { 59 data[ data.size() ] = it 60 } 61 } 62 } 63 64 ontologies = data 65 } 66 67 // iterate through ontologies 68 ontologies.each() { ontology -> 69 Term.findAllByOntology( ontology ).each() { term -> 70 terms[ terms.size() ] = term 71 } 72 } 73 74 // sort alphabetically 75 terms.sort() 76 } 32 77 } -
trunk/grails-app/taglib/dbnp/studycapturing/WizardTagLib.groovy
r546 r557 601 601 // sort alphabetically 602 602 from.sort() 603 603 604 604 // define 'from' 605 605 attrs.from = from -
trunk/grails-app/views/wizard/pages/_samples.gsp
r539 r557 22 22 </span> 23 23 24 25 24 <g:if test="${samples}"> 25 <div class="table"> 26 <g:each var="sampleData" in="${samples}"> 27 ${sampleData} 28 <div class="row"> 29 <!-- wizard:templateColumns class="column" id="1" entity="${sampleData['sample']}" //--> 30 <!-- div class="column"><wizard:templateSelect entity="${sampleData.sample}" /></div //--> 31 </div> 32 </g:each> 33 </div> 34 </g:if> 26 35 27 36 </wizard:pageContent>
Note: See TracChangeset
for help on using the changeset viewer.