1 package org.kuali.student.lum.program.client.credential.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.credential.CredentialManager;
11 import org.kuali.student.lum.program.client.credential.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 CredentialSummaryConfiguration extends AbstractControllerConfiguration {
19
20 public CredentialSummaryConfiguration() {
21 rootSection = new VerticalSectionView(ProgramSections.SUMMARY, ProgramProperties.get().program_menu_sections_summary(), ProgramConstants.PROGRAM_MODEL_ID, true);
22 }
23
24 @Override
25 protected void buildLayout() {
26 ConfigurationManager configurationManager = new ConfigurationManager(configurer);
27 CredentialInformationViewConfiguration credentialInfoViewConfig = CredentialInformationViewConfiguration.createSpecial();
28 configurationManager.registerConfiguration(credentialInfoViewConfig);
29 configurationManager.registerConfiguration(CredentialManagingBodiesViewConfiguration.createSpecial());
30 configurationManager.registerConfiguration(CredentialCatalogDetailsViewConfiguration.createSpecial());
31 configurationManager.registerConfiguration(new CredentialRequirementsViewConfiguration(true));
32 configurationManager.registerConfiguration(CredentialLearningObjectivesViewConfiguration.createSpecial());
33 configurationManager.registerConfiguration(CredentialDocsViewConfiguration.createSpecial());
34
35 rootSection.addWidget(new SummaryActionPanel(credentialInfoViewConfig.createActivateProgramSection(), CredentialManager.getEventBus()));
36 for (Configuration configuration : configurationManager.getConfigurations()) {
37 if (configuration instanceof AbstractControllerConfiguration) {
38 ((AbstractControllerConfiguration) configuration).setController(controller);
39 }
40 rootSection.addSection((Section) configuration.getView());
41 }
42 rootSection.addWidget(new SummaryActionPanel(credentialInfoViewConfig.createActivateProgramSection(), CredentialManager.getEventBus()));
43 }
44 }