2013-05-30 21:21:52 -10:00
|
|
|
|
using System;
|
2013-10-31 16:51:08 +11:00
|
|
|
|
using System.Collections.Generic;
|
2013-07-22 17:13:38 +10:00
|
|
|
|
using System.Linq;
|
2013-12-12 13:27:33 +11:00
|
|
|
|
using System.Net.Http.Formatting;
|
2013-05-23 22:15:52 -10:00
|
|
|
|
using System.Runtime.Serialization;
|
2013-07-16 18:23:20 +10:00
|
|
|
|
using System.Web.Http;
|
|
|
|
|
|
using System.Web.Http.ModelBinding;
|
2013-12-12 13:27:33 +11:00
|
|
|
|
using Umbraco.Core;
|
2013-06-10 20:24:54 -02:00
|
|
|
|
using Umbraco.Core.Models;
|
2013-08-12 16:45:00 +10:00
|
|
|
|
using Umbraco.Core.Models.Validation;
|
2013-12-12 13:27:33 +11:00
|
|
|
|
using Umbraco.Web.Models.Trees;
|
|
|
|
|
|
using Umbraco.Web.Trees;
|
2013-05-23 22:15:52 -10:00
|
|
|
|
|
|
|
|
|
|
namespace Umbraco.Web.Models.ContentEditing
|
|
|
|
|
|
{
|
2013-12-12 13:27:33 +11:00
|
|
|
|
|
2013-05-23 22:15:52 -10:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// A model representing a content item to be displayed in the back office
|
|
|
|
|
|
/// </summary>
|
2013-07-16 18:23:20 +10:00
|
|
|
|
[DataContract(Name = "content", Namespace = "")]
|
2013-12-12 14:10:03 +11:00
|
|
|
|
public class ContentItemDisplay : ListViewAwareContentItemDisplayBase<ContentPropertyDisplay, IContent>
|
2013-05-30 21:21:52 -10:00
|
|
|
|
{
|
2016-06-21 14:18:55 +02:00
|
|
|
|
public ContentItemDisplay()
|
|
|
|
|
|
{
|
|
|
|
|
|
Preview = true;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2013-06-03 23:50:20 -10:00
|
|
|
|
[DataMember(Name = "publishDate")]
|
|
|
|
|
|
public DateTime? PublishDate { get; set; }
|
2013-08-12 14:16:45 +10:00
|
|
|
|
|
2013-08-12 15:57:54 +10:00
|
|
|
|
[DataMember(Name = "releaseDate")]
|
|
|
|
|
|
public DateTime? ReleaseDate { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[DataMember(Name = "removeDate")]
|
2013-08-12 16:45:00 +10:00
|
|
|
|
public DateTime? ExpireDate { get; set; }
|
2013-08-12 15:57:54 +10:00
|
|
|
|
|
2013-08-12 14:16:45 +10:00
|
|
|
|
[DataMember(Name = "template")]
|
2013-08-22 15:48:32 +10:00
|
|
|
|
public string TemplateAlias { get; set; }
|
2013-08-12 15:57:54 +10:00
|
|
|
|
|
|
|
|
|
|
[DataMember(Name = "urls")]
|
|
|
|
|
|
public string[] Urls { get; set; }
|
2016-06-21 14:18:55 +02:00
|
|
|
|
|
|
|
|
|
|
[DataMember( Name = "preview" )]
|
|
|
|
|
|
public bool Preview { get; set; }
|
|
|
|
|
|
|
2013-10-31 16:51:08 +11:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The allowed 'actions' based on the user's permissions - Create, Update, Publish, Send to publish
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <remarks>
|
|
|
|
|
|
/// Each char represents a button which we can then map on the front-end to the correct actions
|
|
|
|
|
|
/// </remarks>
|
|
|
|
|
|
[DataMember(Name = "allowedActions")]
|
|
|
|
|
|
public IEnumerable<char> AllowedActions { get; set; }
|
2013-12-12 13:27:33 +11:00
|
|
|
|
|
2013-05-23 22:15:52 -10:00
|
|
|
|
}
|
|
|
|
|
|
}
|