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