-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* ContentVersion cleanup backoffice UI (#11637) * init rollback ui prototype * add busy state to button, deselect version, add pagination status * add localisation * style current version * disable rollback button when nothing is selected * stop click event * Endpoints for paginated content versions. Light on tests, tight on time. * Endpoints to "pin" content versions * camel case json output. Not sure why json formatter not set for controller, bit risky to add it now * wire up paging * wire up pin/unpin * rename getPagedRollbackVersions to getPagedContentVersions * prevent selection of current version and current draft * add current draft and current version to UI * remove pointer if the row is not selectable * Improve warning for globally disabled cleanup feature. * Fix current loses prevent cleanup state on publish. * Added umbracoLog audit entries for "pin" / "unpin" * Match v9 defaults for keepVersions settings * Fix - losing preventCleanup on save current with content changes * update pin/unpin button labels * fix pagination bug * add missing " * always send culture when a doc type can vary Co-authored-by: Mads Rasmussen <[email protected]> # Conflicts: # src/Umbraco.Core/ContentEditing/ContentVersionMetaViewModel.cs # src/Umbraco.Core/Models/HistoricContentVersionMeta.cs # src/Umbraco.Infrastructure/Services/Implement/ContentService.cs # src/Umbraco.Tests/Persistence/Repositories/DocumentVersionRepository_Tests_Integration.cs # src/Umbraco.Tests/Services/ContentVersionCleanupService_Tests_UnitTests.cs # src/Umbraco.Web.BackOffice/Controllers/ContentController.cs # src/Umbraco.Web.UI.Client/src/common/resources/content.resource.js # src/Umbraco.Web.UI/config/umbracoSettings.Release.config # src/Umbraco.Web.UI/umbraco/config/lang/en.xml # src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml # src/Umbraco.Web/Umbraco.Web.csproj * Added tests * Misc - missed translation update * Bugfix - DocumentVersionRepository.Get should not join culture variation * Bugfix - Missing write lock * Removed unnecessary view model * Misc - kill some warnings * Misc - Kill some more warnings * Fixed cypress rollback test * Bugfix - Policy returns items to delete not items to keep. Switch to inverse behavior. # Conflicts: # src/Umbraco.Tests/Services/DefaultContentVersionCleanupPolicy_Tests_UnitTests.cs Co-authored-by: Paul Johnson <[email protected]>
- Loading branch information
Showing
26 changed files
with
906 additions
and
220 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
using System; | ||
|
||
namespace Umbraco.Cms.Core.Models | ||
{ | ||
public class ContentVersionMeta | ||
{ | ||
public int ContentId { get; } | ||
public int ContentTypeId { get; } | ||
public int VersionId { get; } | ||
public int UserId { get; } | ||
|
||
public DateTime VersionDate { get; } | ||
public bool CurrentPublishedVersion { get; } | ||
public bool CurrentDraftVersion { get; } | ||
public bool PreventCleanup { get; } | ||
public string Username { get; } | ||
|
||
public ContentVersionMeta() { } | ||
|
||
public ContentVersionMeta( | ||
int versionId, | ||
int contentId, | ||
int contentTypeId, | ||
int userId, | ||
DateTime versionDate, | ||
bool currentPublishedVersion, | ||
bool currentDraftVersion, | ||
bool preventCleanup, | ||
string username) | ||
{ | ||
VersionId = versionId; | ||
ContentId = contentId; | ||
ContentTypeId = contentTypeId; | ||
|
||
UserId = userId; | ||
VersionDate = versionDate; | ||
CurrentPublishedVersion = currentPublishedVersion; | ||
CurrentDraftVersion = currentDraftVersion; | ||
PreventCleanup = preventCleanup; | ||
Username = username; | ||
} | ||
|
||
public override string ToString() => $"ContentVersionMeta(versionId: {VersionId}, versionDate: {VersionDate:s}"; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.