mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Merge
--HG-- branch : 1.x
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user