2013-05-30 21:21:52 -10:00
|
|
|
|
using System;
|
2013-10-31 16:51:08 +11:00
|
|
|
|
using System.Collections.Generic;
|
2013-05-23 22:15:52 -10:00
|
|
|
|
using System.Runtime.Serialization;
|
2013-06-10 20:24:54 -02:00
|
|
|
|
using Umbraco.Core.Models;
|
2013-05-23 22:15:52 -10:00
|
|
|
|
|
|
|
|
|
|
namespace Umbraco.Web.Models.ContentEditing
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <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()
|
|
|
|
|
|
{
|
2016-08-04 18:34:20 +02:00
|
|
|
|
AllowPreview = true;
|
2016-06-21 14:18:55 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
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
|
|
|
|
|
2018-07-25 08:36:09 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[DataMember(Name = "templateId")]
|
|
|
|
|
|
public int TemplateId { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-09-26 15:44:41 +02:00
|
|
|
|
[DataMember(Name = "allowedTemplates")]
|
2017-09-28 14:54:18 +10:00
|
|
|
|
public IDictionary<string, string> AllowedTemplates { get; set; }
|
2017-09-26 15:44:41 +02:00
|
|
|
|
|
2017-09-28 14:54:18 +10:00
|
|
|
|
[DataMember(Name = "documentType")]
|
|
|
|
|
|
public ContentTypeBasic DocumentType { 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
|
|
|
|
|
2016-08-04 18:34:20 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Determines whether previewing is allowed for this node
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <remarks>
|
|
|
|
|
|
/// By default this is true but by using events developers can toggle this off for certain documents if there is nothing to preview
|
|
|
|
|
|
/// </remarks>
|
|
|
|
|
|
[DataMember( Name = "allowPreview" )]
|
|
|
|
|
|
public bool AllowPreview { get; set; }
|
2016-06-21 14:18:55 +02:00
|
|
|
|
|
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")]
|
2017-07-13 14:32:43 +10:00
|
|
|
|
public IEnumerable<string> AllowedActions { get; set; }
|
2017-10-25 11:52:30 +02:00
|
|
|
|
|
2017-08-09 15:29:12 +02:00
|
|
|
|
[DataMember(Name = "isBlueprint")]
|
|
|
|
|
|
public bool IsBlueprint { get; set; }
|
2013-05-23 22:15:52 -10:00
|
|
|
|
}
|
2018-07-25 08:36:09 +02:00
|
|
|
|
}
|