public ActionResult CreateTheme(ThemeViewModel model)
        {
            if (IsModelValidAndPersistErrors())
            {
                Theme theme = new Theme()
                {
                    DisplayName = model.DisplayName,
                    FolderName = model.FolderName,
                    Name = model.Name,
                    VisibleToUsers = model.VisibleToUsers
                };
                _themeRepository.Add(theme);

                if (model.DefaultTheme)
                    _themeServices.ChangeDefaultTheme(theme.ThemeID);

                SetSuccess("Theme Created");
                return RedirectToAction("Themes");
            }

            return RedirectToSelf();
        }
        public ActionResult EditTheme(ThemeViewModel model)
        {
            if (IsModelValidAndPersistErrors())
            {
                Theme theme = _themeRepository.Get(model.ThemeID);
                theme.DisplayName = model.DisplayName;
                theme.FolderName = model.FolderName;
                theme.Name = model.Name;
                theme.ThemeID = model.ThemeID;
                theme.VisibleToUsers = model.VisibleToUsers;
                _themeRepository.Update(theme);

                if (model.DefaultTheme)
                    _themeServices.ChangeDefaultTheme(theme.ThemeID);

                SetSuccess("Theme updated");
                return RedirectToAction("Themes");
            }

            return RedirectToSelf(new { ThemeID = model.ThemeID });
        }
        public ActionResult EditTheme(int ThemeID)
        {
            Theme theme = _themeRepository.Get(ThemeID);

            ThemeViewModel model = new ThemeViewModel()
            {
                DefaultTheme = SiteConfig.BoardTheme.ToInt() == theme.ThemeID,
                DisplayName = theme.DisplayName,
                FolderName = theme.FolderName,
                Name = theme.Name,
                ThemeID = theme.ThemeID,
                VisibleToUsers = theme.VisibleToUsers
            };

            return View(model);
        }
 public ActionResult CreateTheme()
 {
     ThemeViewModel model = new ThemeViewModel();
     return View(model);
 }