Once the ItemDisplayModel and ItemEditorModel were converted to use ZoneCollection they became identical. Collapsing them into the same ItemViewModel class.

--HG--
extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4044987
This commit is contained in:
loudej
2010-01-05 10:54:12 +00:00
parent 3d0c236102
commit c756b09233
57 changed files with 216 additions and 306 deletions

View File

@@ -26,14 +26,14 @@ namespace Orchard.Core.Settings.Controllers {
var model = new Orchard.Core.Settings.ViewModels.SettingsIndexViewModel {
Site = _siteService.GetSiteSettings().As<SiteSettings>()
};
model.EditorModel = _modelManager.BuildEditorModel(model.Site);
model.ViewModel = _modelManager.BuildEditorModel(model.Site);
return View(model);
}
[HttpPost, ActionName("Index")]
public ActionResult IndexPOST(string tabName) {
var viewModel = new SettingsIndexViewModel { Site = _siteService.GetSiteSettings().As<SiteSettings>() };
viewModel.EditorModel = _modelManager.UpdateEditorModel(viewModel.Site.ContentItem, this);
viewModel.ViewModel = _modelManager.UpdateEditorModel(viewModel.Site.ContentItem, this);
if (!TryUpdateModel(viewModel)) {
return View(viewModel);