mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-23 04:43:35 +08:00
Continuing to refactor ModelDriver concept into ContentHandler
--HG-- extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4041354
This commit is contained in:
@@ -38,7 +38,7 @@ namespace Orchard.Users.Controllers {
|
||||
var model = new UsersIndexViewModel();
|
||||
model.Rows = _userRepository.Fetch(x => x.UserName != null)
|
||||
.Select(x => new UsersIndexViewModel.Row {
|
||||
User = _contentManager.Get(x.Id).As<UserModel>()
|
||||
User = _contentManager.Get(x.Id).As<User>()
|
||||
})
|
||||
.ToList();
|
||||
|
||||
@@ -67,14 +67,14 @@ namespace Orchard.Users.Controllers {
|
||||
}
|
||||
|
||||
public ActionResult Edit(int id) {
|
||||
var model = new UserEditViewModel { User = _contentManager.Get<UserModel>(id) };
|
||||
var model = new UserEditViewModel { User = _contentManager.Get<User>(id) };
|
||||
model.Editors = _contentManager.GetEditors(model.User.ContentItem);
|
||||
return View(model);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public ActionResult Edit(int id, FormCollection input) {
|
||||
var model = new UserEditViewModel { User = _contentManager.Get<UserModel>(id) };
|
||||
var model = new UserEditViewModel { User = _contentManager.Get<User>(id) };
|
||||
model.Editors = _contentManager.UpdateEditors(model.User.ContentItem, this);
|
||||
|
||||
if (!TryUpdateModel(model, input.ToValueProvider())) {
|
||||
|
Reference in New Issue
Block a user