Multi-tenancy handles mutliple hosts per shell

--HG--
branch : 1.x
This commit is contained in:
bertrandleroy
2011-10-11 10:54:54 -07:00
parent a34923c7d0
commit 118d5b3533
2 changed files with 12 additions and 2 deletions

View File

@@ -1,4 +1,5 @@
@model Orchard.MultiTenancy.ViewModels.TenantsIndexViewModel
@using Orchard.Environment.Configuration
@using Orchard.MultiTenancy.Extensions;
@{
@@ -13,8 +14,14 @@
<div class="summary">
<div class="properties">
<h3>@tenant.Name @if (!string.IsNullOrEmpty(tenant.RequestUrlHost)) {
<span class="tenantHost"> - @Html.Link(Url.Tenant(tenant), Url.Tenant(tenant))</span>
}</h3>
var tenantClone = new ShellSettings(tenant);
foreach (var t in tenant.RequestUrlHost.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries)) {
tenantClone.RequestUrlHost = t;
var url = Url.Tenant(tenantClone);
<span class="tenantHost"> - @Html.Link(url, url)</span>
}
}
</h3>
</div>
<div class="related">
@if (!string.Equals(tenant.Name, "default", StringComparison.OrdinalIgnoreCase)) { //todo: (heskew) base this off the view model so logic on what can be removed and have its state changed stays in the controller