BootstrapAdmin/Bootstrap.Admin/Models/NavigatorBarModel.cs

31 lines
966 B
C#
Raw Normal View History

2016-10-21 16:35:26 +08:00
using Bootstrap.DataAccess;
using Bootstrap.Security;
2018-06-07 00:45:47 +08:00
using Microsoft.AspNetCore.Mvc;
2016-10-21 16:35:26 +08:00
using System.Collections.Generic;
namespace Bootstrap.Admin.Models
{
/// <summary>
///
/// </summary>
2016-10-21 16:35:26 +08:00
public class NavigatorBarModel : HeaderBarModel
{
/// <summary>
///
/// </summary>
/// <param name="controller"></param>
2018-06-07 00:45:47 +08:00
public NavigatorBarModel(ControllerBase controller) : base(controller.User.Identity)
2016-10-21 16:35:26 +08:00
{
2018-10-19 23:09:52 +08:00
Navigations = MenuHelper.RetrieveSystemMenus(UserName, $"~{controller.HttpContext.Request.Path}");
Applications = DictHelper.RetrieveApps();
2016-10-21 16:35:26 +08:00
}
/// <summary>
///
/// </summary>
public IEnumerable<BootstrapMenu> Navigations { get; private set; }
/// <summary>
///
/// </summary>
public IEnumerable<KeyValuePair<string, string>> Applications { get; private set; }
2016-10-21 16:35:26 +08:00
}
2016-10-20 17:55:29 +08:00
}