- MultiTenancy module lists current tenants of the site.

- TenantService abstraction to list/add tenants.
- TenantCommand and multitenancy admin controllers on top of the tenantservice.
- Simple Tenant list UI for the backend.

--HG--
branch : dev
This commit is contained in:
Suha Can
2010-04-21 13:53:03 -07:00
parent 8434039294
commit 410c304bbc
10 changed files with 118 additions and 9 deletions

View File

@@ -1,18 +1,26 @@
using System.Web.Mvc;
using Orchard.Localization;
using Orchard.MultiTenancy.Services;
using Orchard.MultiTenancy.ViewModels;
namespace Orchard.MultiTenancy.Controllers {
[ValidateInput(false)]
public class AdminController : Controller {
public AdminController() {
private readonly ITenantService _tenantService;
public AdminController(ITenantService tenantService) {
_tenantService = tenantService;
T = NullLocalizer.Instance;
}
private Localizer T { get; set; }
public ActionResult List() {
return View(new TenantsListViewModel());
return View(new TenantsListViewModel { TenantSettings = _tenantService.GetTenants() });
}
public ActionResult Add() {
return View(new TenantsAddViewModel());
}
}
}