Page management cleanup

This commit is contained in:
Shaun Walker
2019-08-21 10:37:02 -04:00
parent 42c6efbfdb
commit ad2d865d7c
6 changed files with 266 additions and 124 deletions

View File

@ -3,7 +3,6 @@
@using Oqtane.Modules
@using Oqtane.Client.Modules.Controls
@inherits ModuleBase
@inject IPageService PageService
@if (PageState.Pages == null)
@ -12,27 +11,28 @@
}
else
{
<ActionLink Action="Add" Text="Add Page" Style="float: right; margin: 10px;" />
<table class="table">
<thead>
<tr>
<th> </th>
<th>&nbsp;</th>
<th>&nbsp;</th>
<th>Path</th>
<th>Name</th>
</tr>
</thead>
<tbody>
@foreach (var p in PageState.Pages)
@foreach (Page page 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>
<td><ActionLink Action="Edit" Parameters="@($"id=" + page.PageId.ToString())" /></td>
<td><ActionLink Action="Delete" Parameters="@($"id=" + page.PageId.ToString())" Class="btn btn-danger" /></td>
<td>@(page.Path)</td>
<td>@(page.Name)</td>
</tr>
}
</tbody>
</table>
<ActionLink Action="Add" Text="Add Page" />
</table>
}
@code {