Cherry-pick: support import/export for doc type history cleanup policy (#11708)

* cherry-pick 13a51d32 (V8 History cleanup import/export)

Support import/export for doc type history cleanup policy (#11660)

* Support import/export for doc type history cleanup policy

* Support unset/null history cleanup value

* Resolve issue when api endpoints called without cleanup policy.
noop isn't good enough as map fails for response.

* null conditional vs null coalesce assignment

* Don't overwrite existing policy if omitted in import XML

* Update history cleanup warning and translations

* Change history cleanup alert to infomational styling

* Remove margin around history cleanup config

Co-authored-by: Ronald Barendse <ronald@barend.se>
# Conflicts:
#	src/Umbraco.Core/Models/IContentType.cs
#	src/Umbraco.Core/Packaging/PackageDataInstallation.cs
#	src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ContentTypeRepository.cs
#	src/Umbraco.Infrastructure/Services/Implement/EntityXmlSerializer.cs
#	src/Umbraco.Tests/Packaging/PackageDataInstallationTests.cs
#	src/Umbraco.Tests/Services/Importing/ImportResources.Designer.cs
#	src/Umbraco.Tests/Umbraco.Tests.csproj
#	src/Umbraco.Web.UI/umbraco/config/lang/en.xml
#	src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml
#	src/Umbraco.Web/Models/Mapping/ContentTypeMapDefinition.cs
#	tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/ImportResources.resx
#	tests/Umbraco.Tests.UnitTests/Umbraco.Core/Services/Importing/SingleDocType-WithCleanupPolicy.xml

* Remove namespace aliases

* Update IContentTypeWithHistoryCleanup documentation

Co-authored-by: Ronald Barendse <ronald@barend.se>
This commit is contained in:
Paul Johnson
2021-12-02 10:37:12 +00:00
committed by GitHub
parent 08f106a23f
commit fce97314bd
13 changed files with 321 additions and 69 deletions

View File

@@ -101,23 +101,19 @@
</div>
<div class="sub-view-column-right">
<umb-box-content>
<div class="umb-panel-group__details-status-text" ng-if="!model.historyCleanup.globalEnableCleanup">
<p class="umb-panel-group__details-status-action"><localize key="contentTypeEditor_historyCleanupGloballyDisabled"></localize></p>
</div>
<p ng-if="!model.historyCleanup.globalEnableCleanup" class="umb-alert umb-alert--info"><localize key="contentTypeEditor_historyCleanupGloballyDisabled"></localize></p>
<umb-control-group label="@contentTypeEditor_historyCleanupPreventCleanup">
<umb-toggle checked="model.historyCleanup.preventCleanup" on-click="vm.toggleHistoryCleanupPreventCleanup()"></umb-toggle>
</umb-control-group>
<umb-control-group label="@contentTypeEditor_historyCleanupPreventCleanup">
<umb-toggle checked="model.historyCleanup.preventCleanup" on-click="vm.toggleHistoryCleanupPreventCleanup()"></umb-toggle>
</umb-control-group>
<umb-control-group label="@contentTypeEditor_historyCleanupKeepAllVersionsNewerThanDays">
<input ng-readonly="model.historyCleanup.preventCleanup" placeholder="{{model.historyCleanup.globalKeepAllVersionsNewerThanDays}}" type="number" min="0" max="2147483647" ng-model="model.historyCleanup.keepAllVersionsNewerThanDays" />
</umb-control-group>
<umb-control-group label="@contentTypeEditor_historyCleanupKeepAllVersionsNewerThanDays">
<input ng-readonly="model.historyCleanup.preventCleanup" placeholder="{{model.historyCleanup.globalKeepAllVersionsNewerThanDays}}" type="number" min="0" max="2147483647" ng-model="model.historyCleanup.keepAllVersionsNewerThanDays" />
</umb-control-group>
<umb-control-group label="@contentTypeEditor_historyCleanupKeepLatestVersionPerDayForDays">
<input ng-readonly="model.historyCleanup.preventCleanup" placeholder="{{model.historyCleanup.globalKeepLatestVersionPerDayForDays}}" type="number" min="0" max="2147483647" ng-model="model.historyCleanup.keepLatestVersionPerDayForDays" />
</umb-control-group>
</umb-box-content>
<umb-control-group label="@contentTypeEditor_historyCleanupKeepLatestVersionPerDayForDays">
<input ng-readonly="model.historyCleanup.preventCleanup" placeholder="{{model.historyCleanup.globalKeepLatestVersionPerDayForDays}}" type="number" min="0" max="2147483647" ng-model="model.historyCleanup.keepLatestVersionPerDayForDays" />
</umb-control-group>
</div>
</div>