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.

32 lines
876 B
Plaintext

@namespace Oqtane.Modules.Admin.Dashboard
@inherits ModuleBase
@inject IPageService PageService
@inject IUserService UserService
<div class="row">
@foreach (var p in pages)
{
if (UserSecurity.IsAuthorized(PageState.User, "View", p.Permissions))
{
string url = NavigateUrl(p.Path);
<div class="col-md-2 mx-auto text-center">
<NavLink class="nav-link" href="@url" Match="NavLinkMatch.All">
<h2><span class="oi oi-@p.Icon" aria-hidden="true"></span></h2>@p.Name
</NavLink>
</div>
}
}
</div>
<br />
<br />
@code {
List<Page> pages;
protected override void OnInitialized()
{
// display list of pages which are children of current page
pages = PageState.Pages.Where(item => item.ParentId == PageState.Page.PageId).ToList();
}
}