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-09-15 18:36:39 -04:00

44 lines
945 B
Plaintext

@using Microsoft.AspNetCore.Components.Web
@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();
}
}