Changeset 1640
- Timestamp:
- Mar 17, 2011, 3:16:24 PM (11 years ago)
- Location:
- trunk/grails-app
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/dbnp/studycapturing/StudyWizardController.groovy
r1634 r1640 50 50 ] 51 51 break 52 case 'simpleedit': 53 jump = [ 54 action : 'simpleedit', 55 id : params.get('id') 56 ] 57 break 52 58 default: 53 59 break … … 86 92 // define flow variables 87 93 flow.page = 0 88 flow.pages = [ 89 //[title: 'Templates'], // templates 90 [title: 'Start'], // load or create a study 91 [title: 'Subjects'], // subjects 92 [title: 'Events'], // events and event grouping 93 //[title: 'Event Groups'], // groups 94 [title: 'Samples'], // samples 95 [title: 'Assays'], // assays 96 //[title: 'Assay Groups'], // assays 97 [title: 'Confirmation'], // confirmation page 98 [title: 'Done'] // finish page 99 ] 94 95 if (session.jump && session.jump?.action == 'simpleedit') { 96 flow.pages = [ 97 [title: 'Start'], 98 [title: 'Done'] 99 ] 100 } else { 101 flow.pages = [ 102 //[title: 'Templates'], // templates 103 [title: 'Start'], // load or create a study 104 [title: 'Subjects'], // subjects 105 [title: 'Events'], // events and event grouping 106 //[title: 'Event Groups'], // groups 107 [title: 'Samples'], // samples 108 [title: 'Assays'], // assays 109 //[title: 'Assay Groups'], // assays 110 [title: 'Confirmation'], // confirmation page 111 [title: 'Done'] // finish page 112 ] 113 } 100 114 flow.jump = session.jump 101 115 … … 132 146 if (pluginManager.getGrailsPlugin('grom')) "entering handleJump".grom() 133 147 134 if (flow.jump && flow.jump.action = ='edit') {148 if (flow.jump && flow.jump.action =~ 'edit') { 135 149 if (flow.jump.id) { 136 150 // load study … … 266 280 on("next") { 267 281 studyPage(flow, flash, params) ? success() : error() 268 }.to "s ubjects"282 }.to "studyNext" 269 283 on("quickSave") { 270 284 studyPage(flow, flash, params) ? success() : error() … … 272 286 on("toPageTwo") { 273 287 studyPage(flow, flash, params) ? success() : error() 274 }.to "s ubjects"288 }.to "studyNext" 275 289 on("toPageThree") { 276 290 studyPage(flow, flash, params) ? success() : error() … … 288 302 studyPage(flow, flash, params) ? success() : error() 289 303 }.to "save" 304 } 305 306 // handle the second tab click on the study page 307 studyNext { 308 action { 309 if (session.jump?.action == 'simpleedit') { 310 toSave() 311 } else { 312 toPageTwo() 313 } 314 } 315 on("toSave").to "save" 316 on("toPageTwo").to "subjects" 290 317 } 291 318 -
trunk/grails-app/views/studyWizard/pages/_done.gsp
r1430 r1640 27 27 28 28 You can now <g:link controller="study" action="show" id="${study.id}">view the study</g:link>, 29 <g:link controller="studyWizard" params="[jump: 'edit']" id="${study.id}">edit the study</g:link>29 <g:link controller="studyWizard" params="[jump:((session.jump?.action == 'simpleedit') ? 'simpleedit' : 'edit')]" id="${study.id}">edit the study</g:link> 30 30 <g:if test="${quickSave}"> again</g:if> or 31 31 <g:link controller="studyWizard" params="[jump:'create']">create a new study</g:link>.
Note: See TracChangeset
for help on using the changeset viewer.