| 1 |  |  package org.kuali.student.lum.program.client.major.view; | 
  | 2 |  |   | 
  | 3 |  |  import org.kuali.student.common.ui.client.configurable.mvc.sections.CollapsableSection; | 
  | 4 |  |  import org.kuali.student.common.ui.client.configurable.mvc.sections.VerticalSection; | 
  | 5 |  |  import org.kuali.student.common.ui.client.configurable.mvc.views.SectionView; | 
  | 6 |  |  import org.kuali.student.common.ui.client.configurable.mvc.views.VerticalSectionView; | 
  | 7 |  |  import org.kuali.student.common.ui.client.widgets.field.layout.element.MessageKeyInfo; | 
  | 8 |  |  import org.kuali.student.lum.common.client.configuration.AbstractSectionConfiguration; | 
  | 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.MajorEditableHeader; | 
  | 12 |  |  import org.kuali.student.lum.program.client.properties.ProgramProperties; | 
  | 13 |  |  import org.kuali.student.lum.program.client.widgets.EditableHeader; | 
  | 14 |  |   | 
  | 15 |  |   | 
  | 16 |  |   | 
  | 17 |  |   | 
  | 18 |  |  public class ManagingBodiesViewConfiguration extends AbstractSectionConfiguration { | 
  | 19 |  |   | 
  | 20 |  |      public static ManagingBodiesViewConfiguration create() { | 
  | 21 | 0 |          return new ManagingBodiesViewConfiguration(new VerticalSectionView(ProgramSections.MANAGE_BODIES_VIEW, ProgramProperties.get().program_menu_sections_managingBodies(), ProgramConstants.PROGRAM_MODEL_ID)); | 
  | 22 |  |      } | 
  | 23 |  |   | 
  | 24 |  |      public static ManagingBodiesViewConfiguration createSpecial() { | 
  | 25 | 0 |          String title = ProgramProperties.get().program_menu_sections_managingBodies(); | 
  | 26 | 0 |          return new ManagingBodiesViewConfiguration(new VerticalSectionView(ProgramSections.MANAGE_BODIES_VIEW, title, ProgramConstants.PROGRAM_MODEL_ID, new MajorEditableHeader(title, ProgramSections.MANAGE_BODIES_EDIT))); | 
  | 27 |  |      } | 
  | 28 |  |   | 
  | 29 | 0 |      private ManagingBodiesViewConfiguration(SectionView sectionView) { | 
  | 30 | 0 |          rootSection = sectionView; | 
  | 31 | 0 |      } | 
  | 32 |  |   | 
  | 33 |  |      @Override | 
  | 34 |  |      protected void buildLayout() { | 
  | 35 | 0 |          VerticalSection section = createMainSection(); | 
  | 36 | 0 |          CollapsableSection collapsableSection = createAdditionalSection(); | 
  | 37 | 0 |          rootSection.addSection(section); | 
  | 38 | 0 |          rootSection.addSection(collapsableSection); | 
  | 39 | 0 |      } | 
  | 40 |  |   | 
  | 41 |  |      private VerticalSection createMainSection() { | 
  | 42 | 0 |          VerticalSection section = new VerticalSection(); | 
  | 43 | 0 |          configurer.addReadOnlyField(section, ProgramConstants.CURRICULUM_OVERSIGHT_DIVISION, new MessageKeyInfo(ProgramProperties.get().managingBodies_curriculumOversightDivision())); | 
  | 44 | 0 |          configurer.addReadOnlyField(section, ProgramConstants.CURRICULUM_OVERSIGHT_UNIT, new MessageKeyInfo(ProgramProperties.get().managingBodies_curriculumOversightUnit())); | 
  | 45 | 0 |          configurer.addReadOnlyField(section, ProgramConstants.STUDENT_OVERSIGHT_DIVISION, new MessageKeyInfo(ProgramProperties.get().managingBodies_studentOversightDivision())); | 
  | 46 | 0 |          configurer.addReadOnlyField(section, ProgramConstants.STUDENT_OVERSIGHT_UNIT, new MessageKeyInfo(ProgramProperties.get().managingBodies_studentOversightUnit())); | 
  | 47 | 0 |          return section; | 
  | 48 |  |      } | 
  | 49 |  |   | 
  | 50 |  |      private CollapsableSection createAdditionalSection() { | 
  | 51 | 0 |          CollapsableSection section = new CollapsableSection(ProgramProperties.get().managingBodies_seeAll()); | 
  | 52 | 0 |          configurer.addReadOnlyField(section, ProgramConstants.DEPLOYMENT_DIVISION, new MessageKeyInfo(ProgramProperties.get().managingBodies_deploymentDivision())); | 
  | 53 | 0 |          configurer.addReadOnlyField(section, ProgramConstants.DEPLOYMENT_UNIT, new MessageKeyInfo(ProgramProperties.get().managingBodies_deploymentUnit())); | 
  | 54 | 0 |          configurer.addReadOnlyField(section, ProgramConstants.FINANCIAL_RESOURCES_DIVISION, new MessageKeyInfo(ProgramProperties.get().managingBodies_financialResourcesDivision())); | 
  | 55 | 0 |          configurer.addReadOnlyField(section, ProgramConstants.FINANCIAL_RESOURCES_UNIT, new MessageKeyInfo(ProgramProperties.get().managingBodies_financialResourcesUnit())); | 
  | 56 | 0 |          configurer.addReadOnlyField(section, ProgramConstants.FINANCIAL_CONTROL_DIVISION, new MessageKeyInfo(ProgramProperties.get().managingBodies_financialControlDivision())); | 
  | 57 | 0 |          configurer.addReadOnlyField(section, ProgramConstants.FINANCIAL_CONTROL_UNIT, new MessageKeyInfo(ProgramProperties.get().managingBodies_financialControlUnit())); | 
  | 58 | 0 |          return section; | 
  | 59 |  |      } | 
  | 60 |  |  } |