Merge branch temp8 into feature/IContentType-removale-from-IContent
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -32,5 +32,8 @@ namespace Umbraco.Web.Models.ContentEditing
|
||||
|
||||
[DataMember(Name = "iconUrl")]
|
||||
public string IconUrl { get; set; }
|
||||
|
||||
[DataMember(Name = "readme")]
|
||||
public string Readme { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,5 +87,7 @@ namespace Umbraco.Web.Models.ContentEditing
|
||||
/// Property Group
|
||||
/// </summary>
|
||||
PropertyGroup
|
||||
|
||||
//TODO: Dictionary?
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,17 +1,13 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
using Umbraco.Core.Models.Editors;
|
||||
using Umbraco.Web.Models.ContentEditing;
|
||||
|
||||
namespace Umbraco.Web.Models
|
||||
{
|
||||
[DataContract(Name = "contentTypeImportModel")]
|
||||
public class ContentTypeImportModel : INotificationModel
|
||||
public class ContentTypeImportModel : INotificationModel, IHaveUploadedFiles
|
||||
{
|
||||
public ContentTypeImportModel()
|
||||
{
|
||||
Notifications = new List<Notification>();
|
||||
}
|
||||
|
||||
[DataMember(Name = "alias")]
|
||||
public string Alias { get; set; }
|
||||
|
||||
@@ -19,9 +15,11 @@ namespace Umbraco.Web.Models
|
||||
public string Name { get; set; }
|
||||
|
||||
[DataMember(Name = "notifications")]
|
||||
public List<Notification> Notifications { get; }
|
||||
public List<Notification> Notifications { get; } = new List<Notification>();
|
||||
|
||||
[DataMember(Name = "tempFileName")]
|
||||
public string TempFileName { get; set; }
|
||||
|
||||
public List<ContentPropertyFile> UploadedFiles => new List<ContentPropertyFile>();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,16 +11,10 @@ namespace Umbraco.Web.Models
|
||||
[DataContract(Name = "localPackageInstallModel")]
|
||||
public class LocalPackageInstallModel : PackageInstallModel, IHaveUploadedFiles, INotificationModel
|
||||
{
|
||||
public LocalPackageInstallModel()
|
||||
{
|
||||
UploadedFiles = new List<ContentPropertyFile>();
|
||||
Notifications = new List<Notification>();
|
||||
}
|
||||
|
||||
public List<ContentPropertyFile> UploadedFiles { get; }
|
||||
public List<ContentPropertyFile> UploadedFiles { get; } = new List<ContentPropertyFile>();
|
||||
|
||||
[DataMember(Name = "notifications")]
|
||||
public List<Notification> Notifications { get; }
|
||||
public List<Notification> Notifications { get; } = new List<Notification>();
|
||||
|
||||
/// <summary>
|
||||
/// A flag to determine if this package is compatible to be installed
|
||||
@@ -43,32 +37,44 @@ namespace Umbraco.Web.Models
|
||||
[DataMember(Name = "version")]
|
||||
public string Version { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// If this is not null then it means the package is being from this version
|
||||
/// </summary>
|
||||
[DataMember(Name = "originalVersion")]
|
||||
public string OriginalVersion { get; set; }
|
||||
|
||||
[DataMember(Name = "containsUnsecureFiles")]
|
||||
public bool ContainsUnsecureFiles { get; set; }
|
||||
|
||||
[DataMember(Name = "containsTemplateConflicts")]
|
||||
public bool ContainsTemplateConflicts { get; set; }
|
||||
public bool ContainsTemplateConflicts => ConflictingTemplateAliases != null && ConflictingTemplateAliases.Count > 0;
|
||||
|
||||
[DataMember(Name = "containsStyleSheetConflicts")]
|
||||
public bool ContainsStyleSheetConflicts { get; set; }
|
||||
public bool ContainsStyleSheetConflicts => ConflictingStyleSheetNames != null && ConflictingStyleSheetNames.Count > 0;
|
||||
|
||||
[DataMember(Name = "containsMacroConflict")]
|
||||
public bool ContainsMacroConflict { get; set; }
|
||||
|
||||
[DataMember(Name = "containsBinaryFileErrors")]
|
||||
public bool ContainsBinaryFileErrors { get; set; }
|
||||
public bool ContainsMacroConflict => ConflictingMacroAliases != null && ConflictingMacroAliases.Count > 0;
|
||||
|
||||
/// <summary>
|
||||
/// Key value of name + alias
|
||||
/// </summary>
|
||||
[DataMember(Name = "conflictingTemplateAliases")]
|
||||
public IDictionary<string, string> ConflictingTemplateAliases { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Key value of name + alias
|
||||
/// </summary>
|
||||
[DataMember(Name = "conflictingStyleSheetNames")]
|
||||
public IDictionary<string, string> ConflictingStyleSheetNames { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Key value of name + alias
|
||||
/// </summary>
|
||||
[DataMember(Name = "conflictingMacroAliases")]
|
||||
public IDictionary<string, string> ConflictingMacroAliases { get; set; }
|
||||
|
||||
[DataMember(Name = "readMe")]
|
||||
public string ReadMe { get; set; }
|
||||
[DataMember(Name = "readme")]
|
||||
public string Readme { get; set; }
|
||||
|
||||
[DataMember(Name = "licenseUrl")]
|
||||
public string LicenseUrl { get; set; }
|
||||
|
||||
@@ -15,19 +15,14 @@ namespace Umbraco.Web.Models
|
||||
[DataMember(Name = "packageGuid")]
|
||||
public Guid PackageGuid { get; set; }
|
||||
|
||||
[DataMember(Name = "repositoryGuid")]
|
||||
public Guid RepositoryGuid { get; set; }
|
||||
|
||||
[DataMember(Name = "temporaryDirectoryPath")]
|
||||
public string TemporaryDirectoryPath { get; set; }
|
||||
|
||||
[DataMember(Name = "zipFilePath")]
|
||||
public string ZipFilePath { get; set; }
|
||||
[DataMember(Name = "zipFileName")]
|
||||
public string ZipFileName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// During installation this can be used to track any pending appdomain restarts
|
||||
/// </summary>
|
||||
[DataMember(Name = "isRestarting")]
|
||||
public bool IsRestarting { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace Umbraco.Web.Models.PublishedContent
|
||||
/// <inheritdoc />
|
||||
public VariationContext VariationContext
|
||||
{
|
||||
get => (VariationContext) HttpContextAccessor.HttpContext.Items[ContextKey];
|
||||
get => (VariationContext) HttpContextAccessor.HttpContext?.Items[ContextKey];
|
||||
set => HttpContextAccessor.HttpContext.Items[ContextKey] = value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,18 +10,18 @@ namespace Umbraco.Web.Models.Trees
|
||||
{
|
||||
public override string AngularServiceName => "umbracoMenuActions";
|
||||
|
||||
public CreateChildEntity(string name, bool seperatorBefore = false)
|
||||
public CreateChildEntity(string name, bool separatorBefore = false)
|
||||
: base(ActionNew.ActionAlias, name)
|
||||
{
|
||||
Icon = "add"; Name = name;
|
||||
SeperatorBefore = seperatorBefore;
|
||||
SeparatorBefore = separatorBefore;
|
||||
}
|
||||
|
||||
public CreateChildEntity(ILocalizedTextService textService, bool seperatorBefore = false)
|
||||
public CreateChildEntity(ILocalizedTextService textService, bool separatorBefore = false)
|
||||
: base(ActionNew.ActionAlias, textService)
|
||||
{
|
||||
Icon = "add";
|
||||
SeperatorBefore = seperatorBefore;
|
||||
SeparatorBefore = separatorBefore;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace Umbraco.Web.Models.Trees
|
||||
{
|
||||
Name = name.IsNullOrWhiteSpace() ? action.Alias : name;
|
||||
Alias = action.Alias;
|
||||
SeperatorBefore = false;
|
||||
SeparatorBefore = false;
|
||||
Icon = action.Icon;
|
||||
Action = action;
|
||||
}
|
||||
@@ -80,8 +80,8 @@ namespace Umbraco.Web.Models.Trees
|
||||
/// <summary>
|
||||
/// Ensures a menu separator will exist before this menu item
|
||||
/// </summary>
|
||||
[DataMember(Name = "seperator")]
|
||||
public bool SeperatorBefore { get; set; }
|
||||
[DataMember(Name = "separator")]
|
||||
public bool SeparatorBefore { get; set; }
|
||||
|
||||
[DataMember(Name = "cssclass")]
|
||||
public string Icon { get; set; }
|
||||
|
||||
@@ -83,7 +83,7 @@ namespace Umbraco.Web.Models.Trees
|
||||
if (item == null) return null;
|
||||
var menuItem = new MenuItem(item, name)
|
||||
{
|
||||
SeperatorBefore = hasSeparator,
|
||||
SeparatorBefore = hasSeparator,
|
||||
OpensDialog = opensDialog
|
||||
};
|
||||
|
||||
@@ -98,7 +98,7 @@ namespace Umbraco.Web.Models.Trees
|
||||
|
||||
var menuItem = new MenuItem(item, textService.Localize($"actions/{item.Alias}"))
|
||||
{
|
||||
SeperatorBefore = hasSeparator,
|
||||
SeparatorBefore = hasSeparator,
|
||||
OpensDialog = opensDialog
|
||||
};
|
||||
|
||||
|
||||
@@ -10,18 +10,18 @@ namespace Umbraco.Web.Models.Trees
|
||||
{
|
||||
public override string AngularServiceName => "umbracoMenuActions";
|
||||
|
||||
public RefreshNode(string name, bool seperatorBefore = false)
|
||||
public RefreshNode(string name, bool separatorBefore = false)
|
||||
: base("refreshNode", name)
|
||||
{
|
||||
Icon = "refresh";
|
||||
SeperatorBefore = seperatorBefore;
|
||||
SeparatorBefore = separatorBefore;
|
||||
}
|
||||
|
||||
public RefreshNode(ILocalizedTextService textService, bool seperatorBefore = false)
|
||||
public RefreshNode(ILocalizedTextService textService, bool separatorBefore = false)
|
||||
: base("refreshNode", textService)
|
||||
{
|
||||
Icon = "refresh";
|
||||
SeperatorBefore = seperatorBefore;
|
||||
SeparatorBefore = separatorBefore;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user