BootstrapAdmin/Bootstrap.Admin/Models/NavigatorBarModel.cs

22 lines
630 B
C#
Raw Normal View History

2016-10-21 16:35:26 +08:00
using Bootstrap.DataAccess;
using System;
2016-10-21 16:35:26 +08:00
using System.Collections.Generic;
using System.Linq;
2016-10-21 16:35:26 +08:00
namespace Bootstrap.Admin.Models
{
public class NavigatorBarModel : HeaderBarModel
{
public NavigatorBarModel(string url)
2016-10-21 16:35:26 +08:00
{
Menus = MenuHelper.RetrieveMenus().ToList();
Menus.ForEach(m => m.Active = m.Url.Equals(url, StringComparison.OrdinalIgnoreCase) ? "active" : "");
HomeUrl = "~/Admin/Index";
ShowMenu = "hide";
2016-10-21 16:35:26 +08:00
}
/// <summary>
///
/// </summary>
public List<Menu> Menus { get; set; }
}
2016-10-20 17:55:29 +08:00
}