This repository has been archived on 2025-05-14. You can view files and clone it, but cannot push or open issues or pull requests.
2019-05-04 20:32:08 -04:00

42 lines
860 B
Plaintext

@using Oqtane.Services
@using Oqtane.Models
@using Oqtane.Modules
@using Oqtane.Client.Modules.Controls
@inherits ModuleBase
@inject ISiteService SiteService
@if (sites == null)
{
<p><em>Loading...</em></p>
}
else
{
<table class="table">
<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" />
}
@functions {
public override SecurityAccessLevelEnum SecurityAccessLevel { get { return SecurityAccessLevelEnum.Host; } }
List<Site> sites;
protected override async Task OnInitAsync()
{
sites = await SiteService.GetSitesAsync();
}
}