Updated ContentItemDisplay model to contain IsEdited property

This commit is contained in:
Robert
2018-04-30 16:06:53 +02:00
parent c435597d7e
commit a7f9628b48
2 changed files with 5 additions and 1 deletions

View File

@@ -23,7 +23,7 @@ namespace Umbraco.Web.Models.ContentEditing
/// </summary>
[DataMember(Name = "name")]
public string Name { get; set; }
[DataMember(Name = "state")]
public string PublishedState { get; set; }
@@ -33,6 +33,9 @@ namespace Umbraco.Web.Models.ContentEditing
[DataMember(Name = "exists")]
public bool Exists { get; set; }
[DataMember(Name = "isEdited")]
public bool IsEdited { get; set; }
/// <summary>
/// Determines if this is the variant currently being edited
/// </summary>

View File

@@ -36,6 +36,7 @@ namespace Umbraco.Web.Models.Mapping
Name = source.GetName(x.IsoCode),
Exists = source.IsCultureAvailable(x.IsoCode), // segments ??
PublishedState = source.PublishedState.ToString(),
IsEdited = source.IsCultureEdited(x.IsoCode)
//Segment = ?? We'll need to populate this one day when we support segments
}).ToList();