Skip to content

Commit 868c0b5

Browse files
committed
Created Startup folder to collect startup and abp module classes.
1 parent 797fae8 commit 868c0b5

File tree

6 files changed

+40
-11
lines changed

6 files changed

+40
-11
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
using Abp.Application.Navigation;
2+
using Abp.Localization;
3+
4+
namespace AbpCompanyName.AbpProjectName.Web.Startup
5+
{
6+
/// <summary>
7+
/// This class defines menus for the application.
8+
/// It uses ABP's menu system.
9+
/// When you add menu items here, they are automatically appear in angular application.
10+
/// See Views/Layout/_TopMenu.cshtml file to know how to render menu.
11+
/// </summary>
12+
public class AbpProjectNameNavigationProvider : NavigationProvider
13+
{
14+
public override void SetNavigation(INavigationProviderContext context)
15+
{
16+
context.Manager.MainMenu
17+
.AddItem(
18+
new MenuItemDefinition(
19+
"Home",
20+
new LocalizableString("HomePage", AbpProjectNameConsts.LocalizationSourceName),
21+
url: "",
22+
icon: "fa fa-home"
23+
)
24+
).AddItem(
25+
new MenuItemDefinition(
26+
"About",
27+
new LocalizableString("About", AbpProjectNameConsts.LocalizationSourceName),
28+
url: "About",
29+
icon: "fa fa-info"
30+
)
31+
);
32+
}
33+
}
34+
}

src/AbpCompanyName.AbpProjectName.Web/AbpProjectNameWebModule.cs renamed to src/AbpCompanyName.AbpProjectName.Web/Startup/AbpProjectNameWebModule.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using Abp.Modules;
55
using AbpCompanyName.AbpProjectName.EntityFrameworkCore;
66

7-
namespace AbpCompanyName.AbpProjectName.Web
7+
namespace AbpCompanyName.AbpProjectName.Web.Startup
88
{
99
[DependsOn(
1010
typeof(AbpProjectNameApplicationModule),

src/AbpCompanyName.AbpProjectName.Web/Program.cs renamed to src/AbpCompanyName.AbpProjectName.Web/Startup/Program.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.IO;
4-
using System.Linq;
5-
using System.Threading.Tasks;
1+
using System.IO;
62
using Microsoft.AspNetCore.Hosting;
73

8-
namespace AbpCompanyName.AbpProjectName.Web
4+
namespace AbpCompanyName.AbpProjectName.Web.Startup
95
{
106
public class Program
117
{

src/AbpCompanyName.AbpProjectName.Web/Startup.cs renamed to src/AbpCompanyName.AbpProjectName.Web/Startup/Startup.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using Abp.AspNetCore;
3+
using Abp.AspNetCore.Mvc;
34
using AbpCompanyName.AbpProjectName.EntityFrameworkCore;
45
using Castle.Facilities.Logging;
56
using Microsoft.AspNetCore.Builder;
@@ -8,9 +9,8 @@
89
using Microsoft.Extensions.Configuration;
910
using Microsoft.Extensions.DependencyInjection;
1011
using Microsoft.Extensions.Logging;
11-
using Abp.AspNetCore.Mvc;
1212

13-
namespace AbpCompanyName.AbpProjectName.Web
13+
namespace AbpCompanyName.AbpProjectName.Web.Startup
1414
{
1515
public class Startup
1616
{

src/AbpCompanyName.AbpProjectName.Web/Views/Shared/_Layout.cshtml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@
7373
<script src="~/lib/sweetalert/dist/sweetalert-dev.js"></script>
7474
<script src="~/lib/spin.js/spin.js"></script>
7575
<script src="~/lib/spin.js/jquery.spin.js"></script>
76-
7776
<script src="~/lib/abp-web-resources/Abp/Framework/scripts/abp.js"></script>
7877
<script src="~/lib/abp-web-resources/Abp/Framework/scripts/libs/abp.jquery.js"></script>
7978
<script src="~/lib/abp-web-resources/Abp/Framework/scripts/libs/abp.toastr.js"></script>
@@ -103,7 +102,6 @@
103102
<script src="~/lib/sweetalert/dist/sweetalert.min.js"></script>
104103
<script src="~/lib/spin.js/spin.min.js"></script>
105104
<script src="~/lib/spin.js/jquery.spin.js"></script>
106-
107105
<script src="~/lib/abp-web-resources/Abp/Framework/scripts/abp.js"></script>
108106
<script src="~/lib/abp-web-resources/Abp/Framework/scripts/libs/abp.jquery.js"></script>
109107
<script src="~/lib/abp-web-resources/Abp/Framework/scripts/libs/abp.toastr.js"></script>

test/AbpCompanyName.AbpProjectName.Web.Tests/AbpProjectNameWebTestModule.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System.Reflection;
22
using Abp.AspNetCore.TestBase;
33
using Abp.Modules;
4+
using AbpCompanyName.AbpProjectName.Web.Startup;
45

56
namespace AbpCompanyName.AbpProjectName.Web.Tests
67
{

0 commit comments

Comments
 (0)