| 1 |  |  package org.kuali.student.lum.program.client.variation.view; | 
  | 2 |  |   | 
  | 3 |  |  import org.kuali.student.common.ui.client.configurable.mvc.SectionTitle; | 
  | 4 |  |  import org.kuali.student.common.ui.client.configurable.mvc.multiplicity.MultiplicityConfiguration; | 
  | 5 |  |  import org.kuali.student.common.ui.client.configurable.mvc.sections.HorizontalSection; | 
  | 6 |  |  import org.kuali.student.common.ui.client.configurable.mvc.sections.MultiplicitySection; | 
  | 7 |  |  import org.kuali.student.common.ui.client.configurable.mvc.sections.Section; | 
  | 8 |  |  import org.kuali.student.common.ui.client.configurable.mvc.sections.TableSection; | 
  | 9 |  |  import org.kuali.student.common.ui.client.configurable.mvc.views.SectionView; | 
  | 10 |  |  import org.kuali.student.common.ui.client.configurable.mvc.views.VerticalSectionView; | 
  | 11 |  |  import org.kuali.student.common.ui.client.widgets.field.layout.element.MessageKeyInfo; | 
  | 12 |  |  import org.kuali.student.core.assembly.data.Metadata; | 
  | 13 |  |  import org.kuali.student.core.assembly.data.QueryPath; | 
  | 14 |  |  import org.kuali.student.lum.common.client.configuration.AbstractSectionConfiguration; | 
  | 15 |  |  import org.kuali.student.lum.program.client.ProgramConstants; | 
  | 16 |  |  import org.kuali.student.lum.program.client.ProgramSections; | 
  | 17 |  |  import org.kuali.student.lum.program.client.major.MajorEditableHeader; | 
  | 18 |  |  import org.kuali.student.lum.program.client.properties.ProgramProperties; | 
  | 19 |  |  import org.kuali.student.lum.program.client.widgets.EditableHeader; | 
  | 20 |  |   | 
  | 21 |  |   | 
  | 22 |  |   | 
  | 23 |  |   | 
  | 24 |  |  public class VariationInformationViewConfiguration extends AbstractSectionConfiguration { | 
  | 25 |  |   | 
  | 26 |  |      public static VariationInformationViewConfiguration create() { | 
  | 27 | 0 |          return new VariationInformationViewConfiguration(new VerticalSectionView(ProgramSections.PROGRAM_DETAILS_VIEW, ProgramProperties.get().program_menu_sections_programInformation(), ProgramConstants.PROGRAM_MODEL_ID)); | 
  | 28 |  |      } | 
  | 29 |  |   | 
  | 30 |  |      public static VariationInformationViewConfiguration createSpecial() { | 
  | 31 | 0 |          String title = ProgramProperties.get().program_menu_sections_programInformation(); | 
  | 32 | 0 |          return new VariationInformationViewConfiguration(new VerticalSectionView(ProgramSections.PROGRAM_DETAILS_VIEW, title, ProgramConstants.PROGRAM_MODEL_ID, new MajorEditableHeader(title, ProgramSections.PROGRAM_DETAILS_EDIT))); | 
  | 33 |  |      } | 
  | 34 |  |   | 
  | 35 | 0 |      private VariationInformationViewConfiguration(SectionView sectionView) { | 
  | 36 | 0 |          rootSection = sectionView; | 
  | 37 | 0 |          rootSection.addStyleName("programInformationView"); | 
  | 38 | 0 |      } | 
  | 39 |  |   | 
  | 40 |  |      @Override | 
  | 41 |  |      protected void buildLayout() { | 
  | 42 | 0 |          HorizontalSection section = new HorizontalSection(); | 
  | 43 | 0 |          section.addSection(createIdentifyingDetailsSection()); | 
  | 44 | 0 |          section.addSection(createProgramTitleSection()); | 
  | 45 | 0 |          section.nextRow(); | 
  | 46 | 0 |          section.addSection(createDatesSection()); | 
  | 47 | 0 |          section.addSection(createOtherInformationSection()); | 
  | 48 | 0 |          rootSection.addSection(section); | 
  | 49 | 0 |      } | 
  | 50 |  |   | 
  | 51 |  |      private TableSection createIdentifyingDetailsSection() { | 
  | 52 | 0 |          TableSection section = new TableSection(SectionTitle.generateH4Title(ProgramProperties.get().programInformation_identifyingDetails())); | 
  | 53 | 0 |          configurer.addReadOnlyField(section, ProgramConstants.CODE, new MessageKeyInfo(ProgramProperties.get().programInformation_code())); | 
  | 54 | 0 |          configurer.addReadOnlyField(section, ProgramConstants.CREDENTIAL_PROGRAM_LEVEL, new MessageKeyInfo(ProgramProperties.get().programInformation_level())); | 
  | 55 | 0 |          configurer.addReadOnlyField(section, ProgramConstants.CREDENTIAL_PROGRAM_TYPE_NAME, new MessageKeyInfo(ProgramProperties.get().programInformation_credentialProgram())); | 
  | 56 | 0 |          configurer.addReadOnlyField(section, ProgramConstants.PROGRAM_CLASSIFICATION, new MessageKeyInfo(ProgramProperties.get().programInformation_classification())); | 
  | 57 | 0 |          configurer.addReadOnlyField(section, ProgramConstants.DEGREE_TYPE, new MessageKeyInfo(ProgramProperties.get().programInformation_degreeType())); | 
  | 58 | 0 |          return section; | 
  | 59 |  |      } | 
  | 60 |  |   | 
  | 61 |  |      private TableSection createProgramTitleSection() { | 
  | 62 | 0 |          TableSection section = new TableSection(SectionTitle.generateH4Title(ProgramProperties.get().programInformation_programTitle())); | 
  | 63 | 0 |          configurer.addReadOnlyField(section, ProgramConstants.LONG_TITLE, new MessageKeyInfo(ProgramProperties.get().programInformation_titleFull())); | 
  | 64 | 0 |          configurer.addReadOnlyField(section, ProgramConstants.SHORT_TITLE, new MessageKeyInfo(ProgramProperties.get().programInformation_titleShort())); | 
  | 65 | 0 |          configurer.addReadOnlyField(section, ProgramConstants.TRANSCRIPT, new MessageKeyInfo(ProgramProperties.get().programInformation_titleTranscript())); | 
  | 66 | 0 |          configurer.addReadOnlyField(section, ProgramConstants.DIPLOMA, new MessageKeyInfo(ProgramProperties.get().programInformation_titleDiploma())); | 
  | 67 | 0 |          return section; | 
  | 68 |  |      } | 
  | 69 |  |   | 
  | 70 |  |      private TableSection createDatesSection() { | 
  | 71 | 0 |          TableSection section = new TableSection(SectionTitle.generateH4Title(ProgramProperties.get().programInformation_dates())); | 
  | 72 | 0 |          configurer.addReadOnlyField(section, ProgramConstants.START_TERM, new MessageKeyInfo(ProgramProperties.get().programInformation_startTerm())); | 
  | 73 | 0 |          configurer.addReadOnlyField(section, ProgramConstants.END_INSTITUTIONAL_ADMIT_TERM, new MessageKeyInfo(ProgramProperties.get().programInformation_admitTerm())); | 
  | 74 | 0 |          configurer.addReadOnlyField(section, ProgramConstants.END_PROGRAM_ENTRY_TERM, new MessageKeyInfo(ProgramProperties.get().programInformation_entryTerm())); | 
  | 75 | 0 |          configurer.addReadOnlyField(section, ProgramConstants.END_PROGRAM_ENROLL_TERM, new MessageKeyInfo(ProgramProperties.get().programInformation_enrollTerm())); | 
  | 76 | 0 |          configurer.addReadOnlyField(section, ProgramConstants.PROGRAM_APPROVAL_DATE, new MessageKeyInfo(ProgramProperties.get().programInformation_approvalDate())); | 
  | 77 | 0 |          return section; | 
  | 78 |  |      } | 
  | 79 |  |   | 
  | 80 |  |      private TableSection createOtherInformationSection() { | 
  | 81 | 0 |          TableSection section = new TableSection(SectionTitle.generateH4Title(ProgramProperties.get().programInformation_otherInformation())); | 
  | 82 | 0 |          configurer.addReadOnlyField(section, ProgramConstants.LOCATION, new MessageKeyInfo(ProgramProperties.get().programInformation_location())); | 
  | 83 | 0 |          configurer.addReadOnlyField(section, ProgramConstants.CIP_2000, new MessageKeyInfo(ProgramProperties.get().programInformation_cip2000())); | 
  | 84 | 0 |          configurer.addReadOnlyField(section, ProgramConstants.CIP_2010, new MessageKeyInfo(ProgramProperties.get().programInformation_cip2010())); | 
  | 85 | 0 |          configurer.addReadOnlyField(section, ProgramConstants.HEGIS_CODE, new MessageKeyInfo(ProgramProperties.get().programInformation_hegis())); | 
  | 86 | 0 |          configurer.addReadOnlyField(section, ProgramConstants.CREDENTIAL_PROGRAM_INSTITUTION_ID, new MessageKeyInfo(ProgramProperties.get().programInformation_institution())); | 
  | 87 | 0 |          return section; | 
  | 88 |  |      } | 
  | 89 |  |   | 
  | 90 |  |  } |