BootstrapAdmin/Bootstrap.Admin/Models/NavigatorBarModel.cs

31 lines
966 B
C#

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