Changeset 201 for trunk/grails-app/controllers/SearchableController.groovy
- Timestamp:
- Feb 16, 2010, 3:13:09 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/SearchableController.groovy
r198 r201 27 27 28 28 def selectsample = { 29 30 31 // produce error message here if studies don't contain samples! 32 // redirect back or use error 33 29 34 30 35 println "in selectsample: " … … 80 85 81 86 // testing: 82 // there is a lack of data in the mockup 83 // as long as there are no groups in the boot start,87 // there is a lack of data in the mockup (subject groups are still missing) 88 // as long as there are no groups in the boot script, 84 89 // we use this 85 90 subgroups = studyGroups.size()<=0 ? 86 ["subject group 1","subject group 2"] : studyGroups91 ["subject group 1","subject group 2"] : studyGroups 87 92 88 93 render(view:"selectsample",model:[selectedStudies:selectedStudies,selectedStudyIds:selectedStudyIds,subgroups:subgroups]) 89 94 break 95 90 96 case "Event Groups": 91 render("Event Groups") 92 subgroups=["event group 1","event group 2"] 97 def eventGroups = [] 98 if(selectedStudies!=null) 99 { 100 selectedStudies.each{ study -> 101 println study.id 102 println study.samplingEvents.each{ eventGroups.add(it) } 103 } 104 } 105 subgroups=eventGroups 93 106 render(view:"selectsample",model:[selectedStudies:selectedStudies,selectedStudyIds:selectedStudyIds,subgroups:subgroups]) 94 107 break 108 95 109 case "Starting Time Groups": 110 111 def timeGroups = [] 112 if(selectedStudies!=null) 113 { 114 selectedStudies.each{ study -> 115 println study.samplingEvents.each{ 116 def timeDiff = it.getPrettyDuration( study.startDate, it.startTime ) 117 if( !timeGroups.contains(timeDiff) ) timeGroups.add(timeDiff) 118 } 119 } 120 } 121 subgroups=timeGroups 96 122 render("Starting Time Groups") 97 subgroups=["time group 1","time group 2"]98 123 render(view:"selectsample",model:[selectedStudies:selectedStudies,selectedStudyIds:selectedStudyIds,subgroups:subgroups]) 99 124 break 125 100 126 case ">> Execute and continue with biomarker selection": 101 127 render("Starting Time Groups")
Note: See TracChangeset
for help on using the changeset viewer.