コード例 #1
0
        private Control getGlobalFootBlock()
        {
            var controls = new List <Control>();

            // This check exists to prevent the display of post back controls. With these controls we sometimes don't have a specific destination page to use for an
            // authorization check, meaning that the system code has no way to prevent their display when there is no intermediate user.
            if (!AppTools.IsIntermediateInstallation || AppRequestState.Instance.IntermediateUserExists)
            {
                controls.AddRange(EwfUiStatics.AppProvider.GetGlobalFootControls());
            }

            var ewlWebSite = new ExternalResourceInfo("http://enterpriseweblibrary.org/");

            if (ewlWebSite.UserCanAccessResource && !EwfUiStatics.AppProvider.PoweredByEwlFooterDisabled())
            {
                controls.Add(
                    new Paragraph(
                        "Powered by the ".GetLiteralControl(),
                        EwfLink.CreateForNavigationInNewWindow(ewlWebSite, new TextActionControlStyle("Enterprise Web Library")),
                        (" (" + TimeZoneInfo.ConvertTime(AppTools.EwlBuildDateTime, TimeZoneInfo.Local).ToMonthYearString() + " version)").GetLiteralControl())
                {
                    CssClass = CssElementCreator.PoweredByEwlFooterCssClass
                });
            }

            return(controls.Any() ? new Block(controls.ToArray())
            {
                ClientIDMode = ClientIDMode.Static, ID = CssElementCreator.GlobalFootBlockId
            } : null);
        }
コード例 #2
0
        private Control getGlobalFootBlock()
        {
            var controls = new List <Control>();

            // This check exists to prevent the display of post back controls. With these controls we sometimes don't have a specific destination page to use for an
            // authorization check, meaning that the system code has no way to prevent their display when there is no intermediate user.
            if (!ConfigurationStatics.IsIntermediateInstallation || AppRequestState.Instance.IntermediateUserExists)
            {
                controls.AddRange(EwfUiStatics.AppProvider.GetGlobalFootControls());
            }

            var ewlWebSite = new ExternalResourceInfo("http://enterpriseweblibrary.org/");

            if (ewlWebSite.UserCanAccessResource && !EwfUiStatics.AppProvider.PoweredByEwlFooterDisabled())
            {
                controls.AddRange(
                    new Paragraph(
                        "Powered by the ".ToComponents()
                        .Concat(new EwfHyperlink(ewlWebSite.ToHyperlinkNewTabBehavior(), new StandardHyperlinkStyle(EwlStatics.EwlName)))
                        .Concat((" (" + TimeZoneInfo.ConvertTime(EwlStatics.EwlBuildDateTime, TimeZoneInfo.Local).ToMonthYearString() + " version)").ToComponents()),
                        classes: CssElementCreator.PoweredByEwlFooterClass).ToCollection().GetControls());
            }

            return(controls.Any() ? new Block(controls.ToArray())
            {
                ClientIDMode = ClientIDMode.Static, ID = CssElementCreator.GlobalFootBlockId
            } : null);
        }
コード例 #3
0
        private Control getGlobalFootBlock()
        {
            var controls = new List<Control>();

            // This check exists to prevent the display of post back controls. With these controls we sometimes don't have a specific destination page to use for an
            // authorization check, meaning that the system code has no way to prevent their display when there is no intermediate user.
            if( !ConfigurationStatics.IsIntermediateInstallation || AppRequestState.Instance.IntermediateUserExists )
                controls.AddRange( EwfUiStatics.AppProvider.GetGlobalFootControls() );

            var ewlWebSite = new ExternalResourceInfo( "http://enterpriseweblibrary.org/" );
            if( ewlWebSite.UserCanAccessResource && !EwfUiStatics.AppProvider.PoweredByEwlFooterDisabled() ) {
                controls.Add(
                    new Paragraph(
                        "Powered by the ".GetLiteralControl(),
                        EwfLink.CreateForNavigationInNewWindow( ewlWebSite, new TextActionControlStyle( EwlStatics.EwlName ) ),
                        ( " (" + TimeZoneInfo.ConvertTime( EwlStatics.EwlBuildDateTime, TimeZoneInfo.Local ).ToMonthYearString() + " version)" ).GetLiteralControl() )
                        {
                            CssClass = CssElementCreator.PoweredByEwlFooterCssClass
                        } );
            }

            return controls.Any() ? new Block( controls.ToArray() ) { ClientIDMode = ClientIDMode.Static, ID = CssElementCreator.GlobalFootBlockId } : null;
        }