1 | |
package org.kuali.student.lum.program.client.core.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.lum.common.client.configuration.AbstractControllerConfiguration; |
6 | |
import org.kuali.student.lum.common.client.configuration.Configuration; |
7 | |
import org.kuali.student.lum.common.client.configuration.ConfigurationManager; |
8 | |
import org.kuali.student.lum.program.client.ProgramConstants; |
9 | |
import org.kuali.student.lum.program.client.ProgramSections; |
10 | |
import org.kuali.student.lum.program.client.core.CoreManager; |
11 | |
import org.kuali.student.lum.program.client.core.view.*; |
12 | |
import org.kuali.student.lum.program.client.properties.ProgramProperties; |
13 | |
import org.kuali.student.lum.program.client.widgets.SummaryActionPanel; |
14 | |
|
15 | |
|
16 | |
|
17 | |
|
18 | |
public class CoreSummaryConfiguration extends AbstractControllerConfiguration { |
19 | |
|
20 | 0 | public CoreSummaryConfiguration() { |
21 | 0 | rootSection = new VerticalSectionView(ProgramSections.SUMMARY, ProgramProperties.get().program_menu_sections_summary(), ProgramConstants.PROGRAM_MODEL_ID, true); |
22 | 0 | } |
23 | |
|
24 | |
@Override |
25 | |
protected void buildLayout() { |
26 | 0 | ConfigurationManager configurationManager = new ConfigurationManager(configurer); |
27 | 0 | CoreInformationViewConfiguration coreInfoViewConfig = CoreInformationViewConfiguration.createSpecial(); |
28 | 0 | configurationManager.registerConfiguration(coreInfoViewConfig); |
29 | 0 | configurationManager.registerConfiguration(CoreManagingBodiesViewConfiguration.createSpecial()); |
30 | 0 | configurationManager.registerConfiguration(CoreCatalogInformationViewConfiguration.createSpecial()); |
31 | 0 | configurationManager.registerConfiguration(new CoreRequirementsViewConfiguration(true)); |
32 | 0 | configurationManager.registerConfiguration(CoreLearningObjectivesViewConfiguration.createSpecial()); |
33 | 0 | configurationManager.registerConfiguration(CoreDocsViewConfiguration.createSpecial()); |
34 | |
|
35 | 0 | rootSection.addWidget(new SummaryActionPanel(coreInfoViewConfig.createActivateProgramSection(), CoreManager.getEventBus())); |
36 | 0 | for (Configuration configuration : configurationManager.getConfigurations()) { |
37 | 0 | if (configuration instanceof AbstractControllerConfiguration) { |
38 | 0 | ((AbstractControllerConfiguration) configuration).setController(controller); |
39 | |
} |
40 | 0 | rootSection.addSection((Section) configuration.getView()); |
41 | |
} |
42 | 0 | rootSection.addWidget(new SummaryActionPanel(coreInfoViewConfig.createActivateProgramSection(), CoreManager.getEventBus())); |
43 | 0 | } |
44 | |
} |