--HG--
branch : 1.x
This commit is contained in:
bertrandleroy
2011-10-21 17:26:51 -07:00
3 changed files with 13 additions and 4 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

View File

@@ -7,8 +7,7 @@
<body>
<p>
Orchard is temporarily unavailable as a change in configuration requires a restart.
A simple page refresh usually solves this issue.
</p>
A simple page refresh usually solves this issue.</p>
<script type="text/javascript">
window.location.reload();
</script>

View File

@@ -55,6 +55,9 @@ namespace Orchard.Environment {
_shells.Where(x => string.IsNullOrEmpty(x.RequestUrlHost) && string.IsNullOrEmpty(x.RequestUrlPrefix));
_shellsByHost = qualified
.SelectMany(s =>
s.RequestUrlHost.Split(new [] {','}, StringSplitOptions.RemoveEmptyEntries)
.Select(h => new ShellSettings(s) {RequestUrlHost = h}))
.GroupBy(s => s.RequestUrlHost ?? "")
.OrderByDescending(g => g.Key.Length);