Skip to content

Commit

Permalink
Merge branch 'main' into sebros/net90
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienros authored Nov 21, 2024
2 parents b186467 + 5fa3850 commit d96749e
Show file tree
Hide file tree
Showing 159 changed files with 60,170 additions and 14,386 deletions.
18 changes: 18 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -3231,6 +3231,24 @@
"contributions": [
"code"
]
},
{
"login": "kursataktas",
"name": "Kursat Aktas",
"avatar_url": "https://avatars.githubusercontent.com/u/17837825?v=4",
"profile": "https://github.com/kursataktas",
"contributions": [
"doc"
]
},
{
"login": "adamradocz",
"name": "Adam Radocz",
"avatar_url": "https://avatars.githubusercontent.com/u/16503773?v=4",
"profile": "https://github.com/adamradocz",
"contributions": [
"code"
]
}
],
"skipCi": true,
Expand Down
8 changes: 4 additions & 4 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<PackageVersion Include="BenchmarkDotNet" Version="0.14.0" />
<PackageVersion Include="Castle.Core" Version="5.1.1" />
<PackageVersion Include="DocumentFormat.OpenXml" Version="3.1.0" />
<PackageVersion Include="Fluid.Core" Version="2.11.1" />
<PackageVersion Include="Fluid.Core" Version="2.12.0" />
<PackageVersion Include="GraphQL" Version="7.9.0" />
<PackageVersion Include="GraphQL.DataLoader" Version="7.9.0" />
<PackageVersion Include="GraphQL.MicrosoftDI" Version="7.9.0" />
Expand Down Expand Up @@ -64,7 +64,7 @@
<PackageVersion Include="OpenIddict.Validation.AspNetCore" Version="5.8.0" />
<PackageVersion Include="OpenIddict.Validation.DataProtection" Version="5.8.0" />
<PackageVersion Include="OpenIddict.Validation.SystemNetHttp" Version="5.8.0" />
<PackageVersion Include="OrchardCore.Translations.All" Version="2.0.0" />
<PackageVersion Include="OrchardCore.Translations.All" Version="2.1.0" />
<PackageVersion Include="PdfPig" Version="0.1.8" />
<PackageVersion Include="Serilog.AspNetCore" Version="8.0.2" />
<PackageVersion Include="Shortcodes" Version="1.3.4" />
Expand All @@ -84,15 +84,15 @@
<PackageVersion Include="YesSql.Filters.Abstractions" Version="5.1.1" />
<PackageVersion Include="YesSql.Filters.Query" Version="5.1.1" />
<PackageVersion Include="ZString" Version="2.6.0" />

<!-- dotnet/extensions -->
<PackageVersion Include="Microsoft.Extensions.Http.Resilience" Version="8.10.0" />
</ItemGroup>
<ItemGroup>
<GlobalPackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
<GlobalPackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeStyle" Version="4.11.0" />
</ItemGroup>

<!-- These versions are used for tansitive dependency forced upgrades only. E.g. when a package references a vulnerable version. -->
<!-- To list all vulnerable direct references run 'dotnet list package -vulnerable' (use double dash, just XML comments can't contain it) -->
<!-- To list all vulnerable transitive references run 'dotnet list package -vulnerable -include-transitive' (use double dash, just XML comments can't contain it) -->
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ Orchard Core consists of two distinct projects:

[![BSD-3-Clause License](https://img.shields.io/badge/license-BSD--3--Clause-blue.svg)](LICENSE)
[![Documentation](https://readthedocs.org/projects/orchardcore/badge/)](https://docs.orchardcore.net/)
[![Gurubase](https://img.shields.io/badge/Gurubase-Ask%20Orchard%20Core%20Guru-006BFF)](https://gurubase.io/g/orchard-core)
[![Crowdin](https://badges.crowdin.net/orchard-core/localized.svg)](https://crowdin.com/project/orchard-core)
[![Discord](https://img.shields.io/discord/551136772243980291?color=%237289DA&label=OrchardCore&logo=discord&logoColor=white&style=flat-square)](https://orchardcore.net/discord)

## Build Status

Stable (`release/2.0`):
Stable (`release/2.1`):

[![Build status](https://github.com/OrchardCMS/OrchardCore/actions/workflows/release_ci.yml/badge.svg)](https://github.com/OrchardCMS/OrchardCore/actions?query=workflow%3A%22Release+-+CI%22)
[![NuGet](https://img.shields.io/nuget/v/OrchardCore.Application.Cms.Targets.svg)](https://www.nuget.org/packages/OrchardCore.Application.Cms.Targets)
Expand All @@ -24,7 +25,7 @@ Nightly (`main`):
[![Build status](https://github.com/OrchardCMS/OrchardCore/actions/workflows/preview_ci.yml/badge.svg)](https://github.com/OrchardCMS/OrchardCore/actions?query=workflow%3A%22Preview+-+CI%22)
[![Cloudsmith](https://api-prd.cloudsmith.io/badges/version/orchardcore/preview/nuget/OrchardCore.Application.Cms.Targets/latest/x/?render=true&badge_token=gAAAAABey9hKFD_C-ZIpLvayS3HDsIjIorQluDs53KjIdlxoDz6Ntt1TzvMNJp7a_UWvQbsfN5nS7_0IbxCyqHZsjhmZP6cBkKforo-NqwrH5-E6QCrJ3D8%3D)](https://cloudsmith.io/~orchardcore/repos/preview/packages/detail/nuget/OrchardCore.Application.Cms.Targets/latest/)

## Project Status: v2.0.2
## Project Status: v2.1.0

The software is production-ready, and capable of serving large mission-critical applications as well, and we're not aware of any fundamental bugs or missing features we deem crucial. Orchard Core continues to evolve, with each version bringing new improvements, and keeping up with the cutting-edge of .NET.

Expand Down
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ validation:
# Add files here that are intentionally not in the navigation and thus omitted_files shouldn't warn about them.
not_in_nav: |
samples/
releases/2.1.0.md
# Extensions
markdown_extensions:
Expand Down Expand Up @@ -274,6 +273,7 @@ nav:
- Owners: resources/owners/README.md
- Workshops: resources/workshops/README.md
- Releases:
- 2.1.0: releases/2.1.0.md
- 2.0.2: releases/2.0.2.md
- 2.0.1: releases/2.0.1.md
- 2.0.0: releases/2.0.0.md
Expand Down
2 changes: 1 addition & 1 deletion src/OrchardCore.Build/OrchardCore.Commons.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<LangVersion>12.0</LangVersion>
<VersionPrefix>2.1.0</VersionPrefix>
<VersionPrefix>3.0.0</VersionPrefix>
<VersionSuffix>preview</VersionSuffix>
<VersionSuffix Condition="'$(VersionSuffix)'!='' AND '$(BuildNumber)' != ''">$(VersionSuffix)-$(BuildNumber)</VersionSuffix>
<WarningsNotAsErrors>612,618</WarningsNotAsErrors>
Expand Down
6 changes: 5 additions & 1 deletion src/OrchardCore.Cms.Web/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,11 @@
//},
// By default background tasks are waiting for their shell to be lazily built on a first matching request.
//"OrchardCore_BackgroundService": {
// "ShellWarmup": true // Allows to eagerly build shell containers just before executing their first background task.
// "ShellWarmup": true,
// // The polling time for the background tasks, i.e. how much to wait between executing all the background tasks of a given tenant.
// "PollingTime": "00:01:00",
// // The minimum idle time before the background tasks of a tenant are triggered, as well as between tasks similar to PollingTime.
// "MinimumIdleTime": "00:00:10"
//},
// Add 'AddOrchardCoreAzureKeyVault()' to the Generic Host in 'CreateHostBuilder() section'.
//"OrchardCore_KeyVault_Azure": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
@*
For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860
*@

@inherits OrchardCore.DisplayManagement.Razor.RazorPage<TModel>
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@addTagHelper *, OrchardCore.DisplayManagement
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
@*
For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860
*@

@inherits OrchardCore.DisplayManagement.Razor.RazorPage<TModel>
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@addTagHelper *, OrchardCore.Contents.TagHelpers
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
@*
For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860
*@

@inherits OrchardCore.DisplayManagement.Razor.RazorPage<TModel>
@using OrchardCore.ContentFields.Settings
@using OrchardCore.ContentLocalization
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
@*
For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860
*@
@using Microsoft.AspNetCore.Authorization

@inherits OrchardCore.DisplayManagement.Razor.RazorPage<TModel>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,15 @@
{
<a asp-route-action="EditField" asp-route-id="@Model.TypeDefinition.Name" asp-route-name="@fieldDefinition.Name" asp-route-returnUrl="@FullRequestPath" class="btn btn-primary btn-sm" role="button">@T["Edit"]</a>
}
@if (!settings.IsSystemDefined)
@if (settings.IsSystemDefined)
{
<div class="d-inline" data-bs-toggle="tooltip" data-bs-title="@T["System-defined fields are integral components of the system and cannot be removed."]">
<button type="button" class="btn btn-danger btn-sm" disabled>
@T["Remove"]
</button>
</div>
}
else
{
<a asp-route-action="RemoveFieldFrom" asp-route-id="@Model.TypeDefinition.Name" asp-route-name="@fieldDefinition.Name" class="btn btn-danger btn-sm" role="button" data-url-af="UnsafeUrl RemoveUrl">@T["Remove"]</a>
}
Expand Down Expand Up @@ -137,6 +145,14 @@
<div class="float-end">
<a asp-route-action="EditTypePart" asp-route-id="@Model.TypeDefinition.Name" asp-route-name="@partDefinition.Name" class="btn btn-primary btn-sm" role="button">@T["Edit"]</a>
@if (settings.IsSystemDefined)
{
<div class="d-inline" data-bs-toggle="tooltip" data-bs-title="@T["System-defined parts are integral components of the system and cannot be removed."]">
<button type="button" class="btn btn-danger btn-sm" disabled>
@T["Remove"]
</button>
</div>
}
else
{
<a asp-route-action="RemovePart" asp-route-id="@Model.TypeDefinition.Name" asp-route-name="@partDefinition.Name" class="btn btn-danger btn-sm" role="button" data-url-af="UnsafeUrl RemoveUrl">@T["Remove"]</a>
}
Expand Down Expand Up @@ -170,7 +186,15 @@
<div class="mb-3">
<button class="btn btn-primary save" type="submit" name="submit.Save" value="Save">@T["Save"]</button>

@if (!contentSettings.IsSystemDefined)
@if (contentSettings.IsSystemDefined)
{
<div class="d-inline" data-bs-toggle="tooltip" data-bs-title="@T["System-defined types are integral components of the system and cannot be removed."]">
<button type="button" class="btn btn-danger" disabled>
@T["Remove"]
</button>
</div>
}
else
{
<button class="btn btn-danger delete" type="submit" name="submit.Delete" value="Delete" data-url-af="RemoveUrl">@T["Delete"]</button>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,27 @@
<ul class="list-group sortable" id="fields" style="cursor: move;">
@foreach (var field in orderedFields)
{
var settings = field.GetSettings<ContentSettings>();

<li class="list-group-item">
<div class="w-100">
<div class="float-end">
@if (fields.Any(x => x.Name.Equals(field.FieldDefinition.Name, StringComparison.OrdinalIgnoreCase)))
{
<a asp-route-action="EditField" asp-route-id="@Model.PartDefinition.Name" asp-route-name="@field.Name" asp-route-returnUrl="@FullRequestPath" class="btn btn-primary btn-sm" role="button">@T["Edit"]</a>
}
<a asp-route-action="RemoveFieldFrom" asp-route-id="@Model.PartDefinition.Name" asp-route-name="@field.Name" class="btn btn-danger btn-sm" role="button" data-url-af="UnsafeUrl RemoveUrl">@T["Remove"]</a>
@if (settings.IsSystemDefined)
{
<div class="d-inline" data-bs-toggle="tooltip" data-bs-title="@T["System-defined fields are integral components of the system and cannot be removed."]">
<button type="button" class="btn btn-danger btn-sm" disabled>
@T["Remove"]
</button>
</div>
}
else
{
<a asp-route-action="RemoveFieldFrom" asp-route-id="@Model.PartDefinition.Name" asp-route-name="@field.Name" class="btn btn-danger btn-sm" role="button" data-url-af="UnsafeUrl RemoveUrl">@T["Remove"]</a>
}
</div>
@field.DisplayName() <span class="hint dashed">@field.FieldDefinition.Name.CamelFriendly()</span>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
@*
For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860
*@

@inherits OrchardCore.DisplayManagement.Razor.RazorPage<TModel>
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@addTagHelper *, OrchardCore.DisplayManagement
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,12 @@ public SelectContentTypesViewComponent(IContentDefinitionManager contentDefiniti

public async Task<IViewComponentResult> InvokeAsync(IEnumerable<string> selectedContentTypes, string htmlName, string stereotype)
{
selectedContentTypes ??= Array.Empty<string>();

var contentTypes = await ContentTypeSelection.BuildAsync(_contentDefinitionManager, selectedContentTypes);
var contentTypes = await ContentTypeSelection.BuildAsync(_contentDefinitionManager, selectedContentTypes ?? []);

if (!string.IsNullOrEmpty(stereotype))
{
contentTypes = contentTypes
.Where(x => x.ContentTypeDefinition.GetStereotype() == stereotype)
.Where(x => x.ContentTypeDefinition.StereotypeEquals(stereotype))
.ToArray();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
@*
For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860
*@
@using Microsoft.AspNetCore.Authorization
@using Microsoft.AspNetCore.Routing
@using Microsoft.AspNetCore.Mvc.Localization
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public override async Task<ActivityExecutionResult> ExecuteAsync(WorkflowExecuti
var content = (await GetContentAsync(workflowContext))
?? throw new InvalidOperationException($"The '{nameof(PublishContentTask)}' failed to retrieve the content item.");

if (string.Equals(InlineEvent.ContentItemId, content.ContentItem.ContentItemId, StringComparison.OrdinalIgnoreCase))
if (!content.HasDraft())
{
return Outcomes("Noop");
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
@*
For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860
*@

@inherits OrchardCore.DisplayManagement.Razor.RazorPage<TModel>
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@addTagHelper *, OrchardCore.DisplayManagement
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
@*
For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860
*@

@inherits OrchardCore.DisplayManagement.Razor.RazorPage<TModel>
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
Expand Down
5 changes: 5 additions & 0 deletions src/OrchardCore.Modules/OrchardCore.Liquid/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ public override void ConfigureServices(IServiceCollection services)
// When a property of a 'JsonObject' value is accessed, try to look into its properties.
options.MemberAccessStrategy.Register<JsonObject, object>((source, name) => source[name]);
// When a property of a 'JsonDynamicObject' value is accessed, try to look into its properties.
options.MemberAccessStrategy.Register<JsonDynamicObject, object>((json, name) => json[name]);
// Convert JToken to FluidValue
options.ValueConverters.Add(x =>
{
Expand All @@ -57,8 +60,10 @@ public override void ConfigureServices(IServiceCollection services)
JsonObject o => new ObjectValue(o),
JsonDynamicObject o => new ObjectValue((JsonObject)o),
JsonValue o => o.GetObjectValue(),
JsonDynamicValue o => ((JsonValue)(o.Node)).GetObjectValue(),
DateTime d => new ObjectValue(d),
_ => null
};
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
@*
For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860
*@

@inherits OrchardCore.DisplayManagement.Razor.RazorPage<TModel>
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@
var friendlyName = certificate.FriendlyName;
if (string.IsNullOrWhiteSpace(friendlyName) && !string.IsNullOrWhiteSpace(certificate.ThumbPrint))
{
friendlyName = T["No Friendly Name"].Value; ;
friendlyName = T["No Friendly Name"].Value;
}
<option value="@certificate.ThumbPrint" data-StoreLocation="@certificate.StoreLocation" data-StoreName="@certificate.StoreName" selected="@(selectedCertificate)">
@friendlyName [@certificate.NotBefore.ToString("dd/MM/yy") - @certificate.NotAfter.ToString("dd/MM/yy")] @certificate.Subject
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
@*
For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860
*@

@inherits OrchardCore.DisplayManagement.Razor.RazorPage<TModel>
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
Expand Down
Loading

0 comments on commit d96749e

Please sign in to comment.