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.
Mitchel Sellers f8a048e5ac ActionLink Improvements
Adjustment to ActionLink component to support custom button classes.  Adjustment of all button styles inside of the project to swap to either btn-danger for delete operations or btn-secondary for cancel operations for consistency.
2019-05-17 23:55:55 -05:00

40 lines
1.0 KiB
Plaintext

@using Oqtane.Services
@using Oqtane.Models
@using Oqtane.Modules
@using Oqtane.Client.Modules.Controls
@inherits ModuleBase
@inject IPageService PageService
@if (PageState.Pages == null)
{
<p><em>Loading...</em></p>
}
else
{
<table class="table">
<thead>
<tr>
<th> </th>
<th>Path</th>
<th>Name</th>
</tr>
</thead>
<tbody>
@foreach (var p in PageState.Pages)
{
<tr>
<td><ActionLink Action="Edit" Parameters="@($"id=" + p.PageId.ToString())" /></td>
<td><ActionLink Action="Delete" Parameters="@($"id=" + p.PageId.ToString())" ButtonClass="btn-danger" /></td>
<td>@p.Path</td>
<td>@p.Name</td>
</tr>
}
</tbody>
</table>
<ActionLink Action="Add" Text="Add Page" />
}
@functions {
public override SecurityAccessLevelEnum SecurityAccessLevel { get { return SecurityAccessLevelEnum.Admin; } }
}