mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-24 05:23:33 +08:00
- 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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user