@using System.Web.Mvc @using RFI.Common @using RFI.Core @using RFI.Core.DataModel @using RFI.UI.ViewModels @using RFI.UI.UiMaps @model HomeInfoModel @{ RFI.Core.DataModel.RequestTypeDTO requestTypeData = null; if (Model is RFI.UI.ViewModels.HomeInfoModel) { // Yes, we should look through every possible RT, not just AllEnabledRequestTypes, // because once a request is tied to an RT we need to follow that whether it is disabled or not. if (Model.PageLoadedOkay && Model.HomeCommonModel != null && Model.HomeCommonModel.AllRequestTypes != null) { if (Model.ClickedRequest != null && Model.ClickedRequest.RequestTypeId > 0) { requestTypeData = Model.HomeCommonModel.AllRequestTypes.First(RT => RT.RequestTypeId == Model.ClickedRequest.RequestTypeId); } } } if (requestTypeData == null) { @* Why the hell does this happen? *@ requestTypeData = new RFI.Core.DataModel.RequestTypeDTO(); requestTypeData.SectionIds = new List(); requestTypeData.FieldIds = new List(); requestTypeData.SectionsInUse = new List(); requestTypeData.FieldsInUse = new List(); } string descriptionPlaceholder = requestTypeData.PlaceholderTextDescription ?? "Type request description here"; // For production, these values will be columns in the RequestType table, but for development purposes they are just local variables here. bool stakeholderIsWatchlist = Model.ClickedRequest != null && Model.ClickedRequest.RequestTypeId == (int)RequestTypeEnum.IAW01; bool requestTypeDevelUseSectionOtherResponders = !stakeholderIsWatchlist; int requestTypeDevelOnlyResponderId = stakeholderIsWatchlist ? (int)GroupMagic.DHSWatchlisting : 0; int jj = 0; // generic loop index bool showConversationTypes = false; if (requestTypeData.FieldIds.Contains(AppFieldEnum.ConversationType)) { if (Model.ClickedRequest != null && Model.ClickedRequest.UserIsOriginator) { if (Model.HomeCommonModel.AllConversationTypes != null) { var enabledCTsForThisGroup = Model.HomeCommonModel.AllConversationTypes.Where(CT => CT.Disabled == false && (CT.GroupTypeId == 0 || CT.GroupTypeId == Model.ClickedRequest.GroupTypeId)); if (enabledCTsForThisGroup.Any()) { showConversationTypes = true; @: } } } } } @section scripts { } @Html.Partial("Constants") @Html.Partial("Common") @Html.Partial("Modals") @functions { public static string GetLabel(List sectionsInUse, AppSectionEnum sectionEnum) { var appSection = sectionsInUse.FirstOrDefault(S4RT => S4RT.AppSectionId == (int)sectionEnum); if (appSection == null) return sectionEnum.ToString(); return appSection.OverrideLabel ?? appSection.BaseLabel; } public static string GetLabel(List fieldsInUse, AppFieldEnum fieldEnum, bool flagAsDropdown = false, bool flagAsRequired = false) { var appField = fieldsInUse.FirstOrDefault(F4RT => F4RT.AppFieldId == (int)fieldEnum); string label = appField == null ? fieldEnum.ToString() : (appField.OverrideLabel ?? appField.BaseLabel); if (flagAsDropdown) { label += "  "; } if (flagAsRequired) { label += "  *"; } return label; } // Obviously this should be from a table in the database, but I'm not ready for that yet. public static string GetLabel(AppSubsectionEnum appSubsectionId, bool shortForm = false) { switch (appSubsectionId) { case AppSubsectionEnum.RequestPersonMoniker: return "Names"; case AppSubsectionEnum.RequestPersonDeliveryPoint: return "Addresses"; case AppSubsectionEnum.RequestPersonEmailAddress: return "Email Addresses"; case AppSubsectionEnum.RequestPersonTelephone: return "Phone Numbers"; case AppSubsectionEnum.RequestPersonCredential: return "Identifications"; case AppSubsectionEnum.RequestPersonSMT: return shortForm ? "SMTs" : "Scars, Marks, & Tattoos (SMT)"; case AppSubsectionEnum.RequestPersonGang: return "Gang Affiliations"; } return appSubsectionId.ToString(); } public static string LookupOptionText(List options, AppFieldEnum fieldId, int selectedValue) { return options.First(FO => FO.AppFieldId == (int)fieldId && FO.AppOptionId == selectedValue).AppOptionText; } public static SelectList BuildSelectList(List options, AppFieldEnum fieldId, int selectedValue = 0) { return new SelectList(options.Where(FO => FO.AppFieldId == (int)fieldId).ToList(), "AppOptionId", "AppOptionText", selectedValue); } } @helper StartSectionTable(int rowCount) { @: } @helper BuildNoRowsMessage(string label, int rowCount, AppSectionEnum parentId = 0, bool lower = true) { string parentName = "request"; if (parentId == AppSectionEnum.RequestPersons) { parentName = "person"; } else if (parentId == AppSectionEnum.RequestResponderManagement) { parentName = "response"; } if (lower) { label = label.ToLower(); } @:
@: No @(label) have been added to this @(parentName)). @:
} @helper BuildTextField4x8(string dataName, string fieldLabel, bool canModifyRequest) { @:
@: @:
@:

@: @:
@:
} @helper BuildDropdownField(AppFieldEnum fieldEnum, string dataName, SelectList options, List fieldsInUse, int size) { bool canModifyRequest = true; foreach (var oneField in fieldsInUse) { if (oneField.AppFieldId == (int)fieldEnum) { @* the SIZE is either 48 (meaning 4 and 8) or 57 (meaning 5 and 7) *@ @:
@: @:
@:

@: @Html.DropDownList("@(dataName)Id", options, "", new { data_bind = "value: @(dataName)Id, event: {change: requestFieldChanged, blur: showReadableField }, attr: {id: 'txt@(dataName)' + ContextId()}", aria_label = "Person Involvement", @class = "form-control input-sm focusTarget" }) @:
@:
break; } } } @helper BuildDropdownList(AppFieldEnum fieldEnum, int optionId, bool editable, List allFieldOptions, List helpTexts, List fieldsInUse, int labelWidth = 5) { @* Remember that the list-of-options parameter has already had "ignored" options extracted and is already limited to the current RequestType. *@ var appField = fieldsInUse.FirstOrDefault(F4RT => F4RT.AppFieldId == (int)fieldEnum); if (appField != null) { @* the label + input sizes must equal 12 since we're using "bootstrap", so they're usually 4+8 or 5+7 *@ int inputWidth = 12 - labelWidth; string dataName = fieldEnum.ToString(); string elementIdPrefix = "ctrlRequest"; var helpObject = helpTexts.FirstOrDefault(HT => HT.AppFieldId == (int)fieldEnum); string helpTextLabel = helpObject == null ? string.Empty : helpObject.LabelMessage; string helpTextField = helpObject == null ? string.Empty : helpObject.FieldMessage; var optionsForThisField = allFieldOptions.Where(FO => FO.AppFieldId == (int)fieldEnum).ToList(); var selectedOption = Model.FormRequestModel.AllFieldOptions.FirstOrDefault(FO => FO.AppFieldId == (int)fieldEnum && FO.AppOptionId == optionId); string selectedText = selectedOption == null ? string.Empty : selectedOption.AppOptionText; if (labelWidth > 0) { @:
@: } if (editable) { @* the "required-input-label" class has no effect in here, so we have to add the REQUIRED star manually, and override the generated "width=100%" with "width=auto" so that the start isn't bumped to the next line. *@ @:
@: @: @(selectedText) @: @: @: @* @Html.DropDownList( dataName + "Id", optionsForThisField, new { id = elementIdPrefix + dataName, title = helpTextField, data_bind = "value: " + dataName + "Id, event: {change: requestFieldChanged, blur: showReadableField }", @class = "form-control focusTarget", @style = "width: auto;", fieldenum = (int)fieldEnum } ) *@ @: @: @MarkIfRequired(fieldsInUse, fieldEnum) @: @:
} else { if (labelWidth == 0) { @: @(selectedText) } else { @:
@: @(selectedText) @:
} } if (labelWidth > 0) { @:
} } } @helper MarkIfRequired(List fieldsInUse, AppFieldEnum fieldEnum, bool needDivs = false) { var appField = fieldsInUse.FirstOrDefault(F4RT => F4RT.AppFieldId == (int)fieldEnum); string x1 = (appField != null && appField.RequiredToSubmit) ? "required-marker" : ""; string x2 = (appField != null && appField.RequiredToSubmit) ? "*" : ""; string tag = needDivs ? "div" : "span"; string bootstrapClass = needDivs ? "col-md-1" : ""; @: <@(tag) class="@(bootstrapClass) @(x1)">@(x2) } @if (Model.PageLoadedOkay) { bool canAssignRequest = Model.LoggedInUser.IsPermittedTo(PermissionEnum.AssignRequest); bool canExportRequest = Model.LoggedInUser.IsPermittedTo(PermissionEnum.ExportRequest); bool canCreateResponse = Model.LoggedInUser.IsPermittedTo(PermissionEnum.CreateResponse); bool canRespondAsResponder = true; bool canModifyRequest = false; bool canSubmitRequest = false; bool canCloseRequest = false; bool canCancelRequest = false; bool canForwardRequest = false; bool requestIsDraft = false; bool requestIsActive = false; if (Model.ClickedRequest.GroupTypeId == (int)GroupTypeEnum.IAR || Model.ClickedRequest.GroupTypeId == (int)GroupTypeEnum.IAW) { canExportRequest = false; } @* There is no help text, label or field, for the following: + ConcludingRemark + HighestLevel + RequestType + RequestingMemberID + Submitter each of them should have the DISABLED flag set to true in their [HSIN_RFI].[dbo].[HelpText] record, if one exists. *@ string helpTextLabelAgencyCaseNumber = Model.HomeCommonModel.HelpTextsForThisPage.First(HT => HT.AppFieldId == (int)AppFieldEnum.AgencyCaseNumber).LabelMessage; string helpTextLabelCanBeForwarded = Model.HomeCommonModel.HelpTextsForThisPage.First(HT => HT.AppFieldId == (int)AppFieldEnum.CanBeForwarded).LabelMessage; string helpTextLabelCategories = Model.HomeCommonModel.HelpTextsForThisPage.First(HT => HT.AppFieldId == (int)AppFieldEnum.Categories).LabelMessage; string helpTextLabelClosedDate = Model.HomeCommonModel.HelpTextsForThisPage.First(HT => HT.AppFieldId == (int)AppFieldEnum.ClosedDate).LabelMessage; string helpTextLabelContainsUSPER = Model.HomeCommonModel.HelpTextsForThisPage.First(HT => HT.AppFieldId == (int)AppFieldEnum.ContainsUSPER).LabelMessage; string helpTextLabelContainsPCII = Model.HomeCommonModel.HelpTextsForThisPage.First(HT => HT.AppFieldId == (int)AppFieldEnum.ContainsPCII).LabelMessage; string helpTextLabelContainsLES = Model.HomeCommonModel.HelpTextsForThisPage.First(HT => HT.AppFieldId == (int)AppFieldEnum.ContainsLES).LabelMessage; // helpTextLabelDescription string helpTextLabelExpiresDate = Model.HomeCommonModel.HelpTextsForThisPage.First(HT => HT.AppFieldId == (int)AppFieldEnum.ExpiresDate).LabelMessage; string helpTextLabelModifiedDate = Model.HomeCommonModel.HelpTextsForThisPage.First(HT => HT.AppFieldId == (int)AppFieldEnum.ModifiedDate).LabelMessage; string helpTextLabelNUIN = Model.HomeCommonModel.HelpTextsForThisPage.First(HT => HT.AppFieldId == (int)AppFieldEnum.NUIN).LabelMessage; string helpTextLabelNeededDate = Model.HomeCommonModel.HelpTextsForThisPage.First(HT => HT.AppFieldId == (int)AppFieldEnum.NeededDate).LabelMessage; string helpTextLabelOnlyATest = Model.HomeCommonModel.HelpTextsForThisPage.First(HT => HT.AppFieldId == (int)AppFieldEnum.OnlyATest).LabelMessage; string helpTextLabelORI = Model.HomeCommonModel.HelpTextsForThisPage.First(HT => HT.AppFieldId == (int)AppFieldEnum.ORI).LabelMessage; string helpTextLabelPriorityId = Model.HomeCommonModel.HelpTextsForThisPage.First(HT => HT.AppFieldId == (int)AppFieldEnum.PriorityId).LabelMessage; string helpTextLabelPrivateSectorPartner = ""; // Model.HomeCommonModel.HelpTextsForThisPage.First(HT => HT.AppFieldId == (int)AppFieldEnum.PrivateSectorPartner).LabelMessage; // helpTextLabelRequestId string helpTextLabelSRN = Model.HomeCommonModel.HelpTextsForThisPage.First(HT => HT.AppFieldId == (int)AppFieldEnum.SRN).LabelMessage; string helpTextLabelStatusId = Model.HomeCommonModel.HelpTextsForThisPage.First(HT => HT.AppFieldId == (int)AppFieldEnum.StatusId).LabelMessage; // helpTextLabelSubject string helpTextLabelSubmittedDate = Model.HomeCommonModel.HelpTextsForThisPage.First(HT => HT.AppFieldId == (int)AppFieldEnum.SubmittedDate).LabelMessage; string helpTextLabelUrgencyJustification = Model.HomeCommonModel.HelpTextsForThisPage.First(HT => HT.AppFieldId == (int)AppFieldEnum.UrgencyJustification).LabelMessage; string helpTextFieldAgencyCaseNumber = Model.HomeCommonModel.HelpTextsForThisPage.First(HT => HT.AppFieldId == (int)AppFieldEnum.AgencyCaseNumber).FieldMessage; string helpTextFieldCanBeForwarded = Model.HomeCommonModel.HelpTextsForThisPage.First(HT => HT.AppFieldId == (int)AppFieldEnum.CanBeForwarded).FieldMessage; string helpTextFieldCategories = Model.HomeCommonModel.HelpTextsForThisPage.First(HT => HT.AppFieldId == (int)AppFieldEnum.Categories).FieldMessage; // helpTextFieldClosedDate string helpTextFieldContainsUSPER = Model.HomeCommonModel.HelpTextsForThisPage.First(HT => HT.AppFieldId == (int)AppFieldEnum.ContainsUSPER).FieldMessage; string helpTextFieldContainsPCII = Model.HomeCommonModel.HelpTextsForThisPage.First(HT => HT.AppFieldId == (int)AppFieldEnum.ContainsPCII).FieldMessage; string helpTextFieldContainsLES = Model.HomeCommonModel.HelpTextsForThisPage.First(HT => HT.AppFieldId == (int)AppFieldEnum.ContainsLES).FieldMessage; string helpTextFieldDescription = Model.HomeCommonModel.HelpTextsForThisPage.First(HT => HT.AppFieldId == (int)AppFieldEnum.Description).FieldMessage; string helpTextFieldExpiresDate = Model.HomeCommonModel.HelpTextsForThisPage.First(HT => HT.AppFieldId == (int)AppFieldEnum.ExpiresDate).FieldMessage; // helpTextFieldModifiedDate string helpTextFieldNUIN = Model.HomeCommonModel.HelpTextsForThisPage.First(HT => HT.AppFieldId == (int)AppFieldEnum.NUIN).FieldMessage; string helpTextFieldNeededDate = Model.HomeCommonModel.HelpTextsForThisPage.First(HT => HT.AppFieldId == (int)AppFieldEnum.NeededDate).FieldMessage; // helpTextFieldORI string helpTextFieldOnlyATest = Model.HomeCommonModel.HelpTextsForThisPage.First(HT => HT.AppFieldId == (int)AppFieldEnum.OnlyATest).FieldMessage; string helpTextFieldPriorityId = Model.HomeCommonModel.HelpTextsForThisPage.First(HT => HT.AppFieldId == (int)AppFieldEnum.PriorityId).FieldMessage; string helpTextFieldPrivateSectorPartner = ""; // Model.HomeCommonModel.HelpTextsForThisPage.First(HT => HT.AppFieldId == (int)AppFieldEnum.PrivateSectorPartner).LabelMessage; string helpTextFieldRequestId = Model.HomeCommonModel.HelpTextsForThisPage.First(HT => HT.AppFieldId == (int)AppFieldEnum.RequestId).FieldMessage; string helpTextFieldSRN = Model.HomeCommonModel.HelpTextsForThisPage.First(HT => HT.AppFieldId == (int)AppFieldEnum.SRN).FieldMessage; string helpTextFieldStatusId = Model.HomeCommonModel.HelpTextsForThisPage.First(HT => HT.AppFieldId == (int)AppFieldEnum.StatusId).FieldMessage; string helpTextFieldSubject = Model.HomeCommonModel.HelpTextsForThisPage.First(HT => HT.AppFieldId == (int)AppFieldEnum.Subject).FieldMessage; // helpTextFieldSubmittedDate string helpTextFieldUrgencyJustification = Model.HomeCommonModel.HelpTextsForThisPage.First(HT => HT.AppFieldId == (int)AppFieldEnum.UrgencyJustification).FieldMessage; string helpTextLabelStateTerritory = ""; string helpTextLabelDisposition = ""; string helpTextLabelCustomCategory = ""; string helpTextLabelCustomStatus = ""; string helpTextLabelCustomRecommendation = ""; string helpTextFieldStateTerritory = ""; string helpTextFieldDisposition = ""; string helpTextFieldCustomCategory = ""; string helpTextFieldCustomStatus = ""; string helpTextFieldCustomRecommendation = ""; if (Model.ClickedRequest != null) { if (Model.ClickedRequest.StatusId == (int)RequestStatus.Draft) { requestIsDraft = true; if (Model.ClickedRequest.UserIsOriginator) { canSubmitRequest = Model.LoggedInUser.IsPermittedTo(PermissionEnum.SubmitRequest); } } else if (Model.ClickedRequest.StatusId == (int)RequestStatus.Open || Model.ClickedRequest.StatusId == (int)RequestStatus.InProgress) { requestIsActive = true; if (Model.ClickedRequest.UserIsOriginator) { canCloseRequest = Model.LoggedInUser.IsPermittedTo(PermissionEnum.CloseRequest); canCancelRequest = Model.LoggedInUser.IsPermittedTo(PermissionEnum.CancelRequest); } else if (Model.ClickedRequest.UserIsResponder) { canRespondAsResponder = canCreateResponse; if (Model.ClickedRequest.CanBeForwarded && Model.ClickedRequest.GroupForwardingAllowed) { canForwardRequest = true; } } } if (requestIsDraft || requestIsActive) { if (Model.ClickedRequest.UserIsOriginator) { canModifyRequest = Model.LoggedInUser.PageIsModifiable; } } } string disabledAttribute = canModifyRequest ? "" : "disabled=\"disabled\"";

#@(Model.ClickedRequest.TrackingId) (loading...)

@if (Model.ClickedRequest.UserIsResponder) { }
@foreach (var onePerson in Model.ClickedRequest.Persons) { }
Type Name
@LookupOptionText(Model.FormRequestModel.AllFieldOptions, AppFieldEnum.PersonType, onePerson.PersonTypeId) @(onePerson.Monikers.Count == 0 ? "" : (onePerson.Monikers[0].FullName)) @if (canModifyRequest) { }
} @if (requestTypeData.SectionIds.Contains(AppSectionEnum.RequestDetails)) { string sectionLabelDetails = GetLabel(requestTypeData.SectionsInUse, AppSectionEnum.RequestDetails); string detailsPlaceholderText = "No details have been added to this request"; if (Model.ClickedRequest.RequestTypeId == (int)RequestTypeEnum.IAR01) { detailsPlaceholderText = "Type request description here, including recipients of information being requested and specific resources already researched/queried."; }
@if (canModifyRequest) { @: }
@BuildNoRowsMessage(sectionLabelDetails, Model.ClickedRequest.Details.Count) @StartSectionTable(Model.ClickedRequest.Details.Count) @GetLabel(requestTypeData.FieldsInUse, AppFieldEnum.DetailType, true) @GetLabel(requestTypeData.FieldsInUse, AppFieldEnum.DetailDetails) @GetLabel(requestTypeData.FieldsInUse, AppFieldEnum.DetailComments) @GetLabel(requestTypeData.FieldsInUse, AppFieldEnum.DetailAdded) @if (canModifyRequest) { } @{jj = 0;} @foreach (var oneDetail in Model.ClickedRequest.Details) { ++jj; var listOfDetailTypes = canModifyRequest ? BuildSelectList(Model.FormRequestModel.AllFieldOptions, AppFieldEnum.DetailType) : null; @BuildDropdownList(AppFieldEnum.DetailType, oneDetail.DetailTypeId, canModifyRequest, Model.FormRequestModel.AllFieldOptions, Model.HomeCommonModel.HelpTextsForThisPage, requestTypeData.FieldsInUse) @Html.DropDownList("DetailTypeId", listOfDetailTypes, new { data_bind = "value: DetailTypeId, attr: {id: 'txtDetailType' + ContextId()}, event: {change: requestFieldChanged, blur: showReadableField }", aria_labelledby = "lblDetailType", @class = "inpDetailTypeId form-control input-sm focusTarget" }) @if (canModifyRequest) { } }
} @if (requestTypeData.SectionIds.Contains(AppSectionEnum.RequestAttachments)) { string sectionLabelAttachments = GetLabel(requestTypeData.SectionsInUse, AppSectionEnum.RequestAttachments);
@if (canModifyRequest) { @: }
@if (!Model.ClickedRequest.UserIsSpectator) {
@BuildNoRowsMessage(sectionLabelAttachments, Model.ClickedRequest.Attachments.Count) @StartSectionTable(Model.ClickedRequest.Attachments.Count) @GetLabel(requestTypeData.FieldsInUse, AppFieldEnum.AttachmentFilename) @GetLabel(requestTypeData.FieldsInUse, AppFieldEnum.AttachmentType) @GetLabel(requestTypeData.FieldsInUse, AppFieldEnum.AttachmentSize) @GetLabel(requestTypeData.FieldsInUse, AppFieldEnum.AttachmentComments) @GetLabel(requestTypeData.FieldsInUse, AppFieldEnum.AttachmentAdded) @if (canModifyRequest) { } @foreach (var oneAttachment in Model.ClickedRequest.Attachments) {

@if (canModifyRequest) { } }
}
} @if (requestTypeData.SectionIds.Contains(AppSectionEnum.RequestDrugs)) { string sectionLabelDrugs = GetLabel(requestTypeData.SectionsInUse, AppSectionEnum.RequestDrugs);
@if (canModifyRequest) { @: }
@BuildNoRowsMessage(sectionLabelDrugs, Model.ClickedRequest.Drugs.Count) @StartSectionTable(Model.ClickedRequest.Drugs.Count) @GetLabel(requestTypeData.FieldsInUse, AppFieldEnum.DrugType) @GetLabel(requestTypeData.FieldsInUse, AppFieldEnum.DrugTransport) @GetLabel(requestTypeData.FieldsInUse, AppFieldEnum.DrugSeizedAmount) @GetLabel(requestTypeData.FieldsInUse, AppFieldEnum.DrugBorderCrossing) @GetLabel(requestTypeData.FieldsInUse, AppFieldEnum.DrugClanLab) @foreach (var oneDrug in Model.ClickedRequest.Drugs) { @{var listOfDrugTypes = canModifyRequest ? BuildSelectList(Model.FormRequestModel.AllFieldOptions, AppFieldEnum.DrugType) : null;} @Html.DropDownList("DrugTypeId", listOfDrugTypes, new { data_bind = "value: DrugTypeId, attr: {id: 'txtDrugType' + ContextId()}, event: {change: requestFieldChanged, blur: showReadableField }", aria_labelledby = "lblDrugType", @class = "inpDrugTypeId form-control input-sm focusTarget" }) @{var listOfDrugTransports = canModifyRequest ? BuildSelectList(Model.FormRequestModel.AllFieldOptions, AppFieldEnum.DrugTransport) : null;} @Html.DropDownList("DrugTransportId", listOfDrugTransports, new { data_bind = "value: DrugTransportId, attr: {id: 'txtDrugTransport' + ContextId()}, event: {change: requestFieldChanged, blur: showReadableField }", aria_labelledby = "lblDrugTransport", @class = "inpDrugTransportId form-control input-sm focusTarget" }) @if (canModifyRequest) { } }
} @if (requestTypeData.SectionIds.Contains(AppSectionEnum.RequestVehicles)) { string sectionLabelVehicles = GetLabel(requestTypeData.SectionsInUse, AppSectionEnum.RequestVehicles);
@if (canModifyRequest) { @: }
@BuildNoRowsMessage(sectionLabelVehicles, Model.ClickedRequest.Vehicles.Count) @StartSectionTable(Model.ClickedRequest.Vehicles.Count) @foreach (var oneVehicle in Model.ClickedRequest.Vehicles) {
@if (requestTypeData.FieldIds.Contains(AppFieldEnum.VehicleType)) { var listOfVehicleTypes = canModifyRequest ? BuildSelectList(Model.FormRequestModel.AllFieldOptions, AppFieldEnum.VehicleType) : null;

@if (canModifyRequest) { @Html.DropDownList("VehicleTypeId", listOfVehicleTypes, new { data_bind = "value: VehicleTypeId, event: {change: requestFieldChanged, blur: showReadableField }, attr: {id: 'txtVehicleType' + ContextId()}", @class = "focusTarget form-control required-input" }) }
} @if (requestTypeData.FieldIds.Contains(AppFieldEnum.VehicleYear)) {

} @if (requestTypeData.FieldIds.Contains(AppFieldEnum.VehicleMake)) {

} @if (requestTypeData.FieldIds.Contains(AppFieldEnum.VehicleModel)) {

}
@if (requestTypeData.FieldIds.Contains(AppFieldEnum.VehicleColor)) {

} @if (requestTypeData.FieldIds.Contains(AppFieldEnum.VehicleState)) {

} @if (requestTypeData.FieldIds.Contains(AppFieldEnum.VehiclePlate)) {

} @if (requestTypeData.FieldIds.Contains(AppFieldEnum.VehicleVIN)) {

}
@if (requestTypeData.FieldIds.Contains(AppFieldEnum.VehicleDescription)) {

}
@if (requestTypeData.FieldIds.Contains(AppFieldEnum.VehicleLocation)) {

}
@if (canModifyRequest) { }
}
} @if (requestTypeData.SectionIds.Contains(AppSectionEnum.RequestHistory)) { string sectionLabelHistory = GetLabel(requestTypeData.SectionsInUse, AppSectionEnum.RequestHistory);
@StartSectionTable(1) When   What Who Group @foreach (var oneHistory in Model.ClickedRequest.Histories) { }
}
@if (requestTypeData.SectionIds.Contains(AppSectionEnum.RequestSubmitter)) { string sectionLabelSubmitter = GetLabel(requestTypeData.SectionsInUse, AppSectionEnum.RequestSubmitter);

@(sectionLabelSubmitter)

@if (Model.ClickedRequest.SupervisorFullName != null && Model.ClickedRequest.SupervisorFullName != "") { bool OutreachInsists = true; string supervisionLabel = (OutreachInsists) ? "Assigned to" : "Supervised by"; @:   @(supervisionLabel) @(Model.ClickedRequest.SupervisorFullName) }
@if (Model.ClickedRequest.Purged) { @:   } else { @: , @: @: [] }
@GlobalHelpers.GenerateEmailLink(Model.ClickedRequest.Member.Contact.PrimaryEmail, Model.ClickedRequest.TrackingId, Model.ClickedRequest.Purged)
@GlobalHelpers.GenerateEmailLink(Model.ClickedRequest.Member.Contact.AlternateEmail, Model.ClickedRequest.TrackingId, Model.ClickedRequest.Purged)
@GlobalHelpers.GenerateEmailLink(Model.ClickedRequest.Member.Contact.ClassifiedEmail, Model.ClickedRequest.TrackingId, Model.ClickedRequest.Purged)
@GlobalHelpers.GeneratePhoneLink(Model.ClickedRequest.Member.Contact.PhoneOffice, Model.ClickedRequest.Member.Contact.ExtensionOffice, Model.ClickedRequest.Purged)
@GlobalHelpers.GeneratePhoneLink(Model.ClickedRequest.Member.Contact.PhoneMobile, Model.ClickedRequest.Member.Contact.ExtensionMobile, Model.ClickedRequest.Purged)
@GlobalHelpers.GeneratePhoneLink(Model.ClickedRequest.Member.Contact.PhoneHome, Model.ClickedRequest.Member.Contact.ExtensionHome, Model.ClickedRequest.Purged)
@GlobalHelpers.GeneratePhoneLink(Model.ClickedRequest.Member.Contact.PhoneFax, Model.ClickedRequest.Member.Contact.ExtensionFax, Model.ClickedRequest.Purged)
} @if (requestTypeData.SectionIds.Contains(AppSectionEnum.RequestResponderManagement) && canModifyRequest) { string sectionLabelResponderManagement = GetLabel(requestTypeData.SectionsInUse, AppSectionEnum.RequestResponderManagement); if (requestIsDraft == false && requestTypeDevelOnlyResponderId == 0) {
} } else if (canForwardRequest) { } @if (!canModifyRequest && requestTypeData.SectionIds.Contains(AppSectionEnum.RequestOtherResponders)) { string sectionLabelOtherResponders = GetLabel(requestTypeData.SectionsInUse, AppSectionEnum.RequestOtherResponders);
} @if (requestTypeData.SectionIds.Contains(AppSectionEnum.RequestOtherResponders)) { }
@if (Model.ClickedRequest.UserIsSpectator) { @:
} else { @:
}
@if (requestTypeData.SectionIds.Contains(AppSectionEnum.RequestAttachments)) { } @if (requestTypeData.SectionIds.Contains(AppSectionEnum.RequestPersons)) { } @if (requestTypeData.Boilerplate != null) {
@(Html.Raw(requestTypeData.Boilerplate))
} }