BootstrapAdmin11/Bootstrap.Client/Models/NavigatorBarModel.cs

33 lines
980 B
C#
Raw Normal View History

2018-10-19 23:09:52 +08:00
using Bootstrap.Client.DataAccess;
using Bootstrap.Security;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
namespace Bootstrap.Client.Models
{
/// <summary>
///
/// </summary>
public class NavigatorBarModel : HeaderBarModel
{
/// <summary>
///
/// </summary>
/// <param name="controller"></param>
public NavigatorBarModel(ControllerBase controller) : base(controller.User.Identity)
{
2018-10-19 23:09:52 +08:00
Navigations = MenuHelper.RetrieveAppMenus(UserName, $"~/{controller.ControllerContext.ActionDescriptor.ControllerName}/{controller.ControllerContext.ActionDescriptor.ActionName}");
ImageLibUrl = DictHelper.RetrieveImagesLibUrl();
}
/// <summary>
///
/// </summary>
2018-10-19 23:09:52 +08:00
public IEnumerable<BootstrapMenu> Navigations { get; }
/// <summary>
///
/// </summary>
public string ImageLibUrl { get; set; }
}
}