47 lines
1.3 KiB
Plaintext
47 lines
1.3 KiB
Plaintext
@using Microsoft.AspNetCore.Components.Web
|
|
@using Oqtane.Services
|
|
@using Oqtane.Models
|
|
@using Oqtane.Modules
|
|
@using Oqtane.Modules.Controls
|
|
@namespace Oqtane.Modules.Admin.ModuleDefinitions
|
|
@inherits ModuleBase
|
|
@inject IModuleDefinitionService ModuleDefinitionService
|
|
|
|
@if (moduledefinitions == null)
|
|
{
|
|
<p><em>Loading...</em></p>
|
|
}
|
|
else
|
|
{
|
|
<ActionLink Action="Add" Text="Install Module" />
|
|
<table class="table table-borderless">
|
|
<thead>
|
|
<tr>
|
|
<th> </th>
|
|
<th>Name</th>
|
|
<th>Version</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var moduledefinition in moduledefinitions)
|
|
{
|
|
<tr>
|
|
<td><ActionLink Action="Edit" Parameters="@($"id=" + moduledefinition.ModuleDefinitionId.ToString())" /></td>
|
|
<td>@moduledefinition.Name</td>
|
|
<td>@moduledefinition.Version</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
}
|
|
|
|
@code {
|
|
public override SecurityAccessLevel SecurityAccessLevel { get { return SecurityAccessLevel.Host; } }
|
|
|
|
List<ModuleDefinition> moduledefinitions;
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
moduledefinitions = await ModuleDefinitionService.GetModuleDefinitionsAsync(PageState.Site.SiteId);
|
|
}
|
|
} |