mirror of https://github.com/abpframework/abp.git
8 changed files with 36 additions and 33 deletions
@ -0,0 +1 @@ |
|||
<h2>Home</h2> |
|||
@ -1,24 +0,0 @@ |
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Volo.Abp.Ui.Navigation; |
|||
|
|||
namespace AbpDesk.Web.Mvc.Views.Shared.Components.HorizontalMenu |
|||
{ |
|||
public class HorizontalMenuViewComponent : ViewComponent |
|||
{ |
|||
private readonly IMenuManager _menuManager; |
|||
|
|||
public HorizontalMenuViewComponent(IMenuManager menuManager) |
|||
{ |
|||
//TODO: Create a INavigationAppService that can also be used remotely, instead of directly using IMenuManager!
|
|||
|
|||
_menuManager = menuManager; |
|||
} |
|||
|
|||
public async Task<IViewComponentResult> InvokeAsync(string menuName = StandardMenus.Main) |
|||
{ |
|||
var menu = await _menuManager.GetAsync(StandardMenus.Main); |
|||
return View(menu); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,22 @@ |
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Volo.Abp.Ui.Navigation; |
|||
|
|||
namespace AbpDesk.Web.Mvc.Views.Shared.Components.Menu |
|||
{ |
|||
public class MenuViewComponent : ViewComponent |
|||
{ |
|||
private readonly IMenuManager _menuManager; |
|||
|
|||
public MenuViewComponent(IMenuManager menuManager) |
|||
{ |
|||
_menuManager = menuManager; |
|||
} |
|||
|
|||
public async Task<IViewComponentResult> InvokeAsync(string menuName = StandardMenus.Main, string viewName = "Default") |
|||
{ |
|||
var menu = await _menuManager.GetAsync(StandardMenus.Main); |
|||
return View(viewName, menu); |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue