mirror of https://github.com/abpframework/abp.git
committed by
GitHub
19 changed files with 59 additions and 23 deletions
@ -0,0 +1,19 @@ |
|||
using System; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Pages.Shared.Components.AbpApplicationPath |
|||
{ |
|||
public class AbpApplicationPathViewComponent : AbpViewComponent |
|||
{ |
|||
public IViewComponentResult Invoke() |
|||
{ |
|||
var applicationPath = ViewContext.HttpContext.Request.PathBase.Value; |
|||
var model = new AbpApplicationPathViewComponentModel |
|||
{ |
|||
ApplicationPath = applicationPath == null ? "/" : applicationPath.EnsureEndsWith('/') |
|||
}; |
|||
|
|||
return View("~/Pages/Shared/Components/AbpApplicationPath/Default.cshtml",model); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Pages.Shared.Components.AbpApplicationPath |
|||
{ |
|||
public class AbpApplicationPathViewComponentModel |
|||
{ |
|||
public string ApplicationPath { get; set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,4 @@ |
|||
@model Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Pages.Shared.Components.AbpApplicationPath.AbpApplicationPathViewComponentModel |
|||
<script type="text/javascript"> |
|||
var abp = abp || {}; abp.appPath = '@Model.ApplicationPath'; |
|||
</script> |
|||
@ -1,4 +1,4 @@ |
|||
@using Localization.Resources.AbpUi |
|||
@using Microsoft.AspNetCore.Mvc.Localization |
|||
@inject IHtmlLocalizer<AbpUiResource> L |
|||
<a href="/Account/Login">@L["Login"]</a> |
|||
<a href="~/Account/Login">@L["Login"]</a> |
|||
|
|||
Loading…
Reference in new issue