1 | |
package org.kuali.student.lum.program.client.major.edit; |
2 | |
|
3 | |
import org.kuali.student.common.ui.client.configurable.mvc.sections.Section; |
4 | |
import org.kuali.student.common.ui.client.configurable.mvc.views.VerticalSectionView; |
5 | |
import org.kuali.student.core.workflow.ui.client.widgets.WorkflowUtilities; |
6 | |
import org.kuali.student.lum.common.client.configuration.AbstractControllerConfiguration; |
7 | |
import org.kuali.student.lum.common.client.configuration.Configuration; |
8 | |
import org.kuali.student.lum.common.client.configuration.ConfigurationManager; |
9 | |
import org.kuali.student.lum.program.client.ProgramConstants; |
10 | |
import org.kuali.student.lum.program.client.ProgramSections; |
11 | |
import org.kuali.student.lum.program.client.major.MajorManager; |
12 | |
import org.kuali.student.lum.program.client.major.proposal.MajorProposalController; |
13 | |
import org.kuali.student.lum.program.client.major.view.*; |
14 | |
import org.kuali.student.lum.program.client.properties.ProgramProperties; |
15 | |
import org.kuali.student.lum.program.client.widgets.SummaryActionPanel; |
16 | |
|
17 | |
import com.google.gwt.user.client.ui.Widget; |
18 | |
|
19 | |
|
20 | |
|
21 | |
|
22 | |
|
23 | |
|
24 | |
|
25 | |
|
26 | |
|
27 | |
|
28 | |
public class MajorProposalSummaryConfiguration extends AbstractControllerConfiguration { |
29 | |
|
30 | 0 | public MajorProposalSummaryConfiguration() { |
31 | 0 | rootSection = new VerticalSectionView(ProgramSections.SUMMARY, ProgramProperties.get().program_menu_sections_summary(), ProgramConstants.PROGRAM_MODEL_ID, true); |
32 | 0 | } |
33 | |
|
34 | |
|
35 | |
|
36 | |
|
37 | |
@Override |
38 | |
protected void buildLayout() { |
39 | 0 | ConfigurationManager configurationManager = new ConfigurationManager(configurer); |
40 | |
|
41 | |
|
42 | 0 | MajorInformationViewConfiguration majorInfoViewConfig = MajorInformationViewConfiguration.createSpecial(); |
43 | 0 | configurationManager.registerConfiguration(majorInfoViewConfig); |
44 | 0 | configurationManager.registerConfiguration(ManagingBodiesViewConfiguration.createSpecial()); |
45 | 0 | configurationManager.registerConfiguration(SpecializationsViewConfiguration.createSpecial()); |
46 | 0 | configurationManager.registerConfiguration(CatalogInformationViewConfiguration.createSpecial()); |
47 | 0 | configurationManager.registerConfiguration(new ProgramRequirementsViewConfiguration(true,true)); |
48 | 0 | configurationManager.registerConfiguration(LearningObjectivesViewConfiguration.createSpecial()); |
49 | 0 | configurationManager.registerConfiguration(SupportingDocsViewConfiguration.createSpecial()); |
50 | |
|
51 | |
|
52 | |
|
53 | 0 | if (controller instanceof MajorProposalController){ |
54 | |
|
55 | |
|
56 | 0 | WorkflowUtilities workflowUtilities = ((MajorProposalController)controller).getWfUtilities(); |
57 | |
|
58 | |
|
59 | 0 | Widget widget = workflowUtilities.getWorkflowActionsWidget(); |
60 | |
|
61 | |
|
62 | |
|
63 | 0 | workflowUtilities.enableWorkflowActionsWidgets(true); |
64 | |
|
65 | |
|
66 | 0 | rootSection.addWidget(widget); |
67 | |
} |
68 | |
|
69 | |
|
70 | |
|
71 | 0 | for (Configuration configuration : configurationManager.getConfigurations()) { |
72 | 0 | if (configuration instanceof AbstractControllerConfiguration) { |
73 | 0 | ((AbstractControllerConfiguration) configuration).setController(controller); |
74 | |
} |
75 | 0 | rootSection.addSection((Section) configuration.getView()); |
76 | |
} |
77 | 0 | } |
78 | |
} |