43 lines
902 B
Plaintext
43 lines
902 B
Plaintext
@using Oqtane.Services
|
|
@using Oqtane.Models
|
|
@using Oqtane.Modules
|
|
@using Oqtane.Modules.Controls
|
|
@namespace Oqtane.Modules.Admin.Sites
|
|
@inherits ModuleBase
|
|
|
|
@inject ISiteService SiteService
|
|
|
|
@if (sites == null)
|
|
{
|
|
<p><em>Loading...</em></p>
|
|
}
|
|
else
|
|
{
|
|
<table class="table table-borderless">
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var site in sites)
|
|
{
|
|
<tr>
|
|
<td>@site.Name</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
<ActionLink Action="Add" Text="Add Site" />
|
|
}
|
|
|
|
@code {
|
|
public override SecurityAccessLevel SecurityAccessLevel { get { return SecurityAccessLevel.Host; } }
|
|
|
|
List<Site> sites;
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
sites = await SiteService.GetSitesAsync();
|
|
}
|
|
} |