refactoring model editors, permissions, and adding rough localization

--HG--
extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4040294
This commit is contained in:
loudej
2009-11-14 02:35:43 +00:00
parent 958c61ac69
commit 07c57bc78d
48 changed files with 496 additions and 145 deletions

View File

@@ -2,6 +2,7 @@ using System;
using System.Linq;
using System.Web.Mvc;
using Orchard.Data;
using Orchard.Localization;
using Orchard.Models;
using Orchard.Models.Driver;
using Orchard.Security;
@@ -10,6 +11,7 @@ using Orchard.Users.Models;
using Orchard.Users.ViewModels;
namespace Orchard.Users.Controllers {
public class AdminController : Controller, IModelUpdater {
private readonly IModelManager _modelManager;
private readonly IRepository<UserRecord> _userRepository;
@@ -25,6 +27,9 @@ namespace Orchard.Users.Controllers {
}
public IUser CurrentUser { get; set; }
//public IText T { get; set; }
public Func<string, LocalizedString> T { get; set; }
public ActionResult Index() {
var model = new UsersIndexViewModel();
@@ -67,7 +72,8 @@ namespace Orchard.Users.Controllers {
if (!TryUpdateModel(model, input.ToValueProvider())) {
return View(model);
}
_notifier.Information("User information updated");
_notifier.Information(T("User information updated"));
return RedirectToAction("Edit", new { id });
}