public RelatedPerformanceMeasuresViewData(TaxonomyLevel associatePerformanceMeasureTaxonomyLevel, bool showHelpLinks, IEnumerable <IGrouping <ProjectFirmaModels.Models.PerformanceMeasure, TaxonomyLeafPerformanceMeasure> > taxonomyTierPerformanceMeasures, bool canHaveAssociatedPerformanceMeasures) { CanHaveAssociatedPerformanceMeasures = canHaveAssociatedPerformanceMeasures; TaxonomyTierPerformanceMeasures = taxonomyTierPerformanceMeasures; var fieldDefinitionForPerformanceMeasure = FieldDefinitionEnum.PerformanceMeasure.ToType(); PerformanceMeasureDisplayName = fieldDefinitionForPerformanceMeasure.GetFieldDefinitionLabel(); PerformanceMeasureDisplayNamePluralized = fieldDefinitionForPerformanceMeasure.GetFieldDefinitionLabelPluralized(); PerformanceMeasureHeaderDisplayName = showHelpLinks ? LabelWithSugarForExtensions.LabelWithSugarFor( fieldDefinitionForPerformanceMeasure, LabelWithSugarForExtensions.DisplayStyle.HelpIconWithLabel, PerformanceMeasureDisplayName) : new HtmlString(PerformanceMeasureDisplayName); PerformanceMeasuresUrl = SitkaRoute <PerformanceMeasureController> .BuildUrlFromExpression(c => c.Index()); }
public RelatedTaxonomyTiersViewData(ProjectFirmaModels.Models.PerformanceMeasure performanceMeasure, TaxonomyLevel associatePerformanceMeasureTaxonomyLevel, bool showHelpLinks) { TaxonomyLeafPerformanceMeasures = performanceMeasure.GetTaxonomyTiers(); PerformanceMeasureDisplayName = MultiTenantHelpers.GetPerformanceMeasureName(); var fieldDefinitionForTaxonomyTier = associatePerformanceMeasureTaxonomyLevel.GetFieldDefinition(); TaxonomyTierDisplayName = fieldDefinitionForTaxonomyTier.GetFieldDefinitionLabel(); TaxonomyTierHeaderDisplayName = showHelpLinks ? LabelWithSugarForExtensions.LabelWithSugarFor( fieldDefinitionForTaxonomyTier, LabelWithSugarForExtensions.DisplayStyle.HelpIconWithLabel, TaxonomyTierDisplayName) : new HtmlString(TaxonomyTierDisplayName); TaxonomyTierDisplayNamePluralized = fieldDefinitionForTaxonomyTier.GetFieldDefinitionLabelPluralized(); AssociatePerformanceMeasureTaxonomyLevel = associatePerformanceMeasureTaxonomyLevel; }
private void AddProjectCustomGridCustomAttributeField(ProjectCustomGridConfiguration projectCustomGridConfiguration, Dictionary <int, List <vProjectCustomAttributeValue> > projectCustomAttributeDictionary) { var projectCustomAttributeType = projectCustomGridConfiguration.ProjectCustomAttributeType; var isCurrency = projectCustomGridConfiguration.ProjectCustomAttributeType.MeasurementUnitTypeID == MeasurementUnitType.Dollars.MeasurementUnitTypeID; var gridHeaderHtmlString = ("<div>" + LabelWithSugarForExtensions.GenerateHelpIconImgTag(projectCustomAttributeType.ProjectCustomAttributeTypeName, projectCustomAttributeType.ProjectCustomAttributeTypeDescription.ToHTMLFormattedString(), projectCustomAttributeType.GetDescriptionUrl(), 300, LabelWithSugarForExtensions.DisplayStyle.HelpIconOnly) + projectCustomAttributeType.ProjectCustomAttributeTypeName + "</div>").ToHTMLFormattedString(); if (isCurrency) { Add($"{gridHeaderHtmlString}", a => TryParseDecimalCustomAttributeValue(a, projectCustomAttributeType, projectCustomAttributeDictionary), 150, DhtmlxGridColumnFormatType.Currency, DhtmlxGridColumnAggregationType.Total); } else { Add($"{gridHeaderHtmlString}", a => a.GetProjectCustomAttributesValue(projectCustomAttributeType, projectCustomAttributeDictionary), 150, DhtmlxGridColumnFilterType.Text); } }
public RelatedTaxonomyTiersViewData(Models.PerformanceMeasure performanceMeasure, TaxonomyLevel associatePerformanceMeasureTaxonomyLevel, bool showHelpLinks) { ProjectTypePerformanceMeasures = performanceMeasure.GetTaxonomyTiers(); PerformanceMeasureDisplayName = MultiTenantHelpers.GetPerformanceMeasureName(); var fieldDefinitionForTaxonomyTier = associatePerformanceMeasureTaxonomyLevel.GetFieldDefinition(); TaxonomyTierDisplayName = fieldDefinitionForTaxonomyTier.GetFieldDefinitionLabel(); TaxonomyTierHeaderDisplayName = showHelpLinks ? LabelWithSugarForExtensions.LabelWithSugarFor( fieldDefinitionForTaxonomyTier, LabelWithSugarForExtensions.DefaultPopupWidth, LabelWithSugarForExtensions.DisplayStyle.HelpIconWithLabel, TaxonomyTierDisplayName) : new HtmlString(TaxonomyTierDisplayName); var fieldDefinitionIsPrimaryTaxonomyBranch = Models.FieldDefinition.IsPrimaryTaxonomyBranch; var isPrimaryTaxonomyBranchLabel = $"Is Primary {TaxonomyTierDisplayName}"; IsPrimaryTaxonomyTierHeaderDisplayName = showHelpLinks ? LabelWithSugarForExtensions.LabelWithSugarFor( fieldDefinitionIsPrimaryTaxonomyBranch, LabelWithSugarForExtensions.DefaultPopupWidth, LabelWithSugarForExtensions.DisplayStyle.HelpIconWithLabel, isPrimaryTaxonomyBranchLabel) : new HtmlString(isPrimaryTaxonomyBranchLabel); TaxonomyTierDisplayNamePluralized = fieldDefinitionForTaxonomyTier.GetFieldDefinitionLabelPluralized(); AssociatePerformanceMeasureTaxonomyLevel = associatePerformanceMeasureTaxonomyLevel; }
public RelatedPerformanceMeasuresViewData(TaxonomyLevel associatePerformanceMeasureTaxonomyLevel, bool showHelpLinks, IEnumerable <IGrouping <Models.PerformanceMeasure, ProjectTypePerformanceMeasure> > taxonomyTierPerformanceMeasures, bool canHaveAssociatedPerformanceMeasures) { CanHaveAssociatedPerformanceMeasures = canHaveAssociatedPerformanceMeasures; TaxonomyTierPerformanceMeasures = taxonomyTierPerformanceMeasures; var fieldDefinitionForPerformanceMeasure = Models.FieldDefinition.PerformanceMeasure; PerformanceMeasureDisplayName = fieldDefinitionForPerformanceMeasure.GetFieldDefinitionLabel(); PerformanceMeasureDisplayNamePluralized = fieldDefinitionForPerformanceMeasure.GetFieldDefinitionLabelPluralized(); PerformanceMeasureHeaderDisplayName = showHelpLinks ? LabelWithSugarForExtensions.LabelWithSugarFor( fieldDefinitionForPerformanceMeasure, LabelWithSugarForExtensions.DefaultPopupWidth, LabelWithSugarForExtensions.DisplayStyle.HelpIconWithLabel, PerformanceMeasureDisplayName) : new HtmlString(PerformanceMeasureDisplayName); var fieldDefinitionForTaxonomyTier = associatePerformanceMeasureTaxonomyLevel.GetFieldDefinition(); var fieldDefinitionIsPrimaryTaxonomyBranch = Models.FieldDefinition.IsPrimaryTaxonomyBranch; var isPrimaryTaxonomyBranchLabel = $"Is Primary {fieldDefinitionForTaxonomyTier.GetFieldDefinitionLabel()}"; IsPrimaryTaxonomyTierHeaderDisplayName = showHelpLinks ? LabelWithSugarForExtensions.LabelWithSugarFor( fieldDefinitionIsPrimaryTaxonomyBranch, LabelWithSugarForExtensions.DefaultPopupWidth, LabelWithSugarForExtensions.DisplayStyle.HelpIconWithLabel, isPrimaryTaxonomyBranchLabel) : new HtmlString(isPrimaryTaxonomyBranchLabel); PerformanceMeasuresUrl = SitkaRoute <PerformanceMeasureController> .BuildUrlFromExpression(c => c.Index()); }
private static string ToGridHeaderString(this IFieldDefinition fieldDefinition, int popupWidth, string fieldDefinitionDisplayName) { return (LabelWithSugarForExtensions.LabelWithSugarFor(fieldDefinition, popupWidth, LabelWithSugarForExtensions.DisplayStyle.AsGridHeader, fieldDefinitionDisplayName).ToString()); }