Merge branch 'temp8' into temp8-3417-macro-crud

This commit is contained in:
Bjarke Berg
2019-01-21 09:14:40 +01:00
1136 changed files with 22519 additions and 31117 deletions

View File

@@ -27,7 +27,7 @@ namespace Umbraco.Web.Models.ContentEditing
/// <summary>
/// Path represents the path used by the backoffice tree
/// For files stored on disk, this is a urlencoded, comma seperated
/// For files stored on disk, this is a urlencoded, comma separated
/// path to the file, always starting with -1.
///
/// -1,Partials,Parials%2FFolder,Partials%2FFolder%2FFile.cshtml

View File

@@ -86,6 +86,12 @@ namespace Umbraco.Web.Models.ContentEditing
[DataMember(Name = "isContainer")]
public bool IsContainer { get; set; }
/// <summary>
/// Indicates if the content is configured as an element
/// </summary>
[DataMember(Name = "isElement")]
public bool IsElement { get; set; }
/// <summary>
/// Property indicating if this item is part of a list view parent
/// </summary>
@@ -117,7 +123,7 @@ namespace Umbraco.Web.Models.ContentEditing
/// </remarks>
[DataMember(Name = "updateDate")]
public DateTime UpdateDate { get; set; }
[DataMember(Name = "template")]
public string TemplateAlias { get; set; }

View File

@@ -20,5 +20,8 @@ namespace Umbraco.Web.Models.ContentEditing
[DataMember(Name = "contentId")]
public int ContentId { get; set; }
[DataMember(Name = "culture")]
public string Culture { get; set; }
}
}

View File

@@ -4,6 +4,7 @@ using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Runtime.Serialization;
using Umbraco.Core;
using Umbraco.Core.Composing;
using Umbraco.Core.Configuration;
using Umbraco.Core.IO;
using Umbraco.Core.Models.Validation;
@@ -75,7 +76,7 @@ namespace Umbraco.Web.Models.ContentEditing
{
return IconIsClass
? string.Empty
: string.Format("{0}images/umbraco/{1}", UmbracoConfig.For.GlobalSettings().Path.EnsureEndsWith("/"), Icon);
: string.Format("{0}images/umbraco/{1}", Current.Configs.Global().Path.EnsureEndsWith("/"), Icon);
}
}

View File

@@ -26,6 +26,10 @@ namespace Umbraco.Web.Models.ContentEditing
[DataMember(Name = "isContainer")]
public bool IsContainer { get; set; }
//Element
[DataMember(Name = "isElement")]
public bool IsElement { get; set; }
[DataMember(Name = "listViewEditorName")]
[ReadOnly(true)]
public string ListViewEditorName { get; set; }

View File

@@ -25,6 +25,9 @@ namespace Umbraco.Web.Models.ContentEditing
[DataMember(Name = "isContainer")]
public bool IsContainer { get; set; }
[DataMember(Name = "isElement")]
public bool IsElement { get; set; }
[DataMember(Name = "allowAsRoot")]
public bool AllowAsRoot { get; set; }

View File

@@ -1,36 +0,0 @@
using System.Collections.Generic;
using System.Runtime.Serialization;
namespace Umbraco.Web.Models.ContentEditing
{
[DataContract]
public class InstalledPackageModel
{
[DataMember(Name = "id")]
public int Id { get; set; }
[DataMember(Name = "name")]
public string Name { get; set; }
[DataMember(Name = "author")]
public string Author { get; set; }
[DataMember(Name = "files")]
public IEnumerable<string> Files { get; set; }
[DataMember(Name = "version")]
public string Version { get; set; }
[DataMember(Name = "url")]
public string Url { get; set; }
[DataMember(Name = "license")]
public string License { get; set; }
[DataMember(Name = "licenseUrl")]
public string LicenseUrl { get; set; }
[DataMember(Name = "iconUrl")]
public string IconUrl { get; set; }
}
}

View File

@@ -86,6 +86,11 @@ namespace Umbraco.Web.Models.ContentEditing
/// <summary>
/// Property Group
/// </summary>
PropertyGroup
PropertyGroup,
/// <summary>
/// Dictionary Item
/// </summary>
DictionaryItem
}
}

View File

@@ -3,6 +3,7 @@ using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Runtime.Serialization;
using Umbraco.Core;
using Umbraco.Core.Composing;
using Umbraco.Core.Configuration;
namespace Umbraco.Web.Models.ContentEditing
@@ -33,7 +34,7 @@ namespace Umbraco.Web.Models.ContentEditing
if (UserGroups.Any() == false)
yield return new ValidationResult("A user must be assigned to at least one group", new[] { "UserGroups" });
if (UmbracoConfig.For.UmbracoSettings().Security.UsernameIsEmail == false && Username.IsNullOrWhiteSpace())
if (Current.Configs.Settings().Security.UsernameIsEmail == false && Username.IsNullOrWhiteSpace())
yield return new ValidationResult("A username cannot be empty", new[] { "Username" });
}
}