public override ActionResult Index(RenderModel model)
        {
            // Create the empty view model
            var pageModel = new Models.RegisterModel(model.Content);

            DialogueMapper.PopulateCommonUmbracoProperties(pageModel, model.Content);

            // Return the model to the current template
            return(View(PathHelper.GetThemeViewPath("Register"), pageModel));
        }
Пример #2
0
        /// <summary>
        /// Create an actionresult to target a specific template
        /// in this case the 'Home' template on the 'Home' Doctype
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public override ActionResult Index(RenderModel model)
        {
            // This is how we log out
            var logOff = Request.QueryString[AppConstants.LogOut];

            if (!string.IsNullOrEmpty(logOff))
            {
                MemberService.LogOff();
                return(Redirect(Settings.ForumRootUrl));
            }

            var forumRoot = DialogueMapper.MapRootForum(model.Content);

            // Return the model to the current template
            return(View(PathHelper.GetThemeViewPath("Dialogue"), forumRoot));
        }
        public override ActionResult Index(RenderModel model)
        {
            // Create the empty view model
            var pageModel = new LogOnModel(model.Content);

            DialogueMapper.PopulateCommonUmbracoProperties(pageModel, model.Content);

            // See if a return url is present or not and add it
            var forgotPassword = Request["forgot"];

            if (!string.IsNullOrEmpty(forgotPassword))
            {
                pageModel.ShowForgotPassword = true;
            }

            // Return the model to the current template
            return(View(PathHelper.GetThemeViewPath("Login"), pageModel));
        }
Пример #4
0
        /// <summary>
        /// Create an actionresult to target a specific template
        /// in this case the 'Home' template on the 'Home' Doctype
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public override ActionResult Index(RenderModel model)
        {
            // This is how we log out
            var logOff = Request.QueryString[AppConstants.LogOut];

            if (!string.IsNullOrEmpty(logOff))
            {
                ServiceFactory.MemberService.LogOff();
                return(Redirect(Settings.ForumRootUrl));
            }

            var forumRoot = DialogueMapper.MapRootForum(model.Content);


            foreach (var category in forumRoot.MainCategories)
            {
                var topicCount = ServiceFactory.TopicService.GetTopicCountByCategory(category.Id);
                category.TopicCount = topicCount;

                category.LatestTopic = ServiceFactory.TopicService.GetPagedTopicsByCategory(1, Settings.TopicsPerPage, int.MaxValue, category.Id).FirstOrDefault();
            }
            // Return the model to the current template
            return(View(PathHelper.GetThemeViewPath("Dialogue"), forumRoot));
        }
Пример #5
0
 public DialogueFileRepository(IFileReader loader, DialogueMapper mapper) : base(loader, mapper)
 {
 }