public CloseIncidentActionLink(IPortalContext portalContext, GridMetadata gridMetadata, int languageCode,
                                       CloseIncidentAction action, bool enabled = true, UrlBuilder url = null, string portalName = null)
            : this(portalContext, languageCode, action, enabled, url, portalName)
        {
            if (gridMetadata.CloseIncidentDialog == null)
            {
                return;
            }

            Modal.CloseButtonCssClass   = gridMetadata.CloseIncidentDialog.CloseButtonCssClass;
            Modal.CloseButtonText       = gridMetadata.CloseIncidentDialog.CloseButtonText.GetLocalizedString(languageCode);
            Modal.CssClass              = gridMetadata.CloseIncidentDialog.CssClass;
            Modal.DismissButtonSrText   = gridMetadata.CloseIncidentDialog.DismissButtonSrText.GetLocalizedString(languageCode);
            Modal.PrimaryButtonCssClass = gridMetadata.CloseIncidentDialog.PrimaryButtonCssClass;
            Modal.PrimaryButtonText     = gridMetadata.CloseIncidentDialog.PrimaryButtonText.GetLocalizedString(languageCode);
            Modal.Size          = gridMetadata.CloseIncidentDialog.Size;
            Modal.Title         = gridMetadata.CloseIncidentDialog.Title.GetLocalizedString(languageCode);
            Modal.TitleCssClass = gridMetadata.CloseIncidentDialog.TitleCssClass;
        }
        private CloseIncidentActionLink(IPortalContext portalContext, int languageCode, CloseIncidentAction action,
                                        bool enabled = true, UrlBuilder url = null, string portalName = null)
            : base(
                portalContext, languageCode, action, LinkActionType.CloseIncident, enabled, url, portalName, DefaultButtonLabel,
                DefaultButtonTooltip)
        {
            Modal = new ViewCloseIncidentModal();

            if (url == null)
            {
                URL = EntityListFunctions.BuildControllerActionUrl("CloseCase", "EntityAction",
                                                                   new { area = "Portal", __portalScopeId__ = portalContext.Website.Id });
            }

            var defaultResolution            = action.DefaultResolution;
            var defaultResolutionDescription = action.DefaultResolutionDescription;

            DefaultResolution            = !string.IsNullOrWhiteSpace(defaultResolution) ? defaultResolution : DefaultResolutionLabel;
            DefaultResolutionDescription = !string.IsNullOrWhiteSpace(defaultResolutionDescription) ? defaultResolutionDescription : DefaultResolutionDescriptionLabel;
        }