2016-10-21 16:35:26 +08:00
|
|
|
|
using Bootstrap.DataAccess;
|
2016-11-03 19:52:35 +08:00
|
|
|
|
using System;
|
2016-10-21 16:35:26 +08:00
|
|
|
|
using System.Collections.Generic;
|
2016-10-26 14:02:40 +08:00
|
|
|
|
using System.Linq;
|
2016-10-21 16:35:26 +08:00
|
|
|
|
|
|
|
|
|
namespace Bootstrap.Admin.Models
|
|
|
|
|
{
|
|
|
|
|
public class NavigatorBarModel : HeaderBarModel
|
|
|
|
|
{
|
2016-11-03 19:52:35 +08:00
|
|
|
|
public NavigatorBarModel(string url)
|
2016-10-21 16:35:26 +08:00
|
|
|
|
{
|
2016-10-26 14:02:40 +08:00
|
|
|
|
Menus = MenuHelper.RetrieveMenus().ToList();
|
2016-11-03 19:52:35 +08:00
|
|
|
|
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
|
|
|
|
}
|