コード例 #1
0
ファイル: LayoutController.cs プロジェクト: k1hash/NBlog
        private void InitialiseBaseViewModel(LayoutModel model)
        {
            model.Config = Services.Config.Current;
            model.User = Services.User.Current;
            model.Theme = Services.Theme.Current;

            //model.Base = new LayoutModel.LayoutCommonModel
            //{
            //    FriendlyUsername = currentUser.FriendlyName,
            //    IsAuthenticated = currentUser.IsAuthenticated,
            //    IsAdmin = currentUser.IsAdmin,
            //    Theme = theme,
            //    Config = config
            //};
        }
コード例 #2
0
ファイル: LayoutController.cs プロジェクト: strogo/nblog
        private void InitialiseBaseViewModel(LayoutModel model)
        {
            var currentUser = Services.User.Current;
            var config = Services.Config.Current;

            model.Base = new LayoutModel.LayoutBaseModel
            {
                FriendlyUsername = currentUser.FriendlyName,
                IsAuthenticated = currentUser.IsAuthenticated,
                IsAdmin = currentUser.IsAdmin,
                Theme = config.Theme,
                SiteTitle = config.Title,
                SiteMetaDescription = config.MetaDescription,
                SiteTagline = config.Tagline,
                SiteHeading = config.Heading,
                Crossbar = config.Crossbar,
                GoogleAnalyticsId = config.GoogleAnalyticsId,
                TwitterUsername = config.TwitterUsername
            };
        }