Skip to content

Commit 775feba

Browse files
committed
MVC UI migration to AdminLTE 3
1 parent f3151bd commit 775feba

File tree

3,332 files changed

+201303
-546224
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,332 files changed

+201303
-546224
lines changed

aspnet-core/src/AbpCompanyName.AbpProjectName.Application/MultiTenancy/ITenantAppService.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using Abp.Application.Services;
2-
using Abp.Application.Services.Dto;
32
using AbpCompanyName.AbpProjectName.MultiTenancy.Dto;
43

54
namespace AbpCompanyName.AbpProjectName.MultiTenancy

aspnet-core/src/AbpCompanyName.AbpProjectName.Application/MultiTenancy/TenantAppService.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ protected override void MapToEntity(TenantDto updateInput, Tenant entity)
109109
public override async Task DeleteAsync(EntityDto<int> input)
110110
{
111111
CheckDeletePermission();
112+
var foo = DeletePermissionName;
112113

113114
var tenant = await _tenantManager.GetByIdAsync(input.Id);
114115
await _tenantManager.DeleteAsync(tenant);

aspnet-core/src/AbpCompanyName.AbpProjectName.Application/Users/UserAppService.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,6 @@ public async Task<bool> ResetPassword(ResetPasswordDto input)
222222

223223
return true;
224224
}
225-
226225
}
227226
}
228227

aspnet-core/src/AbpCompanyName.AbpProjectName.EntityFrameworkCore/EntityFrameworkCore/Seed/Host/DefaultLanguagesCreator.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@ private static List<ApplicationLanguage> GetInitialLanguages()
1717
var tenantId = AbpProjectNameConsts.MultiTenancyEnabled ? null : (int?)MultiTenancyConsts.DefaultTenantId;
1818
return new List<ApplicationLanguage>
1919
{
20-
new ApplicationLanguage(tenantId, "en", "English", "famfamfam-flags gb"),
21-
new ApplicationLanguage(tenantId, "ar", "العربية", "famfamfam-flags sa"),
22-
new ApplicationLanguage(tenantId, "de", "German", "famfamfam-flags de"),
23-
new ApplicationLanguage(tenantId, "it", "Italiano", "famfamfam-flags it"),
24-
new ApplicationLanguage(tenantId, "fr", "Français", "famfamfam-flags fr"),
25-
new ApplicationLanguage(tenantId, "pt-BR", "Português", "famfamfam-flags br"),
26-
new ApplicationLanguage(tenantId, "tr", "Türkçe", "famfamfam-flags tr"),
27-
new ApplicationLanguage(tenantId, "ru", "Русский", "famfamfam-flags ru"),
28-
new ApplicationLanguage(tenantId, "zh-Hans", "简体中文", "famfamfam-flags cn"),
29-
new ApplicationLanguage(tenantId, "es-MX", "Español México", "famfamfam-flags mx"),
30-
new ApplicationLanguage(tenantId, "nl", "Nederlands", "famfamfam-flags nl"),
31-
new ApplicationLanguage(tenantId, "ja", "日本語", "famfamfam-flags jp")
20+
new ApplicationLanguage(tenantId, "en", "English", "flag-icon flag-icon-us"),
21+
new ApplicationLanguage(tenantId, "ar", "العربية", "flag-icon flag-icon-sa"),
22+
new ApplicationLanguage(tenantId, "de", "German", "flag-icon flag-icon-de"),
23+
new ApplicationLanguage(tenantId, "it", "Italiano", "flag-icon flag-icon-it"),
24+
new ApplicationLanguage(tenantId, "fr", "Français", "flag-icon flag-icon-fr"),
25+
new ApplicationLanguage(tenantId, "pt-BR", "Português", "flag-icon flag-icon-br"),
26+
new ApplicationLanguage(tenantId, "tr", "Türkçe", "flag-icon flag-icon-tr"),
27+
new ApplicationLanguage(tenantId, "ru", "Русский", "flag-icon flag-icon-ru"),
28+
new ApplicationLanguage(tenantId, "zh-Hans", "简体中文", "flag-icon flag-icon-cn"),
29+
new ApplicationLanguage(tenantId, "es-MX", "Español México", "flag-icon flag-icon-mx"),
30+
new ApplicationLanguage(tenantId, "nl", "Nederlands", "flag-icon flag-icon-nl"),
31+
new ApplicationLanguage(tenantId, "ja", "日本語", "flag-icon flag-icon-jp")
3232
};
3333
}
3434

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/.bowerrc

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,32 @@
11
using Microsoft.AspNetCore.Mvc;
22
using Abp.AspNetCore.Mvc.Authorization;
33
using AbpCompanyName.AbpProjectName.Controllers;
4+
using AbpCompanyName.AbpProjectName.MultiTenancy;
5+
using AbpCompanyName.AbpProjectName.Roles;
6+
using AbpCompanyName.AbpProjectName.Users;
7+
using System.Threading.Tasks;
48

59
namespace AbpCompanyName.AbpProjectName.Web.Controllers
610
{
711
[AbpMvcAuthorize]
812
public class HomeController : AbpProjectNameControllerBase
913
{
10-
public ActionResult Index()
14+
private readonly ITenantAppService _tenantAppService;
15+
private readonly IUserAppService _userAppService;
16+
private readonly IRoleAppService _roleAppService;
17+
18+
public HomeController(ITenantAppService tenantAppService,
19+
IUserAppService userAppService,
20+
IRoleAppService roleAppService)
21+
{
22+
_tenantAppService = tenantAppService;
23+
_userAppService = userAppService;
24+
_roleAppService = roleAppService;
25+
}
26+
27+
public async Task<ActionResult> Index()
1128
{
1229
return View();
1330
}
14-
}
31+
}
1532
}

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/Controllers/RolesController.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
using AbpCompanyName.AbpProjectName.Authorization;
66
using AbpCompanyName.AbpProjectName.Controllers;
77
using AbpCompanyName.AbpProjectName.Roles;
8-
using AbpCompanyName.AbpProjectName.Roles.Dto;
98
using AbpCompanyName.AbpProjectName.Web.Models.Roles;
109

1110
namespace AbpCompanyName.AbpProjectName.Web.Controllers
@@ -22,23 +21,21 @@ public RolesController(IRoleAppService roleAppService)
2221

2322
public async Task<IActionResult> Index()
2423
{
25-
var roles = (await _roleAppService.GetRolesAsync(new GetRolesInput())).Items;
2624
var permissions = (await _roleAppService.GetAllPermissions()).Items;
2725
var model = new RoleListViewModel
2826
{
29-
Roles = roles,
3027
Permissions = permissions
3128
};
3229

3330
return View(model);
3431
}
3532

36-
public async Task<ActionResult> EditRoleModal(int roleId)
33+
public async Task<ActionResult> EditModal(int roleId)
3734
{
3835
var output = await _roleAppService.GetRoleForEdit(new EntityDto(roleId));
3936
var model = ObjectMapper.Map<EditRoleModalViewModel>(output);
4037

41-
return View("_EditRoleModal", model);
38+
return PartialView("_EditModal", model);
4239
}
4340
}
4441
}

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/Controllers/TenantsController.cs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
using AbpCompanyName.AbpProjectName.Authorization;
66
using AbpCompanyName.AbpProjectName.Controllers;
77
using AbpCompanyName.AbpProjectName.MultiTenancy;
8-
using AbpCompanyName.AbpProjectName.MultiTenancy.Dto;
98

109
namespace AbpCompanyName.AbpProjectName.Web.Controllers
1110
{
@@ -19,16 +18,12 @@ public TenantsController(ITenantAppService tenantAppService)
1918
_tenantAppService = tenantAppService;
2019
}
2120

22-
public async Task<ActionResult> Index()
23-
{
24-
var output = await _tenantAppService.GetAllAsync(new PagedTenantResultRequestDto { MaxResultCount = int.MaxValue }); // Paging not implemented yet
25-
return View(output);
26-
}
21+
public ActionResult Index() => View();
2722

28-
public async Task<ActionResult> EditTenantModal(int tenantId)
23+
public async Task<ActionResult> EditModal(int tenantId)
2924
{
3025
var tenantDto = await _tenantAppService.GetAsync(new EntityDto(tenantId));
31-
return View("_EditTenantModal", tenantDto);
26+
return PartialView("_EditModal", tenantDto);
3227
}
3328
}
3429
}

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/Controllers/UsersController.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
using AbpCompanyName.AbpProjectName.Controllers;
77
using AbpCompanyName.AbpProjectName.Users;
88
using AbpCompanyName.AbpProjectName.Web.Models.Users;
9-
using AbpCompanyName.AbpProjectName.Users.Dto;
109

1110
namespace AbpCompanyName.AbpProjectName.Web.Controllers
1211
{
@@ -22,17 +21,15 @@ public UsersController(IUserAppService userAppService)
2221

2322
public async Task<ActionResult> Index()
2423
{
25-
var users = (await _userAppService.GetAllAsync(new PagedUserResultRequestDto {MaxResultCount = int.MaxValue})).Items; // Paging not implemented yet
2624
var roles = (await _userAppService.GetRoles()).Items;
2725
var model = new UserListViewModel
2826
{
29-
Users = users,
3027
Roles = roles
3128
};
3229
return View(model);
3330
}
3431

35-
public async Task<ActionResult> EditUserModal(long userId)
32+
public async Task<ActionResult> EditModal(long userId)
3633
{
3734
var user = await _userAppService.GetAsync(new EntityDto<long>(userId));
3835
var roles = (await _userAppService.GetRoles()).Items;
@@ -41,7 +38,7 @@ public async Task<ActionResult> EditUserModal(long userId)
4138
User = user,
4239
Roles = roles
4340
};
44-
return View("_EditUserModal", model);
41+
return PartialView("_EditModal", model);
4542
}
4643
}
4744
}

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/Models/Roles/RoleListViewModel.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ namespace AbpCompanyName.AbpProjectName.Web.Models.Roles
55
{
66
public class RoleListViewModel
77
{
8-
public IReadOnlyList<RoleListDto> Roles { get; set; }
9-
108
public IReadOnlyList<PermissionDto> Permissions { get; set; }
119
}
1210
}

0 commit comments

Comments
 (0)