コード例 #1
0
        public ActionResult DisplaySettings(DisplaySettingsPageModel model)
        {
            if (!_services.Authorizer.Authorize(Permissions.ManageSitemap, T("Not allowed to manage sitemap")))
                return new HttpUnauthorizedResult();

            _sitemapService.SetRoutes(model.Routes);
            _services.Notifier.Add(NotifyType.Information, T("Saved Sitemap display layout"));
            return RedirectToAction("DisplaySettings");
        }
コード例 #2
0
        public ActionResult DisplaySettings()
        {
            if (!_services.Authorizer.Authorize(Permissions.ManageSitemap, T("Not allowed to manage sitemap")))
                return new HttpUnauthorizedResult();

            var routes = _sitemapService.GetRoutes();
            var model = new DisplaySettingsPageModel {
                AutoLayout = false,
                Routes = routes.ToList()
            };
            return View(model);
        }