Merge branch temp8 into temp8-11502
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
namespace Umbraco.Web.Models.ContentEditing
|
||||
{
|
||||
/// <summary>
|
||||
/// The model representing Previewing of a content item from the back office
|
||||
/// </summary>
|
||||
public class BackOfficePreview
|
||||
{
|
||||
public string PreviewExtendedHeaderView { get; set; }
|
||||
|
||||
//TODO: We could potentially have a 'footer' view
|
||||
public bool DisableDevicePreview { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace Umbraco.Web.Models.ContentEditing
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines a "Content App" which are editor extensions
|
||||
/// </summary>
|
||||
[DataContract(Name = "app", Namespace = "")]
|
||||
public class ContentApp
|
||||
{
|
||||
[DataMember(Name = "name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[DataMember(Name = "alias")]
|
||||
public string Alias { get; set; }
|
||||
|
||||
[DataMember(Name = "icon")]
|
||||
public string Icon { get; set; }
|
||||
|
||||
[DataMember(Name = "view")]
|
||||
public string View { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The view model specific to this app
|
||||
/// </summary>
|
||||
[DataMember(Name = "viewModel")]
|
||||
public object ViewModel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Normally reserved for Angular to deal with but in some cases this can be set on the server side
|
||||
/// </summary>
|
||||
[DataMember(Name = "active")]
|
||||
public bool Active { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Umbraco.Web.Models.ContentEditing
|
||||
{
|
||||
public class ContentDomainsAndCulture
|
||||
{
|
||||
public IEnumerable<DomainDisplay> Domains { get; set; }
|
||||
|
||||
public string Language { get; internal set; }
|
||||
}
|
||||
}
|
||||
@@ -4,9 +4,7 @@ using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.Validation;
|
||||
using Umbraco.Web.WebApi;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
namespace Umbraco.Web.Models.ContentEditing
|
||||
{
|
||||
@@ -22,8 +20,11 @@ namespace Umbraco.Web.Models.ContentEditing
|
||||
[DataMember(Name = "createDate")]
|
||||
public DateTime CreateDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Boolean indicating if this item is published or not based on it's <see cref="State"/>
|
||||
/// </summary>
|
||||
[DataMember(Name = "published")]
|
||||
public bool Published { get; set; }
|
||||
public bool Published => State == ContentSavedState.Published || State == ContentSavedState.PublishedPendingChanges;
|
||||
|
||||
/// <summary>
|
||||
/// Determines if the content item is a draft
|
||||
@@ -44,6 +45,16 @@ namespace Umbraco.Web.Models.ContentEditing
|
||||
[DataMember(Name = "sortOrder")]
|
||||
public int SortOrder { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The saved/published state of an item
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This is nullable since it's only relevant for content (non-content like media + members will be null)
|
||||
/// </remarks>
|
||||
[DataMember(Name = "state")]
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public ContentSavedState? State { get; set; }
|
||||
|
||||
protected bool Equals(ContentItemBasic other)
|
||||
{
|
||||
return Id == other.Id;
|
||||
|
||||
@@ -6,6 +6,7 @@ using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.ContentEditing;
|
||||
using Umbraco.Core.Serialization;
|
||||
using Umbraco.Web.Routing;
|
||||
|
||||
|
||||
@@ -8,21 +8,21 @@
|
||||
/// <summary>
|
||||
/// The item isn't created yet
|
||||
/// </summary>
|
||||
NotCreated,
|
||||
NotCreated = 1,
|
||||
|
||||
/// <summary>
|
||||
/// The item is saved but isn't published
|
||||
/// </summary>
|
||||
Draft,
|
||||
Draft = 2,
|
||||
|
||||
/// <summary>
|
||||
/// The item is published and there are no pending changes
|
||||
/// </summary>
|
||||
Published,
|
||||
Published = 3,
|
||||
|
||||
/// <summary>
|
||||
/// The item is published and there are pending changes
|
||||
/// </summary>
|
||||
PublishedPendingChanges
|
||||
PublishedPendingChanges = 4
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.ContentEditing;
|
||||
|
||||
namespace Umbraco.Web.Models.ContentEditing
|
||||
{
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.ContentEditing;
|
||||
|
||||
namespace Umbraco.Web.Models.ContentEditing
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user