Changeset 863
- Timestamp:
- Aug 30, 2010, 5:22:25 PM (11 years ago)
- Location:
- trunk/grails-app
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/dbnp/studycapturing/WizardController.groovy
r862 r863 670 670 }.to "assays" 671 671 on("deleteAssay") { 672 println params 673 672 674 // handle form data 673 675 assayPage(flow, flash, params) … … 694 696 // handle form data 695 697 assayPage(flow, flash, params) ? success() : error() 696 }.to "assay Groups"698 }.to "assayNext" 697 699 on("quickSave") { 698 700 // handle form data 699 701 assayPage(flow, flash, params) ? success() : error() 700 702 }.to "waitForSave" 703 } 704 705 // assayNext 706 assayNext { 707 action { 708 // have we got samples and assays? 709 if (flow.study.assays && flow.study.samples) { 710 // yes, go to the group page 711 toAssayGroups() 712 } else { 713 // no need to show the group page as 714 // there's nothing to group 715 toConfirm() 716 } 717 } 718 on("toAssayGroups").to "assayGroups" 719 on("toConfirm").to "confirm" 701 720 } 702 721 … … 726 745 } 727 746 747 // confirm Previous 748 confirmPrevious { 749 action { 750 // have we got samples and assays? 751 if (flow.study.assays && flow.study.samples) { 752 // yes, go to the group page 753 toAssayGroups() 754 } else { 755 // no need to show the group page as 756 // there's nothing to group 757 toAssays() 758 } 759 } 760 on("toAssayGroups").to "assayGroups" 761 on("toAssays").to "assays" 762 } 763 728 764 // confirmation 729 765 confirm { … … 736 772 on("toEvents").to "events" 737 773 on("toGroups").to "groups" 738 on("previous").to "samples" 774 on("toSamples").to "samples" 775 on("toAssays").to "assays" 776 on("toAssayGroups").to "assayGroups" 777 on("previous").to "confirmPrevious" 739 778 on("next").to "waitForSave" 740 779 on("quickSave").to "waitForSave" -
trunk/grails-app/domain/dbnp/studycapturing/Study.groovy
r862 r863 227 227 */ 228 228 def deleteAssay(Assay assay) { 229 // remove this assay from the study 230 this.removeFromAssays( assay ) 229 if (assay && assay instanceof Assay) { 230 // iterate through linked samples 231 assay.samples.findAll { true }.each() { sample -> 232 assay.removeFromSamples(sample) 233 } 234 235 // remove this assay from the study 236 this.removeFromAssays(assay) 237 238 // and delete it explicitly 239 assay.delete() 240 } 231 241 } 232 242
Note: See TracChangeset
for help on using the changeset viewer.