- Adding TenantState to the ShellSettings.

- Changes to the setup controller, multi tenancy controller/command handler to accomodate new ShellSettings like host,url prefix and state.
- Integration tests.

--HG--
branch : dev
This commit is contained in:
Suha Can
2010-04-22 17:38:02 -07:00
parent 1fa348b6b6
commit 91bb52c8af
15 changed files with 149 additions and 50 deletions

View File

@@ -21,11 +21,7 @@ namespace Orchard.MultiTenancy.Controllers {
public IOrchardServices Services { get; set; }
public ActionResult Index() {
return View("List", new TenantsListViewModel { TenantSettings = _tenantService.GetTenants() });
}
public ActionResult List() {
return View(new TenantsListViewModel { TenantSettings = _tenantService.GetTenants() });
return View(new TenantsIndexViewModel { TenantSettings = _tenantService.GetTenants() });
}
public ActionResult Add() {
@@ -40,12 +36,12 @@ namespace Orchard.MultiTenancy.Controllers {
_tenantService.CreateTenant(
new ShellSettings {
Name = viewModel.Name,
DataProvider = viewModel.DataProvider,
DataConnectionString = viewModel.ConnectionString,
DataTablePrefix = viewModel.Prefix
RequestUrlHost = viewModel.RequestUrlHost,
RequestUrlPrefix = viewModel.RequestUrlPrefix,
State = new TenantState("Uninitialized")
});
return RedirectToAction("List");
return RedirectToAction("Index");
}
catch (Exception exception) {
Services.Notifier.Error(T("Creating Tenant failed: ") + exception.Message);