public string GetLogo(WhiteLabelLogoTypeEnum type, bool general = true, bool isDefIfNoWhiteLabel = false)
        {
            string imgUrl;

            if (TenantLogoManager.WhiteLabelEnabled)
            {
                var _tenantWhiteLabelSettings = SettingsManager.Load <TenantWhiteLabelSettings>();
                return(TenantWhiteLabelSettingsHelper.GetAbsoluteLogoPath(_tenantWhiteLabelSettings, type, general));
            }
            else
            {
                if (isDefIfNoWhiteLabel)
                {
                    imgUrl = TenantWhiteLabelSettingsHelper.GetAbsoluteDefaultLogoPath(type, general);
                }
                else
                {
                    if (type == WhiteLabelLogoTypeEnum.Dark)
                    {
                        /*** simple scheme ***/
                        var _tenantInfoSettings = SettingsManager.Load <TenantInfoSettings>();
                        imgUrl = TenantInfoSettingsHelper.GetAbsoluteCompanyLogoPath(_tenantInfoSettings);
                        /***/
                    }
                    else
                    {
                        imgUrl = TenantWhiteLabelSettingsHelper.GetAbsoluteDefaultLogoPath(type, general);
                    }
                }
            }

            return(imgUrl);
        }
Beispiel #2
0
        public string GetLogoDocsEditor(bool general)
        {
            var tenantWhiteLabelSettings = SettingsManager.Load <TenantWhiteLabelSettings>();

            if (WhiteLabelEnabled)
            {
                return(TenantWhiteLabelSettingsHelper.GetAbsoluteLogoPath(tenantWhiteLabelSettings, WhiteLabelLogoTypeEnum.DocsEditor, general));
            }
            return(TenantWhiteLabelSettingsHelper.GetAbsoluteDefaultLogoPath(WhiteLabelLogoTypeEnum.DocsEditor, general));
        }
Beispiel #3
0
        public string GetTopLogo(bool general)//LogoLightSmall
        {
            var tenantWhiteLabelSettings = SettingsManager.Load <TenantWhiteLabelSettings>();

            if (WhiteLabelEnabled)
            {
                return(TenantWhiteLabelSettingsHelper.GetAbsoluteLogoPath(tenantWhiteLabelSettings, WhiteLabelLogoTypeEnum.LightSmall, general));
            }
            return(TenantWhiteLabelSettingsHelper.GetAbsoluteDefaultLogoPath(WhiteLabelLogoTypeEnum.LightSmall, general));
        }
Beispiel #4
0
        public string GetLogoDark(bool general)
        {
            if (WhiteLabelEnabled)
            {
                var tenantWhiteLabelSettings = SettingsManager.Load <TenantWhiteLabelSettings>();
                return(TenantWhiteLabelSettingsHelper.GetAbsoluteLogoPath(tenantWhiteLabelSettings, WhiteLabelLogoTypeEnum.Dark, general));
            }

            /*** simple scheme ***/
            return(TenantInfoSettingsHelper.GetAbsoluteCompanyLogoPath(SettingsManager.Load <TenantInfoSettings>()));
            /***/
        }
Beispiel #5
0
        public string GetFavicon(bool general, bool timeParam)
        {
            string faviconPath;
            var    tenantWhiteLabelSettings = SettingsManager.Load <TenantWhiteLabelSettings>();

            if (WhiteLabelEnabled)
            {
                faviconPath = TenantWhiteLabelSettingsHelper.GetAbsoluteLogoPath(tenantWhiteLabelSettings, WhiteLabelLogoTypeEnum.Favicon, general);
                if (timeParam)
                {
                    var now = DateTime.Now;
                    faviconPath = string.Format("{0}?t={1}", faviconPath, now.Ticks);
                }
            }
            else
            {
                faviconPath = TenantWhiteLabelSettingsHelper.GetAbsoluteDefaultLogoPath(WhiteLabelLogoTypeEnum.Favicon, general);
            }

            return(faviconPath);
        }