37 lines
951 B
Plaintext
37 lines
951 B
Plaintext
@namespace Oqtane.Modules.Admin.Sites
|
|
@inherits ModuleBase
|
|
|
|
@inject ISiteService SiteService
|
|
|
|
@if (sites == null)
|
|
{
|
|
<p><em>Loading...</em></p>
|
|
}
|
|
else
|
|
{
|
|
<ActionLink Action="Add" Text="Add Site" Style="float: right; margin: 10px;" />
|
|
|
|
<Pager Items="@sites">
|
|
<Header>
|
|
<th>Name</th>
|
|
<th> </th>
|
|
<th> </th>
|
|
</Header>
|
|
<Row>
|
|
<td>@context.Name</td>
|
|
<td><ActionLink Action="Edit" Parameters="@($"id=" + context.SiteId.ToString())" /></td>
|
|
<td><ActionLink Action="Delete" Parameters="@($"id=" + context.SiteId.ToString())" Class="btn btn-danger" /></td>
|
|
</Row>
|
|
</Pager>
|
|
}
|
|
|
|
@code {
|
|
public override SecurityAccessLevel SecurityAccessLevel { get { return SecurityAccessLevel.Host; } }
|
|
|
|
List<Site> sites;
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
sites = await SiteService.GetSitesAsync();
|
|
}
|
|
} |