Changeset 198


Ignore:
Timestamp:
Feb 15, 2010, 4:48:36 PM (7 years ago)
Author:
jahn
Message:

Towards finishing the subGrouping for subjects.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/controllers/SearchableController.groovy

    r196 r198  
    5858
    5959
    60 
    6160        // subgroups
    6261        // provide list of subgroups depending on the type of subgrouping
     
    7069                  render(params)
    7170                  render("Subject Groups")
    72                   subgroups=["subject group 1","subject group 2"]
     71                  def studyGroups = []
     72                  if(selectedStudies!=null)
     73                  {
     74                     selectedStudies.each{ study ->
     75                         study.groups.each{ group -> studyGroups.add[group] }
     76                     }
     77                     println "study groups: "
     78                     studyGroups.each{x-> println x}
     79                  }
     80
     81                  // testing:
     82                  // there is a lack of data in the mockup
     83                  // as long as there are no groups in the bootstart,
     84                  // we use this
     85                  subgroups = studyGroups.size()<=0 ?
     86                      ["subject group 1","subject group 2"] : studyGroups
     87
    7388                  render(view:"selectsample",model:[selectedStudies:selectedStudies,selectedStudyIds:selectedStudyIds,subgroups:subgroups])
    7489                  break
Note: See TracChangeset for help on using the changeset viewer.