1 | |
package org.kuali.student.lum.program.client.credential.view; |
2 | |
|
3 | |
import org.kuali.student.common.ui.client.configurable.mvc.sections.VerticalSection; |
4 | |
import org.kuali.student.common.ui.client.configurable.mvc.views.SectionView; |
5 | |
import org.kuali.student.common.ui.client.configurable.mvc.views.VerticalSectionView; |
6 | |
import org.kuali.student.common.ui.client.widgets.field.layout.element.MessageKeyInfo; |
7 | |
import org.kuali.student.lum.common.client.configuration.AbstractSectionConfiguration; |
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.CredentialEditableHeader; |
11 | |
import org.kuali.student.lum.program.client.properties.ProgramProperties; |
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
public class CredentialManagingBodiesViewConfiguration extends AbstractSectionConfiguration { |
17 | |
|
18 | |
public static CredentialManagingBodiesViewConfiguration create() { |
19 | 0 | return new CredentialManagingBodiesViewConfiguration(new VerticalSectionView(ProgramSections.MANAGE_BODIES_VIEW, ProgramProperties.get().program_menu_sections_managingBodies(), ProgramConstants.PROGRAM_MODEL_ID)); |
20 | |
} |
21 | |
|
22 | |
public static CredentialManagingBodiesViewConfiguration createSpecial() { |
23 | 0 | String title = ProgramProperties.get().program_menu_sections_managingBodies(); |
24 | 0 | return new CredentialManagingBodiesViewConfiguration(new VerticalSectionView(ProgramSections.MANAGE_BODIES_VIEW, title, ProgramConstants.PROGRAM_MODEL_ID, new CredentialEditableHeader(title, ProgramSections.MANAGE_BODIES_EDIT))); |
25 | |
} |
26 | |
|
27 | 0 | private CredentialManagingBodiesViewConfiguration(SectionView sectionView) { |
28 | 0 | rootSection = sectionView; |
29 | 0 | } |
30 | |
|
31 | |
@Override |
32 | |
protected void buildLayout() { |
33 | 0 | VerticalSection section = createMainSection(); |
34 | 0 | rootSection.addSection(section); |
35 | 0 | } |
36 | |
|
37 | |
private VerticalSection createMainSection() { |
38 | 0 | VerticalSection section = new VerticalSection(); |
39 | 0 | configurer.addReadOnlyField(section, ProgramConstants.CURRICULUM_OVERSIGHT_DIVISION, new MessageKeyInfo(ProgramProperties.get().managingBodies_curriculumOversightDivision())); |
40 | 0 | configurer.addReadOnlyField(section, ProgramConstants.CURRICULUM_OVERSIGHT_UNIT, new MessageKeyInfo(ProgramProperties.get().managingBodies_curriculumOversightUnit())); |
41 | 0 | configurer.addReadOnlyField(section, ProgramConstants.STUDENT_OVERSIGHT_DIVISION, new MessageKeyInfo(ProgramProperties.get().managingBodies_studentOversightDivision())); |
42 | 0 | configurer.addReadOnlyField(section, ProgramConstants.STUDENT_OVERSIGHT_UNIT, new MessageKeyInfo(ProgramProperties.get().managingBodies_studentOversightUnit())); |
43 | 0 | return section; |
44 | |
} |
45 | |
} |