mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-24 18:25:04 +08:00
45 lines
2.1 KiB
Plaintext
45 lines
2.1 KiB
Plaintext
@model Orchard.MultiTenancy.ViewModels.TenantsIndexViewModel
|
|
@using Orchard.Environment.Configuration
|
|
@using Orchard.MultiTenancy.Extensions;
|
|
|
|
@{
|
|
Style.Require("MultiTenancyAdmin");
|
|
Layout.Title = T("List of Site's Tenants").ToString();
|
|
}
|
|
|
|
<div class="manage">@Html.ActionLink(T("Add a Tenant").ToString(), "Add", new { area = "Orchard.MultiTenancy" }, new { @class = "button primaryAction" })</div>
|
|
<ul class="contentItems tenants">
|
|
@foreach (var tenant in Model.TenantSettings) {
|
|
<li class="tenant @tenant.State">
|
|
<div class="summary">
|
|
<div class="properties">
|
|
<h3>
|
|
@tenant.Name
|
|
@if (!String.IsNullOrEmpty(tenant.RequestUrlHost)) {
|
|
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">
|
|
<ul class="action-links">
|
|
@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
|
|
var t = tenant;
|
|
<li class="action-link">
|
|
@Html.DisplayFor(m => t, String.Format("ActionsFor{0}", tenant.State.ToString()), "")
|
|
</li>
|
|
}
|
|
<li class="action-link">
|
|
@Html.ActionLink(T("Edit").ToString(), "Edit", new { name = tenant.Name, area = "Orchard.MultiTenancy" })
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
}
|
|
</ul>
|