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-11-08 20:37:14 +08:00
|
|
|
|
Navigations = MenuHelper.RetrieveNavigationsByUserName(UserName);
|
2016-11-05 23:15:07 +08:00
|
|
|
|
Navigations.ToList().ForEach(m => m.Active = m.Url.Equals(url, StringComparison.OrdinalIgnoreCase) ? "active" : "");
|
2016-11-03 19:52:35 +08:00
|
|
|
|
HomeUrl = "~/Admin/Index";
|
2016-10-21 16:35:26 +08:00
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
2016-11-05 23:15:07 +08:00
|
|
|
|
public IEnumerable<Menu> Navigations { get; set; }
|
2016-10-21 16:35:26 +08:00
|
|
|
|
}
|
2016-10-20 17:55:29 +08:00
|
|
|
|
}
|