U4-8530 Make it possbile to hide preview button by DocumentType or ContentItem

This commit is contained in:
Shannon
2016-08-04 18:34:20 +02:00
parent 7ed240d510
commit 2c15db5950
3 changed files with 11 additions and 4 deletions

View File

@@ -22,7 +22,7 @@ namespace Umbraco.Web.Models.ContentEditing
{
public ContentItemDisplay()
{
Preview = true;
AllowPreview = true;
}
[DataMember(Name = "publishDate")]
@@ -40,8 +40,14 @@ namespace Umbraco.Web.Models.ContentEditing
[DataMember(Name = "urls")]
public string[] Urls { get; set; }
[DataMember( Name = "preview" )]
public bool Preview { get; set; }
/// <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; }
/// <summary>
/// The allowed 'actions' based on the user's permissions - Create, Update, Publish, Send to publish