Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New content transfer module #14630

Draft
wants to merge 25 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
04b1518
saving work
MikeAlhayek Oct 31, 2023
7a90e84
Add handlers, drivers, docs
MikeAlhayek Nov 4, 2023
80fbd9f
Merge remote-tracking branch 'origin/main' into ma/excel-imports
MikeAlhayek Nov 4, 2023
8f38efe
fix views
MikeAlhayek Nov 4, 2023
3916fa2
update the import form
MikeAlhayek Nov 4, 2023
d0edc28
Fix the export buttons
MikeAlhayek Nov 4, 2023
4b78553
Fix the exporting and templates
MikeAlhayek Nov 5, 2023
e2618ea
First round of cleanup
MikeAlhayek Nov 5, 2023
edb45a1
Add untested background task
MikeAlhayek Nov 5, 2023
e0436cf
Cleanup
MikeAlhayek Nov 6, 2023
1c1b18f
Update the background importer logic.
MikeAlhayek Nov 7, 2023
05cb738
Cleanup handlers and update background task
MikeAlhayek Nov 7, 2023
b1c62e2
Merge remote-tracking branch 'origin/main' into ma/excel-imports
MikeAlhayek Nov 21, 2023
36eca85
Add entries UI
MikeAlhayek Nov 22, 2023
32ba6c2
Merge remote-tracking branch 'origin/main' into ma/excel-imports
MikeAlhayek Nov 23, 2023
f5ed68d
cleanup js
MikeAlhayek Nov 25, 2023
2abf5d3
Merge remote-tracking branch 'origin/main' into ma/excel-imports
MikeAlhayek Dec 1, 2023
5419980
Update docs
MikeAlhayek Dec 1, 2023
0ac657b
add link to export
MikeAlhayek Dec 1, 2023
4dc0eea
Merge remote-tracking branch 'origin/main' into ma/excel-imports
MikeAlhayek Dec 10, 2023
b895ff6
Merge branch 'ma/excel-imports' of https://github.com/OrchardCMS/Orch…
MikeAlhayek Dec 10, 2023
5dcb538
Address warnings
MikeAlhayek Dec 10, 2023
de929d6
Update progress and run the background
MikeAlhayek Dec 10, 2023
3f97864
Improve the import process
MikeAlhayek Dec 11, 2023
e8d282a
Merge branch 'main' into ma/excel-imports
MikeAlhayek Feb 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions OrchardCore.sln
Original file line number Diff line number Diff line change
Expand Up @@ -507,13 +507,19 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.Sms", "src\Orch
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.Sms.Core", "src\OrchardCore\OrchardCore.Sms.Core\OrchardCore.Sms.Core.csproj", "{20356393-B16D-466C-8203-877A534E287D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OrchardCore.ContentsTransfer", "src\OrchardCore.Modules\OrchardCore.ContentsTransfer\OrchardCore.ContentsTransfer.csproj", "{188D4C60-8821-40DA-9498-4D492A56F062}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OrchardCore.ContentsTransfer.Core", "src\OrchardCore\OrchardCore.ContentsTransfer.Core\OrchardCore.ContentsTransfer.Core.csproj", "{0C7C15A8-6018-4F43-86A7-96D25D66E36D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OrchardCore.ContentsTransfer.Abstractions", "src\OrchardCore\OrchardCore.ContentsTransfer.Abstractions\OrchardCore.ContentsTransfer.Abstractions.csproj", "{EF72865D-FC5A-42B6-821B-A3983BE372EA}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.Search.AzureAI", "src\OrchardCore.Modules\OrchardCore.Search.AzureAI\OrchardCore.Search.AzureAI.csproj", "{5527BACF-FA5D-4617-978B-7EDE8942E6F6}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.Search.AzureAI.Core", "src\OrchardCore\OrchardCore.Search.AzureAI.Core\OrchardCore.Search.AzureAI.Core.csproj", "{E9428DE8-5D81-4359-BF84-31435041FF1A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OrchardCore.Media.Indexing.Pdf", "src\OrchardCore.Modules\OrchardCore.Media.Indexing.Pdf\OrchardCore.Media.Indexing.Pdf.csproj", "{95187E6A-5B74-4475-8FEB-758ACD012DCC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OrchardCore.Media.Indexing.OpenXML", "src\OrchardCore.Modules\OrchardCore.Media.Indexing.OpenXML\OrchardCore.Media.Indexing.OpenXML.csproj", "{47777735-7432-4CCA-A8C5-672E9EE65121}"

EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -1343,6 +1349,18 @@ Global
{20356393-B16D-466C-8203-877A534E287D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{20356393-B16D-466C-8203-877A534E287D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{20356393-B16D-466C-8203-877A534E287D}.Release|Any CPU.Build.0 = Release|Any CPU
{188D4C60-8821-40DA-9498-4D492A56F062}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{188D4C60-8821-40DA-9498-4D492A56F062}.Debug|Any CPU.Build.0 = Debug|Any CPU
{188D4C60-8821-40DA-9498-4D492A56F062}.Release|Any CPU.ActiveCfg = Release|Any CPU
{188D4C60-8821-40DA-9498-4D492A56F062}.Release|Any CPU.Build.0 = Release|Any CPU
{0C7C15A8-6018-4F43-86A7-96D25D66E36D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0C7C15A8-6018-4F43-86A7-96D25D66E36D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0C7C15A8-6018-4F43-86A7-96D25D66E36D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0C7C15A8-6018-4F43-86A7-96D25D66E36D}.Release|Any CPU.Build.0 = Release|Any CPU
{EF72865D-FC5A-42B6-821B-A3983BE372EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EF72865D-FC5A-42B6-821B-A3983BE372EA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EF72865D-FC5A-42B6-821B-A3983BE372EA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EF72865D-FC5A-42B6-821B-A3983BE372EA}.Release|Any CPU.Build.0 = Release|Any CPU
{5527BACF-FA5D-4617-978B-7EDE8942E6F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5527BACF-FA5D-4617-978B-7EDE8942E6F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5527BACF-FA5D-4617-978B-7EDE8942E6F6}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -1590,6 +1608,9 @@ Global
{2D93F509-1FB3-4E22-92F0-588D0EFBA921} = {F23AC6C2-DE44-4699-999D-3C478EF3D691}
{CBF6DB53-FD0C-47F8-9E60-A1D247ACFD05} = {A066395F-6F73-45DC-B5A6-B4E306110DCE}
{20356393-B16D-466C-8203-877A534E287D} = {F23AC6C2-DE44-4699-999D-3C478EF3D691}
{188D4C60-8821-40DA-9498-4D492A56F062} = {90030E85-0C4F-456F-B879-443E8A3F220D}
{0C7C15A8-6018-4F43-86A7-96D25D66E36D} = {F23AC6C2-DE44-4699-999D-3C478EF3D691}
{EF72865D-FC5A-42B6-821B-A3983BE372EA} = {F23AC6C2-DE44-4699-999D-3C478EF3D691}
{5527BACF-FA5D-4617-978B-7EDE8942E6F6} = {90030E85-0C4F-456F-B879-443E8A3F220D}
{E9428DE8-5D81-4359-BF84-31435041FF1A} = {F23AC6C2-DE44-4699-999D-3C478EF3D691}
{95187E6A-5B74-4475-8FEB-758ACD012DCC} = {90030E85-0C4F-456F-B879-443E8A3F220D}
Expand Down
1 change: 1 addition & 0 deletions src/OrchardCore.Build/Dependencies.props
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,6 @@
<PackageManagement Include="YesSql.Filters.Abstractions" Version="5.0.0-beta-0002" />
<PackageManagement Include="YesSql.Filters.Query" Version="5.0.0-beta-0002" />
<PackageManagement Include="ZString" Version="2.5.1" />
<PackageManagement Include="EPPlus" Version="7.0.0" />
</ItemGroup>
</Project>
62 changes: 62 additions & 0 deletions src/OrchardCore.Modules/OrchardCore.ContentsTransfer/AdminMenu.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
using System;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Localization;
using OrchardCore.ContentManagement.Metadata;
using OrchardCore.ContentsTransfer.Controllers;
using OrchardCore.Mvc.Core.Utilities;
using OrchardCore.Navigation;

namespace OrchardCore.ContentsTransfer;

public class AdminMenu : INavigationProvider
{
private readonly IContentDefinitionManager _contentDefinitionManager;
private readonly IAuthorizationService _authorizationService;
private readonly IHttpContextAccessor _httpContextAccessor;
protected readonly IStringLocalizer S;

public AdminMenu(
IContentDefinitionManager contentDefinitionManager,
IStringLocalizer<AdminMenu> stringLocalizer,
IAuthorizationService authorizationService,
IHttpContextAccessor httpContextAccessor
)
{
_contentDefinitionManager = contentDefinitionManager;
S = stringLocalizer;
_authorizationService = authorizationService;
_httpContextAccessor = httpContextAccessor;
}

public Task BuildNavigationAsync(string name, NavigationBuilder builder)
{
if (!string.Equals("admin", name, StringComparison.OrdinalIgnoreCase))
{
return Task.CompletedTask;
}

var adminControllerName = typeof(AdminController).ControllerName();

builder
.Add(S["Content"], content => content
.Add(S["Bulk Import"], S["Bulk Import"].PrefixPosition(), transfer => transfer
.Action(nameof(AdminController.List), adminControllerName, new
{
area = ContentTransferConstants.Feature.ModuleId
})
.Permission(ContentTransferPermissions.ListContentTransferEntries)
)
.Add(S["Bulk Export"], S["Bulk Export"].PrefixPosition(), transfer => transfer
.Action(nameof(AdminController.Export), adminControllerName, new
{
area = ContentTransferConstants.Feature.ModuleId
})
.Permission(ContentTransferPermissions.ExportContentFromFile)
)
);

return Task.CompletedTask;
}
}
Loading
Loading