Browse Source
Merge pull request #7525 from abpframework/cotur/module-template
Update module template host projects
pull/7527/head
Yunus Emre Kalkan
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
19 additions and
9 deletions
-
templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/Pages/Index.cshtml
-
templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Pages/Index.cshtml
-
templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/Menus/MyProjectNameMenuContributor.cs
|
|
|
@ -6,6 +6,7 @@ |
|
|
|
@using Volo.Abp.Users |
|
|
|
@inject IHtmlLocalizer<MyProjectNameResource> L |
|
|
|
@inject ICurrentUser CurrentUser |
|
|
|
|
|
|
|
<abp-card> |
|
|
|
<abp-card-header>Welcome</abp-card-header> |
|
|
|
<abp-card-body> |
|
|
|
|
|
|
|
@ -7,11 +7,20 @@ |
|
|
|
@inject IStringLocalizer<AbpUiResource> Localizer |
|
|
|
@inject ICurrentUser CurrentUser |
|
|
|
|
|
|
|
@if (!CurrentUser.IsAuthenticated) |
|
|
|
{ |
|
|
|
<a href="~/Account/Login">@Localizer["Login"]</a> |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
<span>Welcome: @CurrentUser.UserName</span> |
|
|
|
} |
|
|
|
<abp-card> |
|
|
|
<abp-card-header>Welcome</abp-card-header> |
|
|
|
<abp-card-body> |
|
|
|
@if (!CurrentUser.IsAuthenticated) |
|
|
|
{ |
|
|
|
<a href="~/Account/Login">@Localizer["Login"]</a> |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
<span>Welcome: @CurrentUser.UserName</span> |
|
|
|
} |
|
|
|
<hr /> |
|
|
|
<p class="text-right"><a href="https://abp.io?ref=tmpl" target="_blank">abp.io</a></p> |
|
|
|
</abp-card-body> |
|
|
|
</abp-card> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -16,7 +16,7 @@ namespace MyCompanyName.MyProjectName.Blazor.Menus |
|
|
|
private Task ConfigureMainMenuAsync(MenuConfigurationContext context) |
|
|
|
{ |
|
|
|
//Add main menu items.
|
|
|
|
context.Menu.AddItem(new ApplicationMenuItem(MyProjectNameMenus.Prefix, displayName: "MyProjectName", "~/MyProjectName", icon: "fa fa-globe")); |
|
|
|
context.Menu.AddItem(new ApplicationMenuItem(MyProjectNameMenus.Prefix, displayName: "MyProjectName", "/MyProjectName", icon: "fa fa-globe")); |
|
|
|
|
|
|
|
return Task.CompletedTask; |
|
|
|
} |
|
|
|
|