Esempio n. 1
0
 public CommentsUIService(CommentingSettings settings, IGetWebpageCommentingInfo getWebpageCommentingInfo, ISession session, IStringResourceProvider stringResourceProvider)
 {
     _settings = settings;
     _getWebpageCommentingInfo = getWebpageCommentingInfo;
     _session = session;
     _stringResourceProvider = stringResourceProvider;
 }
Esempio n. 2
0
 public CommentTokenProvider(IUniquePageService uniquePageService,
                             CommentingSettings commentingSettings, Site site)
 {
     _uniquePageService  = uniquePageService;
     _commentingSettings = commentingSettings;
     _site = site;
 }
Esempio n. 3
0
 public CommentTokenProvider(IUniquePageService uniquePageService,
                             CommentingSettings commentingSettings, Site site, ISession session)
 {
     _uniquePageService  = uniquePageService;
     _commentingSettings = commentingSettings;
     _site    = site;
     _session = session;
 }
Esempio n. 4
0
        public static bool AreCommentsEnabled(this Webpage webpage, CommentingInfo commentingInfo, CommentingSettings settings)
        {
            if (webpage == null || settings == null)
            {
                return(false);
            }

            if (commentingInfo != null)
            {
                if (commentingInfo.CommentingEnabledStatus != CommentingEnabledStatus.System)
                {
                    return(commentingInfo.CommentingEnabledStatus == CommentingEnabledStatus.Enabled);
                }
            }

            return(settings.AllowedTypes.Contains(webpage.GetType()));
        }
Esempio n. 5
0
 public GetCurrentPageCommentsWidgetModel(IGetWebpageCommentingInfo getWebpageCommentingInfo,
                                          CommentingSettings commentingSettings)
 {
     _getWebpageCommentingInfo = getWebpageCommentingInfo;
     _commentingSettings       = commentingSettings;
 }
 public RedirectToRouteResult Index([IoCModelBinder(typeof(CommentingSettingsModelBinder))] CommentingSettings newSettings)
 {
     _commentingSettingsAdminService.UpdateSettings(newSettings);
     TempData.SuccessMessages().Add("Commenting settings saved");
     return(RedirectToAction("Index"));
 }
Esempio n. 7
0
 public CommentsUIService(CommentingSettings settings, IGetWebpageCommentingInfo getWebpageCommentingInfo, ISession session)
 {
     _settings = settings;
     _getWebpageCommentingInfo = getWebpageCommentingInfo;
     _session = session;
 }
Esempio n. 8
0
 public void UpdateSettings(CommentingSettings settings)
 {
     _configurationProvider.SaveSettings(settings);
 }