BootstrapAdmin/Bootstrap.Admin/Models/NavigatorBarModel.cs

25 lines
937 B
C#

using Bootstrap.DataAccess;
using Bootstrap.Security;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
namespace Bootstrap.Admin.Models
{
public class NavigatorBarModel : HeaderBarModel
{
public NavigatorBarModel(ControllerBase controller) : base(controller.User.Identity)
{
Navigations = BootstrapMenu.RetrieveSystemMenus(UserName, $"~/{controller.ControllerContext.ActionDescriptor.ControllerName}/{controller.ControllerContext.ActionDescriptor.ActionName}");
Applications = DictHelper.RetrieveApps();
HomeUrl = "~/Admin/Index";
}
/// <summary>
///
/// </summary>
public IEnumerable<BootstrapMenu> Navigations { get; private set; }
/// <summary>
///
/// </summary>
public IEnumerable<KeyValuePair<string, string>> Applications { get; private set; }
}
}