public PartialViewResult FieldDefinitionDetailsForClassificationSystem(ClassificationSystemPrimaryKey classificationSystemPrimaryKey) { var classificationSystem = classificationSystemPrimaryKey.EntityObject; var viewData = new FieldDefinitionDetailsViewData(classificationSystem, (bool)false, (string)string.Empty, new HtmlString("<p>A logical system to group projects according to overarching program themes or goals.</p>"), classificationSystem.ClassificationSystemName); return(RazorPartialView <FieldDefinitionDetails, FieldDefinitionDetailsViewData>(viewData)); }
public PartialViewResult FieldDefinitionDetails(int fieldDefinitionTypeID) { var fieldDefinitionType = FieldDefinitionType.AllLookupDictionary[fieldDefinitionTypeID]; var fieldDefinition = HttpRequestStorage.DatabaseEntities.FieldDefinitions.SingleOrDefault(x => x.FieldDefinitionTypeID == fieldDefinitionTypeID); var showEditLink = new FieldDefinitionManageFeature().HasPermission(CurrentPerson, fieldDefinitionType).HasPermission; var viewData = new FieldDefinitionDetailsViewData(fieldDefinitionType, fieldDefinition, showEditLink); return(RazorPartialView <FieldDefinitionDetails, FieldDefinitionDetailsViewData>(viewData)); }
public PartialViewResult FieldDefinitionDetailsForAttachmentType(AttachmentTypePrimaryKey attachmentTypePrimaryKey) { var attachmentType = attachmentTypePrimaryKey.EntityObject; var viewData = new FieldDefinitionDetailsViewData(attachmentType, false, string.Empty, new HtmlString( $"{attachmentType.AttachmentTypeDescription}{(attachmentType.NumberOfAllowedAttachments.HasValue ? $"<p class=\"smallExplanationText\"><strong>Maximum File Uploads:</strong> <span>{attachmentType.NumberOfAllowedAttachments} </span></p>" : string.Empty)}"), attachmentType.AttachmentTypeName); return(RazorPartialView <FieldDefinitionDetails, FieldDefinitionDetailsViewData>(viewData)); }
public PartialViewResult FieldDefinitionDetails(int fieldDefinitionID) { var fieldDefinition = FieldDefinition.AllLookupDictionary[fieldDefinitionID]; var fieldDefinitionData = HttpRequestStorage.DatabaseEntities.FieldDefinitionDatas.SingleOrDefault(x => x.FieldDefinitionID == fieldDefinitionID); var showEditLink = new FieldDefinitionManageFeature().HasPermission(CurrentPerson, fieldDefinition).HasPermission; var editUrl = SitkaRoute <FieldDefinitionController> .BuildUrlFromExpression(t => t.Edit(fieldDefinition)); var viewData = new FieldDefinitionDetailsViewData(fieldDefinitionData, showEditLink, editUrl, fieldDefinition.DefaultDefinitionHtmlString, fieldDefinition.GetFieldDefinitionLabel()); return(RazorPartialView <FieldDefinitionDetails, FieldDefinitionDetailsViewData>(viewData)); }
public PartialViewResult FieldDefinitionDetails(FieldDefinitionPrimaryKey fieldDefinitionPrimaryKey) { var fieldDefinition = fieldDefinitionPrimaryKey.EntityObject; var fieldDefinitionData = fieldDefinition.GetFieldDefinitionData(); var showEditLink = new FieldDefinitionManageFeature().HasPermission(CurrentFirmaSession, fieldDefinition).HasPermission; var editUrl = SitkaRoute <FieldDefinitionController> .BuildUrlFromExpression(t => t.Edit(fieldDefinition)); var viewData = new FieldDefinitionDetailsViewData(fieldDefinitionData, showEditLink, editUrl, fieldDefinition.FieldDefinitionDefault.DefaultDefinitionHtmlString, fieldDefinition.GetFieldDefinitionLabel()); return(RazorPartialView <FieldDefinitionDetails, FieldDefinitionDetailsViewData>(viewData)); }