diff --git a/src/SolutionInfo.cs b/src/SolutionInfo.cs index fe3be21eb7..e8a36f0da7 100644 --- a/src/SolutionInfo.cs +++ b/src/SolutionInfo.cs @@ -11,5 +11,5 @@ using System.Resources; [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyFileVersion("7.6.4")] -[assembly: AssemblyInformationalVersion("7.6.4")] \ No newline at end of file +[assembly: AssemblyFileVersion("7.6.5")] +[assembly: AssemblyInformationalVersion("7.6.5")] \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoVersion.cs b/src/Umbraco.Core/Configuration/UmbracoVersion.cs index 85b9bf3685..0d093c395e 100644 --- a/src/Umbraco.Core/Configuration/UmbracoVersion.cs +++ b/src/Umbraco.Core/Configuration/UmbracoVersion.cs @@ -6,7 +6,7 @@ namespace Umbraco.Core.Configuration { public class UmbracoVersion { - private static readonly Version Version = new Version("7.6.4"); + private static readonly Version Version = new Version("7.6.5"); /// /// Gets the current version of Umbraco. diff --git a/src/Umbraco.Core/IO/FileSystemProviderManager.cs b/src/Umbraco.Core/IO/FileSystemProviderManager.cs index df922fb2b0..d2ae8a0612 100644 --- a/src/Umbraco.Core/IO/FileSystemProviderManager.cs +++ b/src/Umbraco.Core/IO/FileSystemProviderManager.cs @@ -19,6 +19,8 @@ namespace Umbraco.Core.IO private ShadowWrapper _macroPartialFileSystem; private ShadowWrapper _partialViewsFileSystem; + private ShadowWrapper _macroScriptsFileSystem; + private ShadowWrapper _userControlsFileSystem; private ShadowWrapper _stylesheetsFileSystem; private ShadowWrapper _scriptsFileSystem; private ShadowWrapper _xsltFileSystem; @@ -61,6 +63,8 @@ namespace Umbraco.Core.IO { var macroPartialFileSystem = new PhysicalFileSystem(SystemDirectories.MacroPartials); var partialViewsFileSystem = new PhysicalFileSystem(SystemDirectories.PartialViews); + var macroScriptsFileSystem = new PhysicalFileSystem(SystemDirectories.MacroScripts); + var userControlsFileSystem = new PhysicalFileSystem(SystemDirectories.UserControls); var stylesheetsFileSystem = new PhysicalFileSystem(SystemDirectories.Css); var scriptsFileSystem = new PhysicalFileSystem(SystemDirectories.Scripts); var xsltFileSystem = new PhysicalFileSystem(SystemDirectories.Xslt); @@ -69,6 +73,8 @@ namespace Umbraco.Core.IO _macroPartialFileSystem = new ShadowWrapper(macroPartialFileSystem, "Views/MacroPartials", ScopeProvider); _partialViewsFileSystem = new ShadowWrapper(partialViewsFileSystem, "Views/Partials", ScopeProvider); + _macroScriptsFileSystem = new ShadowWrapper(macroScriptsFileSystem, "macroScripts", ScopeProvider); + _userControlsFileSystem = new ShadowWrapper(userControlsFileSystem, "usercontrols", ScopeProvider); _stylesheetsFileSystem = new ShadowWrapper(stylesheetsFileSystem, "css", ScopeProvider); _scriptsFileSystem = new ShadowWrapper(scriptsFileSystem, "scripts", ScopeProvider); _xsltFileSystem = new ShadowWrapper(xsltFileSystem, "xslt", ScopeProvider); @@ -85,6 +91,10 @@ namespace Umbraco.Core.IO public IFileSystem2 MacroPartialsFileSystem { get { return _macroPartialFileSystem; } } public IFileSystem2 PartialViewsFileSystem { get { return _partialViewsFileSystem; } } + // Legacy /macroScripts folder + public IFileSystem2 MacroScriptsFileSystem { get { return _macroScriptsFileSystem; } } + // Legacy /usercontrols folder + public IFileSystem2 UserControlsFileSystem { get { return _userControlsFileSystem; } } public IFileSystem2 StylesheetsFileSystem { get { return _stylesheetsFileSystem; } } public IFileSystem2 ScriptsFileSystem { get { return _scriptsFileSystem; } } public IFileSystem2 XsltFileSystem { get { return _xsltFileSystem; } } @@ -252,13 +262,15 @@ namespace Umbraco.Core.IO internal ICompletable Shadow(Guid id) { var typed = _wrappers.ToArray(); - var wrappers = new ShadowWrapper[typed.Length + 7]; + var wrappers = new ShadowWrapper[typed.Length + 9]; var i = 0; while (i < typed.Length) wrappers[i] = typed[i++]; wrappers[i++] = _macroPartialFileSystem; + wrappers[i++] = _macroScriptsFileSystem; wrappers[i++] = _partialViewsFileSystem; wrappers[i++] = _stylesheetsFileSystem; wrappers[i++] = _scriptsFileSystem; + wrappers[i++] = _userControlsFileSystem; wrappers[i++] = _xsltFileSystem; wrappers[i++] = _masterPagesFileSystem; wrappers[i] = _mvcViewsFileSystem; diff --git a/src/Umbraco.Core/Models/IUserControl.cs b/src/Umbraco.Core/Models/IUserControl.cs new file mode 100644 index 0000000000..2660567258 --- /dev/null +++ b/src/Umbraco.Core/Models/IUserControl.cs @@ -0,0 +1,7 @@ +namespace Umbraco.Core.Models +{ + public interface IUserControl : IFile + { + + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Models/Member.cs b/src/Umbraco.Core/Models/Member.cs index 02d6b9aece..1ed11af93e 100644 --- a/src/Umbraco.Core/Models/Member.cs +++ b/src/Umbraco.Core/Models/Member.cs @@ -109,6 +109,30 @@ namespace Umbraco.Core.Models IsApproved = true; } + /// + /// Constructor for creating a Member object + /// + /// + /// + /// + /// + /// The password value passed in to this parameter should be the encoded/encrypted/hashed format of the member's password + /// + /// + /// + public Member(string name, string email, string username, string rawPasswordValue, IMemberType contentType, bool isApproved) + : base(name, -1, contentType, new PropertyCollection()) + { + Mandate.ParameterNotNull(contentType, "contentType"); + + _contentTypeAlias = contentType.Alias; + _contentType = contentType; + _email = email; + _username = username; + _rawPasswordValue = rawPasswordValue; + IsApproved = isApproved; + } + private static readonly Lazy Ps = new Lazy(); private class PropertySelectors diff --git a/src/Umbraco.Core/Models/PartialViewType.cs b/src/Umbraco.Core/Models/PartialViewType.cs index 6204b6e165..6740d1fdd9 100644 --- a/src/Umbraco.Core/Models/PartialViewType.cs +++ b/src/Umbraco.Core/Models/PartialViewType.cs @@ -4,6 +4,7 @@ { Unknown = 0, // default PartialView = 1, - PartialViewMacro = 2 + PartialViewMacro = 2, + MacroScript = 3 } } diff --git a/src/Umbraco.Core/Models/UserControl.cs b/src/Umbraco.Core/Models/UserControl.cs new file mode 100644 index 0000000000..6af4cd74cc --- /dev/null +++ b/src/Umbraco.Core/Models/UserControl.cs @@ -0,0 +1,32 @@ +using System; +using System.Runtime.Serialization; + +namespace Umbraco.Core.Models +{ + /// + /// Represents a UserControl file + /// + [Serializable] + [DataContract(IsReference = true)] + public class UserControl : File, IUserControl + { + public UserControl(string path) + : this(path, (Func)null) + { } + + internal UserControl(string path, Func getFileContent) + : base(path, getFileContent) + { } + + /// + /// Indicates whether the current entity has an identity, which in this case is a path/name. + /// + /// + /// Overrides the default Entity identity check. + /// + public override bool HasIdentity + { + get { return string.IsNullOrEmpty(Path) == false; } + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSevenThreeZero/UpdateUniqueIdToHaveCorrectIndexType.cs b/src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSevenThreeZero/UpdateUniqueIdToHaveCorrectIndexType.cs index 79d7b3111c..dc8415a9f8 100644 --- a/src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSevenThreeZero/UpdateUniqueIdToHaveCorrectIndexType.cs +++ b/src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSevenThreeZero/UpdateUniqueIdToHaveCorrectIndexType.cs @@ -1,5 +1,4 @@ using System.Linq; -using Umbraco.Core.Configuration; using Umbraco.Core.Logging; using Umbraco.Core.Persistence.DatabaseModelDefinitions; using Umbraco.Core.Persistence.SqlSyntax; @@ -11,15 +10,11 @@ namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSevenThreeZe { public UpdateUniqueIdToHaveCorrectIndexType(ISqlSyntaxProvider sqlSyntax, ILogger logger) : base(sqlSyntax, logger) - { - } + { } - //see: http://issues.umbraco.org/issue/U4-6188, http://issues.umbraco.org/issue/U4-6187 public override void Up() { - - - var dbIndexes = SqlSyntax.GetDefinedIndexes(Context.Database) + var indexes = SqlSyntax.GetDefinedIndexes(Context.Database) .Select(x => new DbIndexDefinition() { TableName = x.Item1, @@ -28,24 +23,19 @@ namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSevenThreeZe IsUnique = x.Item4 }).ToArray(); - //must be non-nullable + // drop the index if it exists + if (indexes.Any(x => x.IndexName.InvariantEquals("IX_umbracoNodeUniqueID"))) + Delete.Index("IX_umbracoNodeUniqueID").OnTable("umbracoNode"); + + // set uniqueID to be non-nullable + // the index *must* be dropped else 'one or more objects access this column' exception Alter.Table("umbracoNode").AlterColumn("uniqueID").AsGuid().NotNullable(); - //make sure it already exists - if (dbIndexes.Any(x => x.IndexName.InvariantEquals("IX_umbracoNodeUniqueID"))) - { - Delete.Index("IX_umbracoNodeUniqueID").OnTable("umbracoNode"); - } - //make sure it doesn't already exist - if (dbIndexes.Any(x => x.IndexName.InvariantEquals("IX_umbracoNode_uniqueID")) == false) - { - //must be a uniqe index - Create.Index("IX_umbracoNode_uniqueID").OnTable("umbracoNode").OnColumn("uniqueID").Unique(); - } + // create the index + Create.Index("IX_umbracoNode_uniqueID").OnTable("umbracoNode").OnColumn("uniqueID").Unique(); } public override void Down() - { - } + { } } } \ No newline at end of file diff --git a/src/Umbraco.Core/Persistence/Repositories/Interfaces/IUserControlRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Interfaces/IUserControlRepository.cs new file mode 100644 index 0000000000..7efb29b0a5 --- /dev/null +++ b/src/Umbraco.Core/Persistence/Repositories/Interfaces/IUserControlRepository.cs @@ -0,0 +1,13 @@ +using System.IO; +using Umbraco.Core.Models; + +namespace Umbraco.Core.Persistence.Repositories +{ + public interface IUserControlRepository : IRepository + { + bool ValidateUserControl(UserControl userControl); + Stream GetFileContentStream(string filepath); + void SetFileContent(string filepath, Stream content); + long GetFileSize(string filepath); + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Persistence/Repositories/MacroScriptRepository.cs b/src/Umbraco.Core/Persistence/Repositories/MacroScriptRepository.cs new file mode 100644 index 0000000000..0f335173ad --- /dev/null +++ b/src/Umbraco.Core/Persistence/Repositories/MacroScriptRepository.cs @@ -0,0 +1,15 @@ +using Umbraco.Core.IO; +using Umbraco.Core.Models; +using Umbraco.Core.Persistence.UnitOfWork; + +namespace Umbraco.Core.Persistence.Repositories +{ + internal class MacroScriptRepository : PartialViewRepository + { + public MacroScriptRepository(IUnitOfWork work, IFileSystem fileSystem) + : base(work, fileSystem) + { } + + protected override PartialViewType ViewType { get { return PartialViewType.MacroScript; } } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Persistence/Repositories/UserControlRepository.cs b/src/Umbraco.Core/Persistence/Repositories/UserControlRepository.cs new file mode 100644 index 0000000000..77ad09cb57 --- /dev/null +++ b/src/Umbraco.Core/Persistence/Repositories/UserControlRepository.cs @@ -0,0 +1,135 @@ +using System.Collections.Generic; +using System.IO; +using System.Linq; +using Umbraco.Core.IO; +using Umbraco.Core.Models; +using Umbraco.Core.Persistence.UnitOfWork; + +namespace Umbraco.Core.Persistence.Repositories +{ + /// + /// Represents the UserControl Repository + /// + internal class UserControlRepository : FileRepository, IUserControlRepository + { + public UserControlRepository(IUnitOfWork work, IFileSystem fileSystem) + : base(work, fileSystem) + { + } + + public override UserControl Get(string id) + { + var path = FileSystem.GetRelativePath(id); + + path = path.EnsureEndsWith(".ascx"); + + if (FileSystem.FileExists(path) == false) + return null; + + var created = FileSystem.GetCreated(path).UtcDateTime; + var updated = FileSystem.GetLastModified(path).UtcDateTime; + + var userControl = new UserControl(path, file => GetFileContent(file.OriginalPath)) + { + Key = path.EncodeAsGuid(), + CreateDate = created, + UpdateDate = updated, + Id = path.GetHashCode(), + VirtualPath = FileSystem.GetUrl(path) + }; + + //on initial construction we don't want to have dirty properties tracked + // http://issues.umbraco.org/issue/U4-1946 + userControl.ResetDirtyProperties(false); + + return userControl; + } + + public override void AddOrUpdate(UserControl entity) + { + base.AddOrUpdate(entity); + + // ensure that from now on, content is lazy-loaded + if (entity.GetFileContent == null) + entity.GetFileContent = file => GetFileContent(file.OriginalPath); + } + + public override IEnumerable GetAll(params string[] ids) + { + ids = ids + .Select(x => StringExtensions.EnsureEndsWith(x, ".ascx")) + .Distinct() + .ToArray(); + + if (ids.Any()) + { + foreach (var id in ids) + { + yield return Get(id); + } + } + else + { + var files = FindAllFiles("", "*.ascx"); + foreach (var file in files) + { + yield return Get(file); + } + } + } + + /// + /// Gets a list of all that exist at the relative path specified. + /// + /// + /// If null or not specified, will return the UserControl files at the root path relative to the IFileSystem + /// + /// + public IEnumerable GetUserControlsAtPath(string rootPath = null) + { + return FileSystem.GetFiles(rootPath ?? string.Empty, "*.ascx").Select(Get); + } + + private static readonly List ValidExtensions = new List { "ascx" }; + + public bool ValidateUserControl(UserControl userControl) + { + // get full path + string fullPath; + try + { + // may throw for security reasons + fullPath = FileSystem.GetFullPath(userControl.Path); + } + catch + { + return false; + } + + // validate path and extension + var validDir = SystemDirectories.UserControls; + var isValidPath = IOHelper.VerifyEditPath(fullPath, validDir); + var isValidExtension = IOHelper.VerifyFileExtension(userControl.Path, ValidExtensions); + return isValidPath && isValidExtension; + } + + public Stream GetFileContentStream(string filepath) + { + if (FileSystem.FileExists(filepath) == false) return null; + + try + { + return FileSystem.OpenFile(filepath); + } + catch + { + return null; // deal with race conds + } + } + + public void SetFileContent(string filepath, Stream content) + { + FileSystem.AddFile(filepath, content, true); + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/Persistence/RepositoryFactory.cs b/src/Umbraco.Core/Persistence/RepositoryFactory.cs index afb93f620f..631c292eac 100644 --- a/src/Umbraco.Core/Persistence/RepositoryFactory.cs +++ b/src/Umbraco.Core/Persistence/RepositoryFactory.cs @@ -231,6 +231,18 @@ namespace Umbraco.Core.Persistence return new PartialViewMacroRepository(uow, FileSystemProviderManager.Current.MacroPartialsFileSystem); } + [Obsolete("MacroScripts are obsolete - this is for backwards compatibility with upgraded sites.")] + internal virtual IPartialViewRepository CreateMacroScriptRepository(IUnitOfWork uow) + { + return new MacroScriptRepository(uow, FileSystemProviderManager.Current.MacroScriptsFileSystem); + } + + [Obsolete("UserControls are obsolete - this is for backwards compatibility with upgraded sites.")] + internal virtual IUserControlRepository CreateUserControlRepository(IUnitOfWork uow) + { + return new UserControlRepository(uow, FileSystemProviderManager.Current.UserControlsFileSystem); + } + public virtual IStylesheetRepository CreateStylesheetRepository(IUnitOfWork uow) { return new StylesheetRepository(uow, FileSystemProviderManager.Current.StylesheetsFileSystem); diff --git a/src/Umbraco.Core/Services/FileService.cs b/src/Umbraco.Core/Services/FileService.cs index 28fb07fe9e..4833401df8 100644 --- a/src/Umbraco.Core/Services/FileService.cs +++ b/src/Umbraco.Core/Services/FileService.cs @@ -621,6 +621,34 @@ namespace Umbraco.Core.Services } } + public Stream GetMacroScriptFileContentStream(string filepath) + { + using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) + { + var repository = RepositoryFactory.CreateMacroScriptRepository(uow); + return repository.GetFileContentStream(filepath); + } + } + + public void SetMacroScriptFileContent(string filepath, Stream content) + { + using (var uow = UowProvider.GetUnitOfWork()) + { + var repository = RepositoryFactory.CreateMacroScriptRepository(uow); + repository.SetFileContent(filepath, content); + uow.Commit(); + } + } + + public long GetMacroScriptFileSize(string filepath) + { + using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) + { + var repository = RepositoryFactory.CreateMacroScriptRepository(uow); + return repository.GetFileSize(filepath); + } + } + #endregion public Stream GetStylesheetFileContentStream(string filepath) @@ -679,6 +707,34 @@ namespace Umbraco.Core.Services } } + public Stream GetUserControlFileContentStream(string filepath) + { + using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) + { + var repository = RepositoryFactory.CreateUserControlRepository(uow); + return repository.GetFileContentStream(filepath); + } + } + + public void SetUserControlFileContent(string filepath, Stream content) + { + using (var uow = UowProvider.GetUnitOfWork()) + { + var repository = RepositoryFactory.CreateUserControlRepository(uow); + repository.SetFileContent(filepath, content); + uow.Commit(); + } + } + + public long GetUserControlFileSize(string filepath) + { + using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) + { + var repository = RepositoryFactory.CreateUserControlRepository(uow); + return repository.GetFileSize(filepath); + } + } + public Stream GetXsltFileContentStream(string filepath) { using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) @@ -783,6 +839,26 @@ namespace Umbraco.Core.Services } } + [Obsolete("MacroScripts are obsolete - this is for backwards compatibility with upgraded sites.")] + public IPartialView GetMacroScript(string path) + { + using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) + { + var repository = RepositoryFactory.CreateMacroScriptRepository(uow); + return repository.Get(path); + } + } + + [Obsolete("UserControls are obsolete - this is for backwards compatibility with upgraded sites.")] + public IUserControl GetUserControl(string path) + { + using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) + { + var repository = RepositoryFactory.CreateUserControlRepository(uow); + return repository.Get(path); + } + } + public IEnumerable GetPartialViewMacros(params string[] names) { using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) diff --git a/src/Umbraco.Core/Services/IFileService.cs b/src/Umbraco.Core/Services/IFileService.cs index e8f1065219..74de0861d8 100644 --- a/src/Umbraco.Core/Services/IFileService.cs +++ b/src/Umbraco.Core/Services/IFileService.cs @@ -17,6 +17,10 @@ namespace Umbraco.Core.Services void DeletePartialViewMacroFolder(string folderPath); IPartialView GetPartialView(string path); IPartialView GetPartialViewMacro(string path); + [Obsolete("MacroScripts are obsolete - this is for backwards compatibility with upgraded sites.")] + IPartialView GetMacroScript(string path); + [Obsolete("UserControls are obsolete - this is for backwards compatibility with upgraded sites.")] + IUserControl GetUserControl(string path); IEnumerable GetPartialViewMacros(params string[] names); IXsltFile GetXsltFile(string path); IEnumerable GetXsltFiles(params string[] names); @@ -263,6 +267,27 @@ namespace Umbraco.Core.Services /// The size of the template. long GetTemplateFileSize(string filepath); + /// + /// Gets the content of a macroscript as a stream. + /// + /// The filesystem path to the macroscript. + /// The content of the macroscript. + Stream GetMacroScriptFileContentStream(string filepath); + + /// + /// Sets the content of a macroscript. + /// + /// The filesystem path to the macroscript. + /// The content of the macroscript. + void SetMacroScriptFileContent(string filepath, Stream content); + + /// + /// Gets the size of a macroscript. + /// + /// The filesystem path to the macroscript. + /// The size of the macroscript. + long GetMacroScriptFileSize(string filepath); + /// /// Gets the content of a stylesheet as a stream. /// @@ -305,6 +330,27 @@ namespace Umbraco.Core.Services /// The size of the script file. long GetScriptFileSize(string filepath); + /// + /// Gets the content of a usercontrol as a stream. + /// + /// The filesystem path to the usercontrol. + /// The content of the usercontrol. + Stream GetUserControlFileContentStream(string filepath); + + /// + /// Sets the content of a usercontrol. + /// + /// The filesystem path to the usercontrol. + /// The content of the usercontrol. + void SetUserControlFileContent(string filepath, Stream content); + + /// + /// Gets the size of a usercontrol. + /// + /// The filesystem path to the usercontrol. + /// The size of the usercontrol. + long GetUserControlFileSize(string filepath); + /// /// Gets the content of a XSLT file as a stream. /// diff --git a/src/Umbraco.Core/Services/IMembershipMemberService.cs b/src/Umbraco.Core/Services/IMembershipMemberService.cs index 801f88d9ac..7736a4f609 100644 --- a/src/Umbraco.Core/Services/IMembershipMemberService.cs +++ b/src/Umbraco.Core/Services/IMembershipMemberService.cs @@ -72,6 +72,18 @@ namespace Umbraco.Core.Services /// T CreateWithIdentity(string username, string email, string passwordValue, string memberTypeAlias); + /// + /// Creates and persists a new + /// + /// An can be of type or + /// Username of the to create + /// Email of the to create + /// This value should be the encoded/encrypted/hashed value for the password that will be stored in the database + /// Alias of the Type + /// IsApproved of the to create + /// + T CreateWithIdentity(string username, string email, string passwordValue, string memberTypeAlias, bool isApproved); + /// /// Gets an by its provider key /// diff --git a/src/Umbraco.Core/Services/MemberService.cs b/src/Umbraco.Core/Services/MemberService.cs index ca1f27129c..26e74f66cc 100644 --- a/src/Umbraco.Core/Services/MemberService.cs +++ b/src/Umbraco.Core/Services/MemberService.cs @@ -826,6 +826,22 @@ namespace Umbraco.Core.Services return CreateMemberWithIdentity(username, email, username, passwordValue, memberType); } + /// + /// Creates and persists a new + /// + /// An can be of type or + /// Username of the to create + /// Email of the to create + /// This value should be the encoded/encrypted/hashed value for the password that will be stored in the database + /// Alias of the Type + /// Is the member approved + /// + IMember IMembershipMemberService.CreateWithIdentity(string username, string email, string passwordValue, string memberTypeAlias, bool isApproved) + { + var memberType = FindMemberTypeByAlias(memberTypeAlias); + return CreateMemberWithIdentity(username, email, username, passwordValue, memberType, isApproved); + } + /// /// Creates and persists a Member /// @@ -836,12 +852,13 @@ namespace Umbraco.Core.Services /// Name of the Member to create /// This value should be the encoded/encrypted/hashed value for the password that will be stored in the database /// MemberType the Member should be based on + /// Optional IsApproved of the Member to create /// - private IMember CreateMemberWithIdentity(string username, string email, string name, string passwordValue, IMemberType memberType) + private IMember CreateMemberWithIdentity(string username, string email, string name, string passwordValue, IMemberType memberType, bool isApproved = true) { if (memberType == null) throw new ArgumentNullException("memberType"); - var member = new Member(name, email.ToLower().Trim(), username, passwordValue, memberType); + var member = new Member(name, email.ToLower().Trim(), username, passwordValue, memberType, isApproved); using (var uow = UowProvider.GetUnitOfWork()) { diff --git a/src/Umbraco.Core/Services/UserService.cs b/src/Umbraco.Core/Services/UserService.cs index dd9892e47c..68aa66e231 100644 --- a/src/Umbraco.Core/Services/UserService.cs +++ b/src/Umbraco.Core/Services/UserService.cs @@ -19,7 +19,6 @@ namespace Umbraco.Core.Services /// public class UserService : ScopeRepositoryService, IUserService { - //TODO: We need to change the isUpgrading flag to use an app state enum as described here: http://issues.umbraco.org/issue/U4-6816 // in the meantime, we will use a boolean which we are currently using during upgrades to ensure that a user object is not persisted during this phase, otherwise // exceptions can occur if the db is not in it's correct state. @@ -113,6 +112,26 @@ namespace Umbraco.Core.Services return CreateUserWithIdentity(username, email, passwordValue, userType); } + /// + /// Creates and persists a new + /// + /// Username of the to create + /// Email of the to create + /// This value should be the encoded/encrypted/hashed value for the password that will be stored in the database + /// Alias of the Type + /// Is the member approved + /// + IUser IMembershipMemberService.CreateWithIdentity(string username, string email, string passwordValue, string memberTypeAlias, bool isApproved) + { + var userType = GetUserTypeByAlias(memberTypeAlias); + if (userType == null) + { + throw new EntityNotFoundException("The user type " + memberTypeAlias + " could not be resolved"); + } + + return CreateUserWithIdentity(username, email, passwordValue, userType, isApproved); + } + /// /// Creates and persists a Member /// @@ -122,8 +141,9 @@ namespace Umbraco.Core.Services /// Email of the Member to create /// This value should be the encoded/encrypted/hashed value for the password that will be stored in the database /// MemberType the Member should be based on + /// Is the user approved /// - private IUser CreateUserWithIdentity(string username, string email, string passwordValue, IUserType userType) + private IUser CreateUserWithIdentity(string username, string email, string passwordValue, IUserType userType, bool isApproved = true) { if (userType == null) throw new ArgumentNullException("userType"); @@ -152,7 +172,7 @@ namespace Umbraco.Core.Services StartContentId = -1, StartMediaId = -1, IsLockedOut = false, - IsApproved = true + IsApproved = isApproved }; //adding default sections content and media user.AddAllowedSection("content"); diff --git a/src/Umbraco.Core/UdiEntityType.cs b/src/Umbraco.Core/UdiEntityType.cs index 0119e83b24..8fb5d99338 100644 --- a/src/Umbraco.Core/UdiEntityType.cs +++ b/src/Umbraco.Core/UdiEntityType.cs @@ -69,6 +69,10 @@ namespace Umbraco.Core [UdiType(UdiType.StringUdi)] public const string AnyString = "any-string"; // that one is for tests + [UdiType(UdiType.StringUdi)] + public const string Language = "language"; + [UdiType(UdiType.StringUdi)] + public const string MacroScript = "macroscript"; [UdiType(UdiType.StringUdi)] public const string MediaFile = "media-file"; [UdiType(UdiType.StringUdi)] @@ -82,9 +86,9 @@ namespace Umbraco.Core [UdiType(UdiType.StringUdi)] public const string PartialViewMacro = "partial-view-macro"; [UdiType(UdiType.StringUdi)] - public const string Xslt = "xslt"; + public const string UserControl = "usercontrol"; [UdiType(UdiType.StringUdi)] - public const string Language = "language"; + public const string Xslt = "xslt"; public static string FromUmbracoObjectType(UmbracoObjectTypes umbracoObjectType) { diff --git a/src/Umbraco.Core/UdiGetterExtensions.cs b/src/Umbraco.Core/UdiGetterExtensions.cs index d663acba9d..4ae6b05dca 100644 --- a/src/Umbraco.Core/UdiGetterExtensions.cs +++ b/src/Umbraco.Core/UdiGetterExtensions.cs @@ -190,6 +190,17 @@ namespace Umbraco.Core return new GuidUdi(Constants.UdiEntityType.Macro, entity.Key).EnsureClosed(); } + /// + /// Gets the entity identifier of the entity. + /// + /// The entity. + /// The entity identifier of the entity. + public static StringUdi GetUdi(this IUserControl entity) + { + if (entity == null) throw new ArgumentNullException("entity"); + return new StringUdi(Constants.UdiEntityType.UserControl, entity.Path.TrimStart('/')).EnsureClosed(); + } + /// /// Gets the entity identifier of the entity. /// diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index 77b5072ab4..5d1164e241 100644 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -344,7 +344,9 @@ + + @@ -576,12 +578,15 @@ + + + diff --git a/src/Umbraco.Tests/Membership/UmbracoServiceMembershipProviderTests.cs b/src/Umbraco.Tests/Membership/UmbracoServiceMembershipProviderTests.cs index 72900351b2..0f37a4aa26 100644 --- a/src/Umbraco.Tests/Membership/UmbracoServiceMembershipProviderTests.cs +++ b/src/Umbraco.Tests/Membership/UmbracoServiceMembershipProviderTests.cs @@ -1,6 +1,4 @@ -using System; -using System.Collections.Specialized; -using System.Configuration.Provider; +using System.Collections.Specialized; using System.Web.Security; using Moq; using NUnit.Framework; @@ -83,10 +81,10 @@ namespace Umbraco.Tests.Membership mServiceMock.Setup(service => service.GetByEmail("test@test.com")).Returns(() => null); mServiceMock.Setup(service => service.GetDefaultMemberType()).Returns("Member"); mServiceMock.Setup( - service => service.CreateWithIdentity(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) - .Callback((string u, string e, string p, string m) => + service => service.CreateWithIdentity(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) + .Callback((string u, string e, string p, string m, bool isApproved) => { - createdMember = new Member("test", e, u, p, memberType); + createdMember = new Member("test", e, u, p, memberType, isApproved); }) .Returns(() => createdMember); var provider = new MembersMembershipProvider(mServiceMock.Object); @@ -114,10 +112,10 @@ namespace Umbraco.Tests.Membership mServiceMock.Setup(service => service.GetByEmail("test@test.com")).Returns(() => null); mServiceMock.Setup(service => service.GetDefaultMemberType()).Returns("Member"); mServiceMock.Setup( - service => service.CreateWithIdentity(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) - .Callback((string u, string e, string p, string m) => + service => service.CreateWithIdentity(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) + .Callback((string u, string e, string p, string m, bool isApproved) => { - createdMember = new Member("test", e, u, p, memberType); + createdMember = new Member("test", e, u, p, memberType, isApproved); }) .Returns(() => createdMember); @@ -147,10 +145,10 @@ namespace Umbraco.Tests.Membership mServiceMock.Setup(service => service.GetByEmail("test@test.com")).Returns(() => null); mServiceMock.Setup(service => service.GetDefaultMemberType()).Returns("Member"); mServiceMock.Setup( - service => service.CreateWithIdentity(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) - .Callback((string u, string e, string p, string m) => + service => service.CreateWithIdentity(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) + .Callback((string u, string e, string p, string m, bool isApproved) => { - createdMember = new Member("test", e, u, p, memberType); + createdMember = new Member("test", e, u, p, memberType, isApproved); }) .Returns(() => createdMember); diff --git a/src/Umbraco.Tests/PublishedContent/PublishedContentTests.cs b/src/Umbraco.Tests/PublishedContent/PublishedContentTests.cs index 3967afce79..e9af22b968 100644 --- a/src/Umbraco.Tests/PublishedContent/PublishedContentTests.cs +++ b/src/Umbraco.Tests/PublishedContent/PublishedContentTests.cs @@ -44,11 +44,11 @@ namespace Umbraco.Tests.PublishedContent var propertyTypes = new[] { // AutoPublishedContentType will auto-generate other properties - new PublishedPropertyType("umbracoNaviHide", 0, Constants.PropertyEditors.TrueFalseAlias), - new PublishedPropertyType("selectedNodes", 0, "?"), - new PublishedPropertyType("umbracoUrlAlias", 0, "?"), - new PublishedPropertyType("content", 0, Constants.PropertyEditors.TinyMCEAlias), - new PublishedPropertyType("testRecursive", 0, "?"), + new PublishedPropertyType("umbracoNaviHide", 0, Constants.PropertyEditors.TrueFalseAlias), + new PublishedPropertyType("selectedNodes", 0, "?"), + new PublishedPropertyType("umbracoUrlAlias", 0, "?"), + new PublishedPropertyType("content", 0, Constants.PropertyEditors.TinyMCEAlias), + new PublishedPropertyType("testRecursive", 0, "?"), }; var compositionAliases = new[] {"MyCompositionAlias"}; var type = new AutoPublishedContentType(0, "anything", compositionAliases, propertyTypes); @@ -73,7 +73,7 @@ namespace Umbraco.Tests.PublishedContent protected override string GetXmlContent(int templateId) { return @" - @@ -87,17 +87,17 @@ namespace Umbraco.Tests.PublishedContent This is some content]]> - + - + - + 1 @@ -211,8 +211,8 @@ namespace Umbraco.Tests.PublishedContent [PublishedContentModel("Home")] internal class Home : PublishedContentModel { - public Home(IPublishedContent content) - : base(content) + public Home(IPublishedContent content) + : base(content) {} } @@ -659,6 +659,28 @@ namespace Umbraco.Tests.PublishedContent Assert.AreEqual((int)1178, (int)result.Id); } + [Test] + public void GetKey() + { + var key = Guid.Parse("CDB83BBC-A83B-4BA6-93B8-AADEF67D3C09"); + + // doc is Home (a model) and GetKey unwraps and works + var doc = GetNode(1176); + Assert.IsInstanceOf(doc); + Assert.AreEqual(key, doc.GetKey()); + + // wrapped is PublishedContentWrapped and WithKey unwraps + var wrapped = new TestWrapped(doc); + Assert.AreEqual(key, wrapped.GetKey()); + } + + class TestWrapped : PublishedContentWrapped + { + public TestWrapped(IPublishedContent content) + : base(content) + { } + } + [Test] public void DetachedProperty1() { diff --git a/src/Umbraco.Web.UI.Client/src/common/filters/preserveNewLineInHtml.filter.js b/src/Umbraco.Web.UI.Client/src/common/filters/preserveNewLineInHtml.filter.js new file mode 100644 index 0000000000..8105282020 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/common/filters/preserveNewLineInHtml.filter.js @@ -0,0 +1,15 @@ +/** +* @ngdoc filter +* @name umbraco.filters.preserveNewLineInHtml +* @description +* Used when rendering a string as HTML (i.e. with ng-bind-html) to convert line-breaks to
tags +**/ +angular.module("umbraco.filters").filter('preserveNewLineInHtml', function () { + return function (text) { + if (!text) { + return ''; + } + return text.replace(/\n/g, '
'); + }; +}); + \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/common/services/listviewhelper.service.js b/src/Umbraco.Web.UI.Client/src/common/services/listviewhelper.service.js index 0bdc3bb524..84bb4333a2 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/listviewhelper.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/listviewhelper.service.js @@ -269,12 +269,12 @@ var isSelected = false; for (var i = 0; selection.length > i; i++) { var selectedItem = selection[i]; - if (item.id === selectedItem.id) { + if (item.id === selectedItem.id || item.key === selectedItem.key) { isSelected = true; } } if (!isSelected) { - selection.push({ id: item.id }); + selection.push({ id: item.id, key: item.key }); item.selected = true; } } diff --git a/src/Umbraco.Web.UI.Client/src/installer/steps/database.controller.js b/src/Umbraco.Web.UI.Client/src/installer/steps/database.controller.js index 5b3e174930..c4ac65bff1 100644 --- a/src/Umbraco.Web.UI.Client/src/installer/steps/database.controller.js +++ b/src/Umbraco.Web.UI.Client/src/installer/steps/database.controller.js @@ -1,28 +1,35 @@ angular.module("umbraco.install").controller("Umbraco.Installer.DataBaseController", function($scope, $http, installerService){ $scope.checking = false; + $scope.invalidDbDns = false; + $scope.dbs = [ - {name: 'Microsoft SQL Server Compact (SQL CE)', id: 0}, - {name: 'Microsoft SQL Server', id: 1}, - { name: 'Microsoft SQL Azure', id: 3 }, - { name: 'MySQL', id: 2 }, - {name: 'Custom connection string', id: -1}]; + { name: 'Microsoft SQL Server Compact (SQL CE)', id: 0}, + { name: 'Microsoft SQL Server', id: 1}, + { name: 'Microsoft SQL Azure', id: 3 }, + { name: 'MySQL', id: 2 }, + { name: 'Custom connection string', id: -1} + ]; - if(installerService.status.current.model.dbType === undefined){ + if ( installerService.status.current.model.dbType === undefined ) { installerService.status.current.model.dbType = 0; } - $scope.validateAndForward = function(){ - if(!$scope.checking && this.myForm.$valid){ + $scope.validateAndForward = function(){ + if ( !$scope.checking && this.myForm.$valid ) { $scope.checking = true; + $scope.invalidDbDns = false; + var model = installerService.status.current.model; - $http.post(Umbraco.Sys.ServerVariables.installApiBaseUrl + "PostValidateDatabaseConnection", - model).then(function(response){ + $http.post( + Umbraco.Sys.ServerVariables.installApiBaseUrl + "PostValidateDatabaseConnection", + model ).then( function( response ) { - if(response.data === "true"){ + if ( response.data === "true" ) { installerService.forward(); - }else{ + } + else { $scope.invalidDbDns = true; } @@ -33,4 +40,4 @@ angular.module("umbraco.install").controller("Umbraco.Installer.DataBaseControll }); } }; -}); \ No newline at end of file +}); diff --git a/src/Umbraco.Web.UI.Client/src/installer/steps/starterkit.html b/src/Umbraco.Web.UI.Client/src/installer/steps/starterkit.html index 6ccf99be7f..0b9e22a0f3 100644 --- a/src/Umbraco.Web.UI.Client/src/installer/steps/starterkit.html +++ b/src/Umbraco.Web.UI.Client/src/installer/steps/starterkit.html @@ -1,16 +1,23 @@
-

Would you like to learn or demo Umbraco?

+

Install a starter website

+ +

+ Installing a starter website helps you learn how Umbraco works, and gives you a solid + and simple foundation to build on top of. +

+ + Loading... + + - {{pck.name}} -

The Starter Kit is a great way to experience some of the ways you can use Umbraco. It's a complete website with textpages, landing pages, blog, product listings and more that's easy to get started with Umbraco. -

-

- It's also a great way to learn Umbraco as the Starter Kit comes with a set of Lessons that'll teach you how to implement and extend Umbraco using short 5-15 minute tasks. -

-

- Yes, I'd like a Starter Kit -   - No thanks + No thanks, I do not want to install a starter website -

\ No newline at end of file + diff --git a/src/Umbraco.Web.UI.Client/src/less/forms.less b/src/Umbraco.Web.UI.Client/src/less/forms.less index 869d0b7740..480b96b804 100644 --- a/src/Umbraco.Web.UI.Client/src/less/forms.less +++ b/src/Umbraco.Web.UI.Client/src/less/forms.less @@ -66,8 +66,9 @@ label.control-label, .control-label { } .form-search .icon, .form-search .icon-search { position: absolute; + z-index: 1; top: 6px; - left: 4px; + left: 6px; color: @gray-8; } @@ -86,6 +87,9 @@ label.control-label, .control-label { background: @white } +.form-search .icon-search + .search-input { + padding-left: 25px !important; +} .form-search .search-input { font-weight: bold; @@ -191,7 +195,7 @@ input[type="tel"], input[type="color"], .uneditable-input { display: inline-block; - height: 30px; + height: @inputHeight; padding: 4px 6px; margin-bottom: @baseLineHeight / 2; font-size: @baseFontSize; @@ -206,7 +210,6 @@ input.-full-width-input { width: 100%; box-sizing: border-box; padding: 4px 6px; - height: 30px; } // Reset appearance properties for textual inputs and textarea @@ -579,9 +582,9 @@ input[type="checkbox"][readonly] { .add-on { display: inline-block; width: auto; - height: @baseLineHeight; - min-width: 16px; - padding: 4px 5px; + height: 22px; + min-width: 18px; + padding: 4px 6px; font-size: @baseFontSize; font-weight: normal; line-height: @baseLineHeight; @@ -653,29 +656,21 @@ input.search-query { padding-left: 14px; padding-left: 4px \9; /* IE7-8 doesn't have border-radius, so don't indent the padding */ margin: 0; // Remove the default margin on all inputs - .border-radius(0px); } /* Allow for input prepend/append in search forms */ -.form-search .input-append .search-query, -.form-search .input-prepend .search-query { - .border-radius(0); // Override due to specificity +.form-search { + .input-prepend { + .btn { + .border-radius(0 @borderRadiusSmall @borderRadiusSmall 0); + } + } + .input-append { + .btn { + .border-radius(0 @borderRadiusSmall @borderRadiusSmall 0); + } + } } -.form-search .input-append .search-query { - .border-radius(14px 0 0 14px); -} -.form-search .input-append .btn { - .border-radius(0 14px 14px 0); -} -.form-search .input-prepend .search-query { - .border-radius(0 14px 14px 0); -} -.form-search .input-prepend .btn { - .border-radius(14px 0 0 14px); -} - - - // HORIZONTAL & VERTICAL FORMS // --------------------------- diff --git a/src/Umbraco.Web.UI.Client/src/less/main.less b/src/Umbraco.Web.UI.Client/src/less/main.less index 1b573bbe0b..222fa2474e 100644 --- a/src/Umbraco.Web.UI.Client/src/less/main.less +++ b/src/Umbraco.Web.UI.Client/src/less/main.less @@ -47,10 +47,25 @@ h5.-black { background: none; border: none } -.datepicker td.active, -.datepicker td span.active { - background: @turquoise !important; +.bootstrap-datetimepicker-widget { + td { + &.active, span.active { + background: @turquoise !important; + } + &.today:not(.active):before { + border-bottom-color: @purple-l1 !important; + } + a[data-action] { + padding: 0 !important; + } + .timepicker-hour, + .timepicker-minute, + .timepicker-second { + margin: 8px 0; + } + } } + .umb-datetime-picker div.info { vertical-align: middle } diff --git a/src/Umbraco.Web.UI.Client/src/less/panel.less b/src/Umbraco.Web.UI.Client/src/less/panel.less index 6bc2a2b2de..7c18b79c81 100644 --- a/src/Umbraco.Web.UI.Client/src/less/panel.less +++ b/src/Umbraco.Web.UI.Client/src/less/panel.less @@ -446,8 +446,8 @@ input.umb-panel-header-name-input { margin-bottom: 0; font-weight: bold; box-sizing: border-box; - height: 30px; - line-height: 30px; + height: 32px; + line-height: 32px; width: 100%; &:hover { background: @white; diff --git a/src/Umbraco.Web.UI.Client/src/less/sections.less b/src/Umbraco.Web.UI.Client/src/less/sections.less index 51ec5c7436..d73e24e4ea 100644 --- a/src/Umbraco.Web.UI.Client/src/less/sections.less +++ b/src/Umbraco.Web.UI.Client/src/less/sections.less @@ -7,7 +7,7 @@ ul.sections { background: @purple; height: 100%; width: 80px; - border-right: 1px solid @purple; + border-right: 1px solid @purple-d1; } ul.sections li { @@ -22,13 +22,16 @@ ul.sections li [class^="icon-"], ul.sections li [class*=" icon-"], ul.sections li img.icon-section { font-size: 30px; - line-height: 20px; /* set line-height to ensure all icons use same line-height */ display: inline-block; margin: 1px 0 0 0; color: @purple-l2; -webkit-transition: all .3s linear; -moz-transition: all .3s linear; transition: all .3s linear; + + &, &:before { + line-height: 20px !important; /* set line-height to ensure all icons use same line-height */ + } } ul.sections:hover li [class^="icon-"], @@ -168,7 +171,7 @@ ul.sections-tray { width: 80px; & > li:first-child > a { - border-top: 1px solid @purple; + border-top: 1px solid @purple-d1; } & > li { diff --git a/src/Umbraco.Web.UI.Client/src/less/variables.less b/src/Umbraco.Web.UI.Client/src/less/variables.less index c173f122cb..666941b914 100644 --- a/src/Umbraco.Web.UI.Client/src/less/variables.less +++ b/src/Umbraco.Web.UI.Client/src/less/variables.less @@ -190,7 +190,7 @@ @inputBorderRadius: 0; @inputDisabledBackground: @gray-10; @formActionsBackground: @gray-9; -@inputHeight: @baseLineHeight + 10px; // base line-height + 8px vertical padding + 2px top/bottom border +@inputHeight: @baseLineHeight + 12px; // base line-height + 8px vertical padding + 2px top/bottom border @controlRequiredColor: @red; diff --git a/src/Umbraco.Web.UI.Client/src/views/common/dialogs/rteembed.html b/src/Umbraco.Web.UI.Client/src/views/common/dialogs/rteembed.html index 9acb92401b..7bf24c086f 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/dialogs/rteembed.html +++ b/src/Umbraco.Web.UI.Client/src/views/common/dialogs/rteembed.html @@ -2,13 +2,13 @@
- -
-
-
-
- -
- - Yes, remove paragraph tags -
-
-
-
diff --git a/src/Umbraco.Web.UI.Client/src/views/common/overlays/mediaPicker/mediapicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/overlays/mediaPicker/mediapicker.controller.js index 1992bed068..fb38581eac 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/overlays/mediaPicker/mediapicker.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/common/overlays/mediaPicker/mediapicker.controller.js @@ -1,7 +1,7 @@ //used for the media picker dialog angular.module("umbraco") .controller("Umbraco.Overlays.MediaPickerController", - function ($scope, mediaResource, umbRequestHelper, entityResource, $log, mediaHelper, mediaTypeHelper, eventsService, treeService, $element, $timeout, $cookies, localStorageService, localizationService) { + function($scope, mediaResource, umbRequestHelper, entityResource, $log, mediaHelper, mediaTypeHelper, eventsService, treeService, $element, $timeout, $cookies, localStorageService, localizationService) { if (!$scope.model.title) { $scope.model.title = localizationService.localize("defaultdialogs_selectMedia"); @@ -96,7 +96,6 @@ angular.module("umbraco") }; $scope.gotoFolder = function(folder) { - if (!$scope.multiPicker) { deselectAllImages($scope.model.selectedImages); } @@ -108,7 +107,6 @@ angular.module("umbraco") if (folder.id > 0) { entityResource.getAncestors(folder.id, "media") .then(function(anc) { - // anc.splice(0,1); $scope.path = _.filter(anc, function(f) { return f.path.indexOf($scope.startNodeId) !== -1; @@ -123,12 +121,12 @@ angular.module("umbraco") $scope.path = []; } - getChildren(folder.id); $scope.currentFolder = folder; localStorageService.set("umbLastOpenedMediaNodeId", folder.id); + return getChildren(folder.id); }; - $scope.clickHandler = function (image, event, index) { + $scope.clickHandler = function(image, event, index) { if (image.isFolder) { if ($scope.disableFolderSelect) { $scope.gotoFolder(image); @@ -143,7 +141,7 @@ angular.module("umbraco") $scope.target = image; // handle both entity and full media object - if(image.image) { + if (image.image) { $scope.target.url = image.image; } else { $scope.target.url = mediaHelper.resolveFile(image); @@ -188,8 +186,12 @@ angular.module("umbraco") images.length = 0; } - $scope.onUploadComplete = function() { - $scope.gotoFolder($scope.currentFolder); + $scope.onUploadComplete = function(files) { + $scope.gotoFolder($scope.currentFolder).then(function() { + if (files.length === 1 && $scope.model.selectedImages.length === 0) { + selectImage($scope.images[$scope.images.length - 1]); + } + }); }; $scope.onFilesQueue = function() { @@ -203,8 +205,7 @@ angular.module("umbraco") if (nodePath.indexOf($scope.startNodeId.toString()) !== -1) { $scope.gotoFolder({ id: $scope.lastOpenedNode, name: "Media", icon: "icon-folder" }); return true; - } - else { + } else { $scope.gotoFolder({ id: $scope.startNodeId, name: "Media", icon: "icon-folder" }); return false; } @@ -219,26 +220,25 @@ angular.module("umbraco") if ($scope.lastOpenedNode && $scope.lastOpenedNode !== -1) { entityResource.getById($scope.lastOpenedNode, "media") .then(ensureWithinStartNode, gotoStartNode); - } - else { + } else { gotoStartNode(); } - } - else { + } else { //if a target is specified, go look it up - generally this target will just contain ids not the actual full //media object so we need to look it up var id = $scope.target.udi ? $scope.target.udi : $scope.target.id var altText = $scope.target.altText; mediaResource.getById(id) - .then(function (node) { - $scope.target = node; - if (ensureWithinStartNode(node)) { - selectImage(node); - $scope.target.url = mediaHelper.resolveFile(node); - $scope.target.altText = altText; - $scope.openDetailsDialog(); - } - }, gotoStartNode); + .then(function(node) { + $scope.target = node; + if (ensureWithinStartNode(node)) { + selectImage(node); + $scope.target.url = mediaHelper.resolveFile(node); + $scope.target.altText = altText; + $scope.openDetailsDialog(); + } + }, + gotoStartNode); } $scope.openDetailsDialog = function() { @@ -260,6 +260,24 @@ angular.module("umbraco") }; }; + var debounceSearchMedia = _.debounce(function() { + $scope.$apply(function() { + if ($scope.searchOptions.filter) { + searchMedia(); + } else { + // reset pagination + $scope.searchOptions = { + pageNumber: 1, + pageSize: 100, + totalItems: 0, + totalPages: 0, + filter: '' + }; + getChildren($scope.currentFolder.id); + } + }); + }, 500); + $scope.changeSearch = function() { $scope.loading = true; debounceSearchMedia(); @@ -271,50 +289,33 @@ angular.module("umbraco") searchMedia(); }; - var debounceSearchMedia = _.debounce(function () { - $scope.$apply(function () { - if ($scope.searchOptions.filter) { - searchMedia(); - } else { - // reset pagination - $scope.searchOptions = { - pageNumber: 1, - pageSize: 100, - totalItems: 0, - totalPages: 0, - filter: '' - }; - getChildren($scope.currentFolder.id); - } - }); - }, 500); - function searchMedia() { $scope.loading = true; entityResource.getPagedDescendants($scope.startNodeId, "Media", $scope.searchOptions) - .then(function (data) { + .then(function(data) { // update image data to work with image grid - angular.forEach(data.items, function(mediaItem){ - // set thumbnail and src - mediaItem.thumbnail = mediaHelper.resolveFileFromEntity(mediaItem, true); - mediaItem.image = mediaHelper.resolveFileFromEntity(mediaItem, false); - // set properties to match a media object - if (mediaItem.metaData && - mediaItem.metaData.umbracoWidth && - mediaItem.metaData.umbracoHeight) { - - mediaItem.properties = [ - { - alias: "umbracoWidth", - value: mediaItem.metaData.umbracoWidth.Value - }, - { - alias: "umbracoHeight", - value: mediaItem.metaData.umbracoHeight.Value - } - ]; - } - }); + angular.forEach(data.items, + function(mediaItem) { + // set thumbnail and src + mediaItem.thumbnail = mediaHelper.resolveFileFromEntity(mediaItem, true); + mediaItem.image = mediaHelper.resolveFileFromEntity(mediaItem, false); + // set properties to match a media object + if (mediaItem.metaData && + mediaItem.metaData.umbracoWidth && + mediaItem.metaData.umbracoHeight) { + + mediaItem.properties = [ + { + alias: "umbracoWidth", + value: mediaItem.metaData.umbracoWidth.Value + }, + { + alias: "umbracoHeight", + value: mediaItem.metaData.umbracoHeight.Value + } + ]; + } + }); // update images $scope.images = data.items ? data.items : []; // update pagination @@ -332,7 +333,7 @@ angular.module("umbraco") function getChildren(id) { $scope.loading = true; - mediaResource.getChildren(id) + return mediaResource.getChildren(id) .then(function(data) { $scope.searchOptions.filter = ""; $scope.images = data.items ? data.items : []; @@ -358,11 +359,10 @@ angular.module("umbraco") } } } - if (imageIsSelected) { folderImage.selected = true; } } } - }); + }); \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/views/common/overlays/mediaPicker/mediapicker.html b/src/Umbraco.Web.UI.Client/src/views/common/overlays/mediaPicker/mediapicker.html index c99238f2e3..ab745f0f75 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/overlays/mediaPicker/mediapicker.html +++ b/src/Umbraco.Web.UI.Client/src/views/common/overlays/mediaPicker/mediapicker.html @@ -28,8 +28,7 @@
diff --git a/src/Umbraco.Web.UI.Client/src/views/components/property/umb-property.html b/src/Umbraco.Web.UI.Client/src/views/components/property/umb-property.html index b24e0985af..24bc1de6ed 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/property/umb-property.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/property/umb-property.html @@ -11,7 +11,7 @@ * - +
diff --git a/src/Umbraco.Web.UI.Client/src/views/member/create.html b/src/Umbraco.Web.UI.Client/src/views/member/create.html index 2ef2b5f04f..188c6214eb 100644 --- a/src/Umbraco.Web.UI.Client/src/views/member/create.html +++ b/src/Umbraco.Web.UI.Client/src/views/member/create.html @@ -20,7 +20,7 @@
diff --git a/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/textstring.html b/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/textstring.html index 8fcfc8b5c6..a394bdefe4 100644 --- a/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/textstring.html +++ b/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/textstring.html @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/treepicker.html b/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/treepicker.html index 1ffa878818..5ec114fc19 100644 --- a/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/treepicker.html +++ b/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/treepicker.html @@ -4,7 +4,7 @@ ng-model="renderModel">
  • - + {{node.name}} diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.prevalues.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.prevalues.html index ca422000c3..06bdfe2e99 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.prevalues.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.prevalues.html @@ -9,30 +9,29 @@ ui-sortable ng-model="model.value.templates"> -
  • +
  • + class="preview-rows layout" style="margin-top: 5px; margin-bottom: 20px; float:left">
    + ng-class="{last:$last}" + ng-repeat="section in template.sections | filter:zeroWidthFilter" + ng-style="{width: percentage(section.grid) + '%', height: '60px', 'max-width': '100%'}">
    - {{template.name}}
    + {{template.name}}
    -
  • @@ -55,7 +54,7 @@ ui-sortable ng-model="model.value.layouts"> -
  • +
  • @@ -64,7 +63,7 @@
    + ng-style="{width: percentage(area.grid) + '%', 'max-width': '100%'}">
    @@ -79,12 +78,11 @@
    -
  • @@ -98,7 +96,7 @@ - + + ng-model="model.value.config">
  • @@ -133,8 +131,11 @@ - -
      + +
        diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js index f4068c0f02..8f9279fb02 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js @@ -20,8 +20,7 @@ function listViewController($rootScope, $scope, $routeParams, $injector, $cookie getListResultsCallback = contentResource.getPagedResults; deleteItemCallback = contentResource.deleteByKey; getIdCallback = function (selected) { - var selectedKey = getItemKey(selected.id); - return selectedKey; + return selected.key; }; createEditUrlCallback = function (item) { return "/" + $scope.entityType + "/" + $scope.entityType + "/edit/" + item.key + "?page=" + $scope.options.pageNumber + "&listName=" + $scope.contentId; diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/textarea/textarea.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/textarea/textarea.controller.js new file mode 100644 index 0000000000..2d4e114dcf --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/textarea/textarea.controller.js @@ -0,0 +1,26 @@ +function textAreaController($rootScope, $scope, $log) { + $scope.model.maxlength = false; + if($scope.model.config.maxChars) { + $scope.model.maxlength = true; + if($scope.model.value == undefined) { + $scope.model.count = ($scope.model.config.maxChars * 1); + } else { + $scope.model.count = ($scope.model.config.maxChars * 1) - $scope.model.value.length; + } + } + + $scope.model.change = function() { + if($scope.model.config.maxChars) { + if($scope.model.value == undefined) { + $scope.model.count = ($scope.model.config.maxChars * 1); + } else { + $scope.model.count = ($scope.model.config.maxChars * 1) - $scope.model.value.length; + } + if($scope.model.count < 0) { + $scope.model.value = $scope.model.value.substring(0, ($scope.model.config.maxChars * 1)); + $scope.model.count = 0; + } + } + } +} +angular.module('umbraco').controller("Umbraco.PropertyEditors.textAreaController", textAreaController); \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/textarea/textarea.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/textarea/textarea.html index aba4c52ed3..ffb692ced0 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/textarea/textarea.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/textarea/textarea.html @@ -1,3 +1,9 @@ - -Required - +
        + + Required + +
        + {{model.count}} + characters left +
        +
        \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/textbox/textbox.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/textbox/textbox.controller.js new file mode 100644 index 0000000000..03f7510112 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/textbox/textbox.controller.js @@ -0,0 +1,26 @@ +function textboxController($rootScope, $scope, $log) { + $scope.model.maxlength = false; + if($scope.model.config.maxChars) { + $scope.model.maxlength = true; + if($scope.model.value == undefined) { + $scope.model.count = ($scope.model.config.maxChars * 1); + } else { + $scope.model.count = ($scope.model.config.maxChars * 1) - $scope.model.value.length; + } + } + + $scope.model.change = function() { + if($scope.model.config.maxChars) { + if($scope.model.value == undefined) { + $scope.model.count = ($scope.model.config.maxChars * 1); + } else { + $scope.model.count = ($scope.model.config.maxChars * 1) - $scope.model.value.length; + } + if($scope.model.count < 0) { + $scope.model.value = $scope.model.value.substring(0, ($scope.model.config.maxChars * 1)); + $scope.model.count = 0; + } + } + } +} +angular.module('umbraco').controller("Umbraco.PropertyEditors.textboxController", textboxController); \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/textbox/textbox.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/textbox/textbox.html index 1848574f8b..d8c51ce9e0 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/textbox/textbox.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/textbox/textbox.html @@ -1,9 +1,14 @@ -
        +
        + ng-trim="false" + ng-keyup="model.change()" /> Required -
        +
        + {{model.count}} + characters left +
        +
        \ No newline at end of file diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj index 7c634a376e..4228baf532 100644 --- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj +++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj @@ -568,6 +568,8 @@ + + @@ -2378,9 +2380,9 @@ xcopy "$(ProjectDir)"..\packages\SqlServerCE.4.0.0.1\x86\*.* "$(TargetDir)x86\" True True - 7640 + 7650 / - http://localhost:7640 + http://localhost:7650 False False diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Breadcrumb.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Breadcrumb.cshtml old mode 100644 new mode 100755 index ff63081996..5dd44df7f9 --- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Breadcrumb.cshtml +++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Breadcrumb.cshtml @@ -1,13 +1,13 @@ @inherits Umbraco.Web.Macros.PartialViewMacroPage @* - This snippet makes a breadcrumb of parents using an unordered html list. + This snippet makes a breadcrumb of parents using an unordered HTML list. How it works: - It uses the Ancestors() method to get all parents and then generates links so the visitor can go back - Finally it outputs the name of the current page (without a link) *@ -@{ var selection = CurrentPage.Ancestors(); } +@{ var selection = Model.Content.Ancestors(); } @if (selection.Any()) { @@ -19,6 +19,6 @@ } @* Display the current page as the last item in the list *@ -
      • @CurrentPage.Name
      • +
      • @Model.Content.Name
      } \ No newline at end of file diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Gallery.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Gallery.cshtml old mode 100644 new mode 100755 index f7c5954c5a..7ed0e01680 --- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Gallery.cshtml +++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Gallery.cshtml @@ -1,50 +1,50 @@ @inherits Umbraco.Web.Macros.PartialViewMacroPage @* - Macro to display a gallery of images from media the media section. + Macro to display a gallery of images from the Media section. Works with either a 'Single Media Picker' or a 'Multiple Media Picker' macro parameter (see below). How it works: - Confirm the macro parameter has been passed in with a value - - Loop through all the media Id's passed in (might be a single item, might be many) + - Loop through all the media Ids passed in (might be a single item, might be many) - Display any individual images, as well as any folders of images Macro Parameters To Create, for this macro to work: Alias:mediaIds Name:Select folders and/or images Type: Multiple Media Picker - Type: (note: you can use a Single Media Picker if that's more appropriate to your needs) + Type: (note: You can use a Single Media Picker if that's more appropriate to your needs) *@ -@{ var mediaIds = Model.MacroParameters["mediaIds"]; } +@{ var mediaIds = Model.MacroParameters["mediaIds"] as string; } + @if (mediaIds != null) { -
        - @foreach (var mediaId in mediaIds.ToString().Split(',')) +
        + @foreach (var mediaId in mediaIds.Split(',')) { - var media = Umbraco.Media(mediaId); + var media = Umbraco.TypedMedia(mediaId); @* a single image *@ if (media.DocumentTypeAlias == "Image") { - @Render(media); + @Render(media as Image); } @* a folder with images under it *@ - if (media.Children("Image").Any()) + if (media.Children().Any()) { - foreach (var image in media.Children("Image")) + foreach (var image in media.Children()) { @Render(image); } } - } -
      +
  • } -@helper Render(dynamic item) +@helper Render(Image item) { -
  • - - @item.Name +
  • +
    } \ No newline at end of file diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListAncestorsFromCurrentPage.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListAncestorsFromCurrentPage.cshtml old mode 100644 new mode 100755 index b7ca9d06e4..8d4d897b89 --- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListAncestorsFromCurrentPage.cshtml +++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListAncestorsFromCurrentPage.cshtml @@ -1,24 +1,24 @@ @inherits Umbraco.Web.Macros.PartialViewMacroPage @* - This snippet makes a list of links to the of parents of the current page using an unordered html list. + This snippet makes a list of links to the of parents of the current page using an unordered HTML list. How it works: - It uses the Ancestors() method to get all parents and then generates links so the visitor can go back - Finally it outputs the name of the current page (without a link) *@ -@{ var selection = CurrentPage.Ancestors(); } +@{ var selection = Model.Content.Ancestors(); } @if (selection.Any()) {
      @* For each page in the ancestors collection which have been ordered by Level (so we start with the highest top node first) *@ - @foreach (var item in selection.OrderBy("Level")) + @foreach (var item in selection.OrderBy(x => x.Level)) {
    • @item.Name »
    • } @* Display the current page as the last item in the list *@ -
    • @CurrentPage.Name
    • +
    • @Model.Content.Name
    } diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesFromChangeableSource.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesFromChangeableSource.cshtml old mode 100644 new mode 100755 index 2fa2aab07c..3af1291be4 --- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesFromChangeableSource.cshtml +++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesFromChangeableSource.cshtml @@ -13,20 +13,19 @@ *@ @{ var startNodeId = Model.MacroParameters["startNodeId"]; } + @if (startNodeId != null) { @* Get the starting page *@ - var startNode = Umbraco.Content(startNodeId); - var selection = startNode.Children.Where("Visible"); + var startNode = Umbraco.TypedContent(startNodeId); + var selection = startNode.Children.Where(x => x.IsVisible()); if (selection.Any()) { } diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesFromCurrentPage.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesFromCurrentPage.cshtml old mode 100644 new mode 100755 index 9bd13f68a2..09144cff47 --- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesFromCurrentPage.cshtml +++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesFromCurrentPage.cshtml @@ -1,6 +1,14 @@ @inherits Umbraco.Web.Macros.PartialViewMacroPage -@{ var selection = CurrentPage.Children.Where("Visible"); } +@* + This snippet makes a list of links to the of children of the current page using an unordered HTML list. + + How it works: + - It uses the Children method to get all child pages + - It then generates links so the visitor can go to each page +*@ + +@{ var selection = Model.Content.Children.Where(x => x.IsVisible()); } @if (selection.Any()) { diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesOrderedByDate.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesOrderedByDate.cshtml old mode 100644 new mode 100755 index c8cbdf7d32..5cd74a62f9 --- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesOrderedByDate.cshtml +++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesOrderedByDate.cshtml @@ -1,11 +1,22 @@ @inherits Umbraco.Web.Macros.PartialViewMacroPage -@{ var selection = CurrentPage.Children.Where("Visible").OrderBy("CreateDate desc"); } -@* OrderBy() takes the property to sort by and optionally order desc/asc *@ +@* + This snippet makes a list of links to the of children of the current page using an unordered HTML list. -
      - @foreach (var item in selection) - { -
    • @item.Name
    • - } -
    + How it works: + - It uses the Children method to get all child pages + - It then uses the OrderByDescending() method, which takes the property to sort. In this case the page's creation date. + - It then generates links so the visitor can go to each page +*@ + +@{ var selection = Model.Content.Children.Where(x => x.IsVisible()).OrderByDescending(x => x.CreateDate); } + +@if (selection.Any()) +{ +
      + @foreach (var item in selection) + { +
    • @item.Name
    • + } +
    +} diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesOrderedByName.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesOrderedByName.cshtml old mode 100644 new mode 100755 index da73ff8164..643855006f --- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesOrderedByName.cshtml +++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesOrderedByName.cshtml @@ -1,11 +1,22 @@ @inherits Umbraco.Web.Mvc.UmbracoTemplatePage -@{ var selection = CurrentPage.Children.Where("Visible").OrderBy("Name"); } -@* OrderBy() takes the property to sort by *@ +@* + This snippet makes a list of links to the of children of the current page using an unordered HTML list. -
      - @foreach (var item in selection) - { -
    • @item.Name
    • - } -
    + How it works: + - It uses the Children method to get all child pages + - It then uses the OrderBy() method, which takes the property to sort. In this case, the page's name. + - It then generates links so the visitor can go to each page +*@ + +@{ var selection = Model.Content.Children.Where(x => x.IsVisible()).OrderBy(x => x.Name); } + +@if (selection.Any()) +{ +
      + @foreach (var item in selection) + { +
    • @item.Name
    • + } +
    +} diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesOrderedByProperty.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesOrderedByProperty.cshtml old mode 100644 new mode 100755 index 436faf1ef5..e2eeb08204 --- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesOrderedByProperty.cshtml +++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesOrderedByProperty.cshtml @@ -15,12 +15,15 @@ @{ var propertyAlias = Model.MacroParameters["propertyAlias"]; } @if (propertyAlias != null) { - var selection = CurrentPage.Children.Where("Visible").OrderBy(propertyAlias); + var selection = Model.Content.Children.Where(x => x.IsVisible()).OrderBy(x => x.GetPropertyValue(propertyAlias.ToString())); -
      - @foreach (var item in selection) - { -
    • @item.Name
    • - } -
    + @if (selection.Any()) + { +
      + @foreach (var item in selection) + { +
    • @item.Name
    • + } +
    + } } diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesWithDoctype.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesWithDoctype.cshtml old mode 100644 new mode 100755 index 4ca6f93c71..9ac71a4fd2 --- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesWithDoctype.cshtml +++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesWithDoctype.cshtml @@ -1,17 +1,13 @@ @inherits Umbraco.Web.Macros.PartialViewMacroPage @* - This snippet shows how simple it is to fetch only children of a certain Document Type using Razor. - Be sure to change "DocumentTypeAlias" below to match your needs, such as "TextPage" or "NewsItems". + This snippet shows how simple it is to fetch only children of a certain Document Type. + + Be sure to change "IPublishedContent" below to match your needs, such as "TextPage" or "NewsItem". (You can find the alias of your Document Type by editing it in the Settings section) *@ -@{ var selection = CurrentPage.Children("DocumentTypeAlias").Where("Visible"); } -@* - As an example of more querying, if you have a true/false property with the alias of shouldBeFeatured: - var selection= CurrentPage.Children("DocumentTypeAlias").Where("shouldBeFeatured == true").Where("Visible"); -*@ - +@{ var selection = Model.Content.Children().Where(x => x.IsVisible()); } @if (selection.Any()) { diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListDescendantsFromCurrentPage.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListDescendantsFromCurrentPage.cshtml old mode 100644 new mode 100755 index 1e2274bcc0..e649328cfb --- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListDescendantsFromCurrentPage.cshtml +++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListDescendantsFromCurrentPage.cshtml @@ -2,27 +2,27 @@ @* This snippet creates links for every single page (no matter how deep) below - the page currently being viewed by the website visitor, displayed as nested unordered html lists. + the page currently being viewed by the website visitor, displayed as nested unordered HTML lists. *@ -@{ var selection = CurrentPage.Children.Where("Visible"); } +@{ var selection = Model.Content.Children.Where(x => x.IsVisible()); } @* Ensure that the Current Page has children *@ @if (selection.Any()) { @* Get the first page in the children, where the property umbracoNaviHide is not True *@ - var naviLevel = CurrentPage.FirstChild().Where("Visible").Level; + var naviLevel = Model.Content.FirstChild(x => x.IsVisible()).Level; @* Add in level for a CSS hook *@
      - @* For each child page where the property umbracoNaviHide is not True *@ + @* Loop through the selection *@ @foreach (var item in selection) {
    • @item.Name @* if this child page has any children, where the property umbracoNaviHide is not True *@ - @if (item.Children.Where("Visible").Any()) + @if (item.Children.Where(x => x.IsVisible()).Any()) { @* Call our helper to display the children *@ @childPages(item.Children) @@ -33,7 +33,7 @@ } -@helper childPages(dynamic selection) +@helper childPages(IEnumerable selection) { @* Ensure that we have a collection of pages *@ if (selection.Any()) @@ -43,13 +43,13 @@ @* Add in level for a CSS hook *@
        - @foreach (var item in selection.Where("Visible")) + @foreach (var item in selection.Where(x => x.IsVisible())) {
      • @item.Name @* if the this page has any children, where the property umbracoNaviHide is not True *@ - @if (item.Children.Where("Visible").Any()) + @if (item.Children.Where(x => x.IsVisible()).Any()) { @* Call our helper to display the children *@ @childPages(item.Children) diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListImagesFromMediaFolder.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListImagesFromMediaFolder.cshtml old mode 100644 new mode 100755 index 1549c1eed2..6e5d68b829 --- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListImagesFromMediaFolder.cshtml +++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListImagesFromMediaFolder.cshtml @@ -5,7 +5,7 @@ How it works: - Confirm the macro parameter has been passed in with a value - - Loop through all the media Id's passed in (might be a single item, might be many) + - Loop through all the media Ids passed in (might be a single item, might be many) - Display any individual images, as well as any folders of images Macro Parameters To Create, for this macro to work: @@ -15,9 +15,9 @@ @{ var mediaId = Model.MacroParameters["mediaId"]; } @if (mediaId != null) { - @* Get all the media item associated with the id passed in *@ - var media = Umbraco.Media(mediaId); - var selection = media.Children("Image"); + @* Get the media item associated with the id passed in *@ + var media = Umbraco.TypedMedia(mediaId); + var selection = media.Children(); if (selection.Any()) { @@ -25,7 +25,7 @@ @foreach (var item in selection) {
      • - @item.Name + @item.Name
      • }
      diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/MultinodeTree-picker.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/MultinodeTree-picker.cshtml old mode 100644 new mode 100755 index ae8e427449..379b5b0ea0 --- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/MultinodeTree-picker.cshtml +++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/MultinodeTree-picker.cshtml @@ -1,21 +1,23 @@ @inherits Umbraco.Web.Macros.PartialViewMacroPage @* - This snippet lists the items from a Multinode tree picker, using the pickers default settings. - Content Values stored as xml. + This snippet lists the items from a Multinode tree picker, using the picker's default settings. + Content Values stored as XML. To get it working with any site's data structure, set the selection equal to the property which has the multinode treepicker (so: replace "PropertyWithPicker" with the alias of your property). *@ -@{ var selection = CurrentPage.PropertyWithPicker.Split(','); } +@{ var selection = Model.Content.GetPropertyValue>("PropertyWithPicker"); } -
        - @foreach (var id in selection) - { - var item = Umbraco.Content(id); -
      • - @item.Name -
      • - } -
      \ No newline at end of file +@if (selection.Any()) +{ +
        + @foreach (var item in selection) + { +
      • + @item.Name +
      • + } +
      +} \ No newline at end of file diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Navigation.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Navigation.cshtml old mode 100644 new mode 100755 index f2a4920a12..94870a37c4 --- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Navigation.cshtml +++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Navigation.cshtml @@ -3,16 +3,19 @@ @* This snippet displays a list of links of the pages immediately under the top-most page in the content tree. This is the home page for a standard website. - It also highlights the current active page/section in the navigation with the css class "current". + It also highlights the current active page/section in the navigation with the CSS class "current". *@ -@{ var selection = CurrentPage.Site().Children.Where("Visible"); } +@{ var selection = Model.Content.Site().Children.Where(x => x.IsVisible()); } -
        - @foreach (var item in selection) - { -
      • - @item.Name -
      • - } -
      +@if (selection.Any()) +{ +
        + @foreach (var item in selection) + { +
      • + @item.Name +
      • + } +
      +} diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/SiteMap.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/SiteMap.cshtml old mode 100644 new mode 100755 index 0aef1eb3a4..7630b26ed1 --- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/SiteMap.cshtml +++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/SiteMap.cshtml @@ -1,13 +1,13 @@ @inherits Umbraco.Web.Macros.PartialViewMacroPage @* - This snippet makes a list of links of all visible pages of the site, as nested unordered html lists. + This snippet makes a list of links of all visible pages of the site, as nested unordered HTML lists. How it works: - It uses a custom Razor helper called Traverse() to select and display the markup and links. *@ -@{ var selection = CurrentPage.Site(); } +@{ var selection = Model.Content.Site(); }
      @* Render the sitemap by passing the root node to the traverse helper, below *@ @@ -15,14 +15,14 @@
      -@* Helper method to travers through all descendants *@ -@helper Traverse(dynamic node) +@* Helper method to traverse through all descendants *@ +@helper Traverse(IPublishedContent node) { @* Update the level to reflect how deep you want the sitemap to go *@ var maxLevelForSitemap = 4; @* Select visible children *@ - var selection = node.Children.Where("Visible").Where("Level <= " + maxLevelForSitemap); + var selection = node.Children.Where(x => x.IsVisible() && x.Level <= maxLevelForSitemap); @* If any items are returned, render a list *@ if (selection.Any()) diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/cs.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/cs.xml index 3ee2c563f7..5ca5078e72 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/cs.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/cs.xml @@ -911,8 +911,6 @@ Vložit za polem Vložit před polem Rekurzivní - Odstranit tagy odstavce - Odstraní jakékoliv &lt;P&gt; na začátku a na konci textu Standardní pole Velká písmena Kódování URL diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/nb.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/nb.xml index e20bbf57e5..c6c6093395 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/nb.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/nb.xml @@ -884,8 +884,6 @@ Vennlig hilsen Umbraco roboten Sett inn etter felt Sett inn før felt Rekursivt - Fjern paragraftagger - Fjerner eventuelle <P> rundt teksten Standardfelter Store bokstaver URL koding diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/zh_tw.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/zh_tw.xml new file mode 100644 index 0000000000..53e893ea23 --- /dev/null +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/zh_tw.xml @@ -0,0 +1,1356 @@ + + + + The Umbraco community + http://our.umbraco.org/documentation/Extending-Umbraco/Language-Files + + + 管理主機名稱 + 跟蹤審計 + 流覽節點 + 改變文檔類型 + 複製 + 創建 + 創建擴展包 + 刪除 + 禁用 + 清空回收站 + 匯出文檔類型 + 導入文檔類型 + 導入擴展包 + 即時編輯模式 + 退出 + 移動 + 提醒 + 公眾存取權限 + 發佈 + 取消發佈 + 重新載入節點 + 重新發佈整站 + 回復 + 許可權 + 回滾 + 提交至發佈者 + 發送給翻譯 + 排序 + 提交至發佈者 + 翻譯 + 更新 + 預設值 + + + 禁止訪問 + 添加功能變數名稱 + 移除 + 錯誤的節點 + 功能變數名稱錯誤 + 功能變數名稱重複 + 語言 + 功能變數名稱 + 新功能變數名稱 '%0%' 已創建 + 功能變數名稱 '%0%' 已刪除 + 功能變數名稱 '%0%' 已使用 + 功能變數名稱 '%0%' 已更新 + 編輯當前功能變數名稱 + + 繼承 + 語言 + 或從父節點繼承文化設定。
      + 也會改變目前節點設定,除非下方網域有其他項目。]]>
      + 功能變數名稱 + + + 查看 + + + 清除選擇 + 選擇 + 選擇目前資料夾 + 做別的事情 + 粗體 + 取消段落縮進 + 插入表單字段 + 插入圖片標題 + 編輯Html + 段落縮進 + 斜體 + 居中 + 左對齊 + 右對齊 + 插入連結 + 插入本地連結(錨點) + 圓點列表 + 數字清單 + 插入巨集 + 插入圖片 + 編輯關聯 + 回到清單 + 保存 + 保存並發佈 + 保存並提交審核 + 保存清單檢視 + 預覽 + 因未設置範本無法預覽 + 選擇樣式 + 顯示樣式 + 插入表格 + 產生模組 + + + 要更改所選節點的文檔類型,先在列表中選擇合適的文檔類型。 + 然後設置當前文檔類型到新文檔類型的各欄位間的對應映射關係並保存。 + 內容已被重新發佈 + 當前屬性 + 當前類型 + 不能改變文檔類型,因為沒有可替代的類型。 + 文檔類型已更改 + 要映射的欄位 + 映射欄位 + 新範本 + 新類型 + + 內容 + 選擇新的文檔類型 + 選中文檔的類型已被成功更改為[new type],以下欄位被映射: + + 不能完成欄位映射,因為存在一個欄位映射至多欄位的問題。 + 僅顯示可作為替代的文檔類型。 + + + 已發表 + 關於本頁 + 別名 + (圖片的替代文本) + 替代連結 + 點擊編輯 + 創建者 + 創建者 + 更新者 + 創建時間 + 此文件創建的日期時間 + 文檔類型 + 編輯 + 過期於 + 該項發佈之後有更改 + 該項沒有發佈 + 最近發佈 + 沒有可供顯示的項目 + 此列表中沒有可供顯示的項目 + 媒體類型 + 媒體連結位址 + 會員組 + 角色 + 會員類型 + 沒有選擇時間 + 頁標題 + 屬性 + 該文檔不可見,因為其上級 '%0%' 未發佈。 + 糟糕:該文檔已發佈,但是沒有更新至緩存(內部錯誤) + 糟糕:沒辦法連結到此網址(內部錯誤-請參見記錄) + 糟糕:此文件已經發表,但是網址和其他內容相衝 %0% + 發佈 + 發佈狀態 + 發佈於 + 取消發表於 + 清空時間 + 排序完成 + 拖拽項目或按一下列頭即可排序,可以按住Shift多選。 + 統計 + 標題(可選) + 其他說明文字(可選) + 類型 + 取消發佈 + 最近編輯 + 本文件修改時間 + 移除文件 + 連結到文檔 + 會員組成員 + 非會員組成員 + 子項目 + 目標 + 預計發表的時間(伺服器端) + 這是什麼意思?]]> + + + 點選以便上傳 + 拖曳檔案至此... + 媒體連結 + 或按這裡選擇檔案 + 只允許檔案類型為 + 檔案大小上限為 + + + 新增一位會員 + 所有會員 + + + 您想在哪裡創建 %0% + 創建在 + 選擇類型和標題 + "文檔類型"處變更。]]> + "媒體類型"處變更。]]> + 文檔類型沒有相關範本 + 沒有資料夾 + 新資料類別 + + + 流覽您的網站 + - 隱藏 + 如果Umbraco沒有打開,您可能需要允許彈出式視窗。 + 已經在新視窗中打開 + 重啟 + 訪問 + 歡迎 + + + 留下 + 放棄變更 + 您有未存檔的變更 + 您確定要離開本頁? - 您有未存檔的變更 + + + 完成 + 刪除 %0% 個項目 + 刪除 %0% 個項目 + 刪除 %1% 個中的 %0% 個項目 + 刪除 %1% 個中的 %0% 個項目 + 已發佈 %0% 個項目 + 已發佈 %0% 個項目 + 已發佈 %1% 個中的 %0% 個項目 + 已發佈 %1% 個中的 %0% 個項目 + 取消發佈 %0% 個項目 + 取消發佈 %0% 個項目 + 取消發佈 %1 個中的 %0% 個項目 + 取消發佈 %1 個中的 %0% 個項目 + 移動 %0% 個項目 + 移動 %0% 個項目 + 移動 %1 個中的 %0% 個項目 + 移動 %1 個中的 %0% 個項目 + 複製 %0% 個項目 + 複製 %0% 個項目 + 複製 %1 個中的 %0% 個項目 + 複製 %1 個中的 %0% 個項目 + + + 錨點名稱 + 管理主機名稱 + 關閉窗口 + 您確定要刪除嗎 + 您確定要禁用嗎 + 按一下此框確定刪除%0%項 + 您確定嗎? + 您確定嗎? + 剪切 + 編輯字典項 + 編輯語言 + 插入本地連結 + 插入字元 + 插入圖片標題 + 插入圖片 + 插入連結 + 插入巨集 + 插入表格 + 最近編輯 + 連結 + 內部連結: + 本地連結請用“#”號開頭 + 在新視窗中打開? + 巨集設置 + 本巨集沒有包含您可以編輯的屬性 + 粘貼 + 編輯許可權 + 正在清空回收站,請不要關閉窗口。 + 回收站已清空 + 從回收站刪除的項目將不可恢復 + regexlib.com的網站服務目前出現些狀況,而我們無能為力。我們對此不便感到十分抱歉。]]> + 查找規則運算式來驗證輸入,如: 'email、'zip-code'、'url'。 + 移除巨集 + 必填項目 + 網站已重建索引 + 網站緩存已刷新,所有已發佈的內容更新生效。 + 網站緩存將會刷新,所有已發佈的內容將會更新。 + 表格列數 + 表格行數 + 設定預留位置代碼 以便您要在子範本中插入內容到本範本時,填入此代碼到 <asp:content /> 裡面。]]> + 選擇預留位置代碼 於此清單中。您只能選擇目前父範本中的代碼。]]> + 點擊圖片查看完整大小 + 拾取項 + 查看緩存項 + 新增資料夾... + 與原本相關 + 最友善的社群 + 頁面連結 + 打開此連結文檔至新視窗或標籤頁 + 打開此連結文檔至全新視窗 + 打開此連結文檔在原本視窗中 + 媒體連結 + 選擇媒體 + 選擇圖示 + 選擇項目 + 選擇連結 + 選擇巨集 + 選擇內容 + 選擇會員 + 選擇會員群組 + 沒有找到任何圖示 + 本巨集沒有需要參數 + 外部登入提供者 + 例外細節 + 詳細記錄 + 內部例外 + 連結您的 + 取消連結您的 + 帳戶 + 選擇編輯器 + + + %0%' 編輯不同語言版本,
      您可以在左方選單「語言」中增添新的語言 + ]]>
      + 語言名稱 + + + 輸入您的使用者名稱 + 輸入您的密碼 + 確認您的密碼 + 命名此 %0%... + 輸入一個名稱 + 標籤... + 輸入一段描述... + 搜尋請輸入... + 過濾請輸入... + 增加標籤(每個標籤後請按輸入鍵)... + 輸入您的電子郵件 + + + 允許放置於根節點 + 只有勾選「允許放置於根節點」的內容種類可以放在內容樹或媒體樹的最頂端 + 允許子項節點類型 + 文檔種類集合 + 創建 + 刪除選項卡 + 描述 + 新建選項卡 + 選項卡 + 縮略圖 + 允許清單檢視 + 允許內容項目顯示成可以排列及搜尋的清單,子項目不會被顯示 + 目前清單檢視 + 作用中的清單檢視資料類別 + 新增自訂清單檢視 + 移除自訂清單檢視 + + + 添加預設值 + 資料庫資料類型 + 資料類型唯一標識 + 渲染控制項 + 按鈕 + 允許高級設置 + 允許快顯功能表 + 插入圖片預設最大 + 關聯的樣式表 + 顯示標籤 + 寬和高 + + + 資料已保存,但是發佈前您需要修正一些錯誤: + 當前成員提供程式不支援修改密碼(EnablePasswordRetrieval的值應該為true) + %0% 已存在 + 發現錯誤: + 發現錯誤: + 密碼最少%0%位元,且至少包含%1%位元非字母數位記號 + %0% 必須是整數 + %1% 中的 %0% 欄位是必填項 + %0% 是必填項 + %1% 中的 %0% 格式不正確 + %0% 格式不正確 + + + 收到伺服器傳來的錯誤 + 該檔案類型已被管理員禁用 + 注意,儘管配置中允許CodeMirror,但是它在IE上不夠穩定,所以無法在IE運行。 + 請為新的屬性類型填寫名稱和別名! + 許可權有問題,訪問指定文檔或資料夾失敗! + 讀取片段視圖腳本錯誤(檔案:%0%) + 讀取使用者控制項 %0% 錯誤 + 讀取使用者控制項 %0% 錯誤(組件:%0%,類別:%1%) + 讀取巨集引擎腳本錯誤(檔案:%0%) + 分析XSLT檔案錯誤:%0% + 讀取XSLT檔案錯誤:%0% + 請輸入標題 + 請選擇類型 + 圖片尺寸大於原始尺寸不會提高圖片品質,您確定要把圖片尺寸變大嗎? + python腳本錯誤 + python腳本未保存,因為包含錯誤。 + 預設打開頁面不存在,請聯繫管理員 + 請先選擇內容,再設置樣式。 + 沒有可用的樣式 + 請把游標放在您要合併的兩個儲存格中的左邊儲存格 + 非合併儲存格不能分離。 + XSLT源碼出錯 + XSLT未保存,因為包含錯誤。 + 這是此屬性所使用的資料類別設定錯誤,請檢查資料類別 + + + 關於 + 操作 + 操作 + 添加 + 別名 + 所有 + 您確定嗎? + 回去 + 邊框 + + 取消 + 儲存格邊距 + 選擇 + 關閉 + 關閉窗口 + 備註 + 確認 + 強制屬性 + 繼續 + 複製 + 創建 + 資料庫 + 時間 + 默認 + 刪除 + 已刪除 + 正在刪除… + 設計 + 規格 + + 下載 + 編輯 + 已編輯 + 元素 + 郵箱 + 錯誤 + 查找文檔 + + 幫助 + 圖示 + 導入 + 內邊距 + 插入 + 安裝 + 不合格 + 對齊 + 語言 + 佈局 + 載入中 + 鎖定 + 登入 + 退出 + 登出 + 巨集 + 必要 + 移動 + 更多 + 名稱 + 新的 + 下一步 + + 屬於 + 確定 + 打開 + + 密碼 + 路徑 + 預留位置代碼 + 請稍候… + 上一步 + 屬性 + 接收資料郵箱 + 回收站 + 保持狀態中 + 重命名 + 更新 + 必要 + 重試 + 許可權 + 搜索 + 伺服器 + 顯示 + 在發送時預覽 + 大小 + 排序 + 送出 + 類型 + 輸入內容開始搜尋… + + 更新 + 更新 + 上傳 + 連結位址 + 用戶 + 用戶名 + + 查看 + 歡迎… + + + 資料夾 + 搜尋結果 + 重新排列 + 我已經完成排列 + 預覽 + 更改密碼 + + 清單檢視 + 存檔中... + 目前 + 內嵌 + 選取的 + + + + + + + + + + + 增加標籤頁 + 增加屬性 + 增加編輯器 + 增加範本 + 增加子節點 + 增加子項目 + 編輯資料類別 + 瀏覽區塊 + 捷徑 + 顯示捷徑 + 開關清單檢視 + 開關是否允許為根項目 + + + 背景色 + 粗體 + 前景色 + 字體 + 文本 + + + 頁面 + + + 無法連接到資料庫。 + 無法保存web.config檔,請手工修改。 + 發現資料庫 + 資料庫配置 + 安裝 按鈕來安裝Umbraco資料庫 %0% + ]]> + 下一步繼續。]]> + 沒有找到資料庫!請確認檔案"web.config"中的字串"connection string"是否正確。

      +

      請編輯檔案"web.config" (例如使用Visual Studio或您喜歡的編輯器),移動到檔案底部,並在名稱為"UmbracoDbDSN"的字串中設定資料庫連結資訊,並存檔。

      +

      + 點選重試按鈕當上述步驟完成。
      + + 在此查詢更多編輯web.config的資訊。

      ]]>
      + + 若需要時,請聯繫您的網路公司。如果您在本地機器或伺服器安裝的話,您也許需要聯絡系統管理者。]]> + + 點選升級按鈕來升級Umbraco資料庫 %0%

      +

      + 請別擔心 - 不會刪除任何資料而且馬上就會繼續運作! +

      + ]]>
      + 點選下一步繼續。]]> + 下一步繼續設定精靈。]]> + 預設使用者的密碼必須更改!]]> + 預設使用者已經被暫停或沒有Umbraco的使用權!

      不需更多的操作步驟。點選下一步繼續。]]> + 安裝後預設使用者的密碼已經成功修改!

      不需更多的操作步驟。點選下一步繼續。]]> + 密碼已更改 + + Umbraco新增一預設使用者,名稱為('admin'),密碼為('default')。修改此密碼是十分重要的事情。

      +

      + 這個步驟會檢查預設使用者的密碼並在需要時建議修改。 +

      + ]]>
      + 作為入門者,從視頻教程開始吧! + 點擊下一步 (或在Web.config中自行修改UmbracoConfigurationStatus),意味著您接受上述授權合約。 + 安裝失敗。 + 受影響的檔和資料夾 + 此處查看更多資訊 + 您需要對以下檔和資料夾授於ASP.NET用戶修改許可權 + 您的權限設定幾近完美!

      + 您可以正常執行Umbraco沒有任何問題,只差您將沒有辦法安裝那些建議需要全部許可權的插件。]]>
      + 如何解決 + 點擊閱讀文字版 + 影片教學來瞭解如何設定Umbraco的資料夾權限或閱讀文字版本。]]> + 您的權限可能有點小問題! +

      + 您可以正常執行Umbraco沒有任何問題,然而您將無法新增資料夾或安裝那些可以讓Umbraco發揮全力的插件。]]>
      + 您的權限設定尚未未完成! +

      + 您需要更新權限設定才能執行Umbraco。]]>
      + 您的權限設定完美無瑕!

      + 您已經準備好執行Umbraco和安裝插件!]]>
      + 解決資料夾問題 + 點此查看ASP.NET和創建資料夾的問題解決方案 + 設置資料夾許可權 + + 我要從頭開始 + 學習該怎麼做) + 您晚點仍可以選擇安裝Runway,請至開發者區域選擇安裝。 + ]]> + 您剛剛安裝了一個乾淨的系統,要繼續嗎? + “Runway”已安裝 + + 這是我們的模組推薦清單,選取您想要安裝的項目,或者至 查詢完整清單。 + ]]> + 僅推薦高級用戶使用 + 給我一個簡單的網站 + + "Runway"是一個提供基本檔案類別和範本的簡單網站。安裝程式會自動幫您設定Runway, + 但你仍可輕易編輯,擴充或移除它。它並非必要項目而且您可以在沒它的情況下完美執行Umbraco。然而, + Runway提供一個輕鬆簡便但基於寶貴經驗的平台讓您可以更快開始。 + 如果您安裝Runway,您還可以選擇名為「Runway模組」的基本區塊來加強Runway頁面。 +

      + + 內含於Runway: 首頁,準備開始頁面,模組安裝頁面。
      + 可選模組: 上方瀏覽列,網站地圖,聯絡,藝廊。 +
      + ]]>
      + “Runway”是什麼? + 步驟 1/5:接受授權合約 + 步驟 2/5:資料庫配置 + 步驟 3/5:文件許可權驗證 + 步驟 4/5:系統安全性 + 步驟 5/5:一切就緒,可以開始使用系統。 + 感謝選擇我們的產品 + 參觀您的新網站 +您剛安裝好Runway,何不瞧瞧它的模樣。]]> + 更多的幫忙與資訊 +從我們獲獎的社群得到幫助,瀏覽文件,或觀看免費影片來瞭解如何輕鬆架設網站,如何使用插件,和瞭解Umbraco項目名稱的快速上手指引。]]> + 系統 %0% 安裝完畢 + /web.config 檔案並且更新AppSetting中的字串UmbracoConfigurationStatus 內容為 '%0%'。]]> + 快速開始指引。
      如果您是Umbraco的新成員, +您可以在其中找到相當多的資源。]]>
      + 啟動Umbraco +想要管理您的網站時,只需開啟Umbraco後台便可增加內容,更新範本和樣式表,或增添新功能。]]> + 無法連接到資料庫。 + 系統版本 3 + 系統版本 4 + 觀看 +
      + 點選"下一步"來啟動精靈。]]>
      + + + 語言代碼 + 語言名稱 + + + 使用者在空閒狀態下將會自動登出 + 已更新,繼續工作。 + + + 超級星期天快樂 + 瘋狂星期一快樂 + 熱鬧星期二快樂 + 美妙星期三快樂 + 悅耳星期四快樂 + 時髦星期五快樂 + 喵喵星期六快樂 + 下方登入 + 登入使用 + 連線時間過了 + © 2001 - %0%
      Umbraco.com

      ]]>
      + 忘記密碼? + 一封內有重設密碼連結的電子郵件已經寄出給您 + 一封內有重設密碼連結的電子郵件已經寄到此信箱 + 回到登入畫面 + 請輸入新密碼 + 您的密碼已經更新 + 您點選的連結是無效或過期的 + Umbraco:重設密碼 + 您登入到後台的使用者名稱是:%0%

      點選這裡來重設您的密碼或將此連結複製/貼上到您的瀏覽器:

      %1%

      ]]>
      + + + 儀錶板 + 區域 + 內容 + + + 選擇上面的頁面… + %0% 被複製到 %1% + 將 %0% 複製到 + %0% 已被移動到 %1% + 將 %0% 移動到 + 作為內容的根結點,點“確定”。 + 尚未選擇節點,請選擇一個節點點擊“確定”。 + 類型不符不允許選擇 + 該項不能移到其子項 + 當前節點不能建在根節點下 + 您在子項的許可權不夠,不允許該操作。 + 複本和原本建立關聯 + + + 為 %0% 編寫通知 + + 哈嘍 %0%

      + +

      這是一封自動產生的信件來通知您 %1% 工作 + 已經在頁面 %2% 上由使用者 %3% 執行完成 +

      + +

      +

      更新摘要:

      + + %6% +
      +

      + + + +

      祝您有美好的一天!

      + Umbraco機器人 謹上 +

      ]]>
      + 在 %2%,[%0%] 關於 %1% 的通告已執行。 + 通知 + + + + 按鈕並點選該檔案。Umbraco擴展包通常有「.zip」的副檔名。 + ]]> + 作者 + 演示 + 文檔 + 中繼資料 + 名稱 + 擴展包不含任何項 +
      + 您可以點選下方「移除擴展包」來安全地移除此項目。]]>
      + 無可用更新 + 選項 + 說明 + 程式庫 + 確認卸載 + 已卸載 + 擴展包卸載成功 + 卸載 + + 注意: 任何文檔,媒體或需要這些項目才能運作的物件將會停止運作,並可能使得系統不穩定, + 請小心移除。若有疑慮,請聯絡擴展包作者。]]> + 從程式庫下載更新 + 更新擴展包 + 更新說明 + 擴展包有可用的更新,您可以從程式庫網站更新。 + 版本 + 版本歷史 + 訪問擴展包網站 + 擴展包已安裝 + 這個擴展包無法安裝,它需要Umbraco至少是版本 %0% + 移除中... + 下載中... + 匯入中... + 安裝中... + 重新啟動中,請稍後... + 都好了,您的瀏覽器將重新整理,請稍待... + + + 帶格式粘貼(不推薦) + 您所粘貼的文本含有特殊字元或格式,Umbraco將清除以適應網頁。 + 無格式粘貼 + 粘貼並移除格式(推薦) + + + 基於角色的保護 + 請使用Umbraco的會員群組。]]> + 使用基於角色的授權需要首先建立會員組。 + 錯誤頁 + 當用戶登錄後訪問沒有許可權的頁時顯示該頁 + 選擇限制訪問此頁的方式 + %0% 現在處於受保護狀態 + %0% 的保護被取消 + 登錄頁 + 選擇公開的登錄入口 + 取消保護 + 選擇一個包含登錄表單和提示資訊的頁 + 選擇訪問該頁的角色類型 + 為此頁設置帳號和密碼 + 單用戶保護 + 如果您只希望提供一個用戶名和密碼就能訪問 + + + + + + + + 包含未發佈的子項 + 正在發佈,請稍候… + %0% 中的 %1% 頁面已發佈… + %0% 已發佈 + %0% 及其子項已發佈 + 發佈 %0% 及其子項 + 發佈按鈕來將%0%的內容設定為公開。

      + 您可以同時發佈本頁以及其子項目若您點選下面的包含子頁。 + ]]>
      + + + 您尚未設定任何許可顏色 + + + 輸入外部連結 + 選擇內部連結 + 標題 + 連結 + 新視窗 + 輸入新標題 + 輸入連結 + + + 重設 + + + 當前版本 + 紅色 文字將不會顯示於所選版本,而綠色表示增加部分。]]> + 文檔已回滾 + 這顯示所選版本的HTML格式,如果您想要比較兩版本的差異,請使用比較檢視 + 回滾至 + 選擇版本 + 查看 + + + 編輯腳本 + + + Concierge + 內容 + Courier + 開發 + 設定精靈 + 媒體 + 會員 + 消息 + 設置 + 統計 + 翻譯 + 用戶 + 說明 + 表單 + 統計 + + + 移至 + 說明主題為 + 影片主題為 + 最好的Umbraco影片教學 + + + 預設範本 + 字典鍵 + 要導入文檔類型,請點擊“流覽”按鈕,再點擊“導入”,然後在您電腦上查找 ".udt"檔導入(下一頁中需要您再次確認) + 新建選項卡標題 + 節點類型 + 類型 + 樣式表 + 腳本 + 樣式表屬性 + 選項卡 + 選項卡標題 + 選項卡 + 主控文件類型啟動 + 該文檔類型使用 + 作為主控文件類型. 主控文件類型的標籤只能在主控文件類型裡修改。 + 沒有欄位設置在該標籤頁 + 主文檔類別 + 新增對應範本 + 增加圖示 + + + 排列順序 + 增添時間 + 排序完成。 + 上下拖拽項目或按一下列頭進行排序 +
      排序中請不要關閉視窗。]]>
      + + + 驗證 + 驗證錯誤一定要修正才能儲存項目 + 失敗 + 使用者權限不足,無法完成操作 + 已取消 + 操作被協力廠商外掛程式取消 + 發佈被協力廠商外掛程式取消 + 屬性類型已存在 + 屬性類型已創建 + 資料類別:%1%]]> + 屬性類型已刪除 + 內容類別型已保存 + 選項卡已創建 + 選項卡已刪除 + id為%0%的選項卡已刪除 + 樣式表未保存 + 樣式表已保存 + 樣式表保存,無錯誤。 + 資料類型已保存 + 字典項已保存 + 因為上級頁面未發佈導致發佈失敗! + 內容已發佈 + 公眾可見 + 內容已保存 + 請發佈以使更改生效 + 提交審核 + 更改已提交審核 + 媒體已保存 + 媒體已保存 + 會員已保存 + 樣式表屬性已保存 + 樣式表已保存 + 範本已保存 + 保存使用者出錯(請查看日誌) + 用戶已保存 + 用戶類型已保存 + 檔未保存 + 檔無法保存,請檢查許可權。 + 檔保存 + 檔保存,無錯誤。 + 語言已保存 + 媒體類別已儲存 + 會員類別已儲存 + Python腳本未保存 + Python腳本因為錯誤未能保存 + Python已保存 + Python腳本無錯誤 + 範本未保存 + 範本別名相同 + 範本已保存 + 範本保存,無錯誤。 + XSLT未保存 + XSLT有錯誤 + XSLT無法保存,請檢查許可權。 + XSLT已保存 + XSLT無錯誤 + 內容已取消發佈 + 片段視圖已保存 + 片段視圖保存,無錯誤。 + 片段視圖未保存 + 片段視圖因為錯誤未能保存 + 腳本視圖已儲存 + 腳本視圖已儲存,沒有任何錯誤! + 腳本視圖未儲存 + 儲存檔案時發生錯誤 + 儲存檔案時發生錯誤 + + + 使用CSS語法,如:h1、.redHeader、.blueTex。 + 編輯樣式表 + 編輯樣式屬性 + 編輯器中的樣式屬性名 + 預覽 + 樣式 + + + 編輯範本 + 插入內容區 + 插入內容預留位置 + 插入字典項 + 插入巨集 + 插入頁欄位 + 母版 + 範本標籤快速指南 + 範本 + + + 選擇內容類別 + 選擇排列方式 + 新增一行 + 新增內容 + 放棄內容 + 設定已儲存 + 此處不允許有內容 + 此處允許有內容 + 點選來內嵌 + 點選來插入圖片 + 圖片標題... + 在此填寫... + 網格排列方式 + 排列是指網格編輯器的整體工作區域,通常您只需要一種或兩種排列方式 + 增加網格排列方式 + 藉由設定列寬以及增加新的區域來調整排列方式 + 行設定 + 行是預先水平排列的格子 + 增加行設定 + 藉由設定小格寬度和增添小格來調整此行 + + 網格排列方式的列總數 + 設定 + 調整設定編輯器可以改變的項目 + 樣式 + 調整樣式編輯器可以改變的項目 + 當JSON格式正確時設定才可以儲存 + 允許所有編輯器 + 允許所有行設定 + 定為預設 + 選擇額外 + 選擇預設 + 已增加 + + + 組合 + 您沒有增加任何選項卡 + 增加新的選項卡 + 增加另外的選項卡 + 繼承的表格 + 增加屬性 + 必要標籤 + 允許清單檢視 + 允許內容項目顯示成可以排列及搜尋的清單,子項目不會被顯示 + 允許的範本 + 選擇哪些範本編輯器可以使用於此類別的內容 + 允許為根項目 + 允許編輯器新增此類別的內容為根項目 + 是的 - 允許此類別內容為根項目 + 允許子節點種類 + 允許某些特定種類能夠成為此種類內容的子項目 + 選擇子節點 + 從已存在的文檔類別中繼承選項卡以及屬性。新選項卡將被新增至目前文檔種類或合併至已存在同名的選項卡中。 + 此內容種類已經用於集合中,因此不能重複添加本身。 + 沒有可用於集合的內容種類。 + 可用的編輯器 + 重複使用 + 編輯器設定 + 設定 + 是,刪除 + 已移至下層 + 已複製至下層 + 選擇要移動的資料夾 + 選擇要複製的資料夾 + 至下方樹狀結構 + 所有文檔種類 + 所有文檔 + 所有媒體項目 + 使用此文檔種類的將被永久刪除,請確認您也想要將它們刪除。 + 使用此媒體種類的將被永久刪除,請確認您也想要將它們刪除。 + 使用此會員種類的將被永久刪除,請確認您也想要將它們刪除。 + 以及所有使用此種類的文件項目 + 以及所有使用此種類的媒體項目 + 以及所有使用此種類的會員項目 + 使用此編輯器將會套用新設定 + 會員可以編輯 + 顯示於會員資料 + + + 替代欄位 + 替代文本 + 大小寫 + 編碼 + 選取欄位 + 轉換分行符號 + 將換行符號取代成為HTML標籤 &lt;br&gt; + 自訂欄位 + 是,僅日期 + 格式化時間 + HTML編碼 + 將替換HTML中的特殊字元 + 將在欄位值後插入 + 將在欄位值前插入 + 小寫 + + 欄位後插入 + 欄位前插入 + 遞迴 + 標準欄位 + 大寫 + URL編碼 + 將格式化URL中的特殊字元 + 當上面欄位值為空時使用 + 該欄位僅在主欄位為空時使用 + 是,含時間,分隔符號為: + + + 標記為您的任務 + 指派給您。請按「翻譯詳情」或頁面名稱觀看包含回應的詳細檢視畫面。 + 您也可以將此頁面下載成為XML格式檔案,請按「下載XML」按鈕。
      + 若想要關閉翻譯任務,請至細節頁面點選「結束」按鈕。 + ]]>
      + 關閉任務 + 翻譯詳情 + 將翻譯任務下載為XML + 下載 XML + 下載 XML DTD + 欄位 + 包含子頁 + + [%0%]翻譯任務:%1% + 沒有翻譯員,請創建翻譯員角色的用戶。 + 您創建的任務 + 由您創建的頁面。要瀏覽包含回應的詳細檢視畫面, + 點選「詳情」或頁面名稱。您可以下載此頁面成為XML格式檔案,請點選「下載XML」連結。 + 若要關閉翻譯任務,請至詳情檢視並點選「關閉」按鈕。 + ]]> + 頁面'%0%'已經發送給翻譯 + 請選擇本內容應該被翻譯成的語言 + 發送頁面'%0%'以便翻譯 + 分配者 + 任務開啟 + 總字數 + 翻譯到 + 翻譯完成。 + 您可以流覽剛翻譯的頁面,如果原始頁存在,您將得到兩者的比較。 + 翻譯失敗,XML可能損壞了。 + 翻譯選項 + 翻譯員 + 上傳翻譯的xml + + + 緩存流覽 + 回收站 + 創建擴展包 + 資料類型 + 字典 + 已安裝的擴展包 + 安裝皮膚 + 安裝新手套件 + 語言 + 安裝本地擴展包 + 巨集 + 媒體類型 + 會員 + 會員組 + 角色 + 會員類型 + 文檔類型 + 相關類型 + 擴展包 + 擴展包 + Python文件 + 從線上程式庫安裝 + 安裝Runway + Runway模組 + Scripting文件 + 腳本 + 樣式表 + 範本 + XSLT文件 + 統計 + + + 有可用更新 + %0%已就緒,點擊這裡下載 + 無到伺服器的連接 + 檢查更新失敗 + + + 管理員 + 分類欄位 + 更改密碼 + 更改密碼 + 確認新密碼 + 要改變密碼,請在框中輸入新密碼,然後按一下“更改密碼”。 + 內容頻道 + 描述欄位 + 禁用用戶 + 文檔類型 + 編輯 + 排除欄位 + 語言 + 登錄 + 默認打開媒體項 + 區域 + 禁用後臺管理介面 + 舊的密碼 + 密碼 + 重設密碼 + 您的密碼已更改! + 重輸密碼 + 輸入新密碼 + 新密碼不能為空! + 當前密碼 + 密碼錯誤 + 新密碼和重輸入的密碼不一致,請重試! + 重輸的密碼和原密碼不一致! + 替換子項許可權設置 + 您正在修改存取權限的頁面: + 選擇要修改許可權的頁 + 搜索子物件 + 預設打開內容項 + 用戶名 + 用戶許可權 + 用戶類型 + 用戶類型 + 撰稿人 + 翻譯者 + 改變 + 您的個人檔案 + 您的歷程記錄 + 連線到期於 + + + 驗證 + 以電子郵件驗證 + 以數字驗證 + 以網址驗證 + ...或輸入自訂驗證 + 必要欄位 + + + + 數值已設為推薦值:%0% + 在設定檔 %3% 中XPath %2% 的數值設為 %1% 。 + 在設定檔 %3% 中XPath %2% 的預期值設為 %1% ,但卻是 %0%。 + 在設定檔 %3% 中XPath %2% 的值為非預期值 %0%。 + + 自訂錯誤設定為 %0% + 自訂錯誤設定為 %0。建議在上線前改為 %1%。 + 自訂錯誤成功設定為 %0% + 巨集錯誤設為 %0% + 巨集錯誤設為 %0%,如此一來,當巨集有任何錯誤時會阻止某些或全部頁面正常載入。改正會將此設定 %1%。 + 巨集錯誤已設為 %0% + + 嘗試略過IIS自訂錯誤目前設為 %0%,而且您使用的IIS版本為 %1%。 + 嘗試略過IIS自訂錯誤目前設為 %0%,然而在您使用的IIS版本為 %2% 時,建議設定是 %1%。 + 嘗試略過IIS自訂錯誤已成功設為 %0%。 + + 檔案不存在:%0%。 + '%1%'中無法找到'%0%'。]]> + 有錯誤產生,請參閱下列錯誤的紀錄:%0%。 + 成員 - 所有XML:%0%,總共:%1%,不合格:%2% + 媒體 - 所有XML:%0%,總共發佈:%1%,不合格:%2% + 內容 - 所有XML:%0%,總共發佈:%1%,不合格:%2% + 憑證驗證錯誤:%0% + 網址探查錯誤:%0% - '%1%' + 您目前使用HTTPS瀏覽本站:%0% + 在您的web.config檔案中,appSetting的umbracoUseSSL是設為false。當您開始使用HTTPS時,應將其改為 true。 + 在您的web.config檔案中,appSetting的umbracoUseSSL是設為 %0%,您的cookies %0% 標成安全。 + 無法在您的web.config檔案中,更新appSetting的umbracoUseSSL設定,錯誤訊息:%0% + + 開啟HTTPS + 在web.config檔案中,將appSetting的umbracoUseSSL設true。 + 在您的web.config檔案中,appSetting的umbracoUseSSL已設為 true,您的cookies 將被標成安全。 + 修正 + 無法修正比較種類檢查為'ShouldNotEqual'。 + 用提供的數值無法修正比較種類檢查為'ShouldEqual'。 + 沒有提供要修正檢查的數值。 + 偵錯編輯模式關閉。 + 偵錯編輯模式目前已開啟。上線前建議將其關閉。 + 偵錯編輯模式已成功關閉。 + 詳細記錄模式已關閉。 + 詳細記錄模式目前已開啟。上線前建議將其關閉。 + 詳細記錄模式已成功關閉。 + 所有資料夾已有正確權限設定。 + + %0%。]]> + %0%。如果無須寫入,不需採取行動。]]> + 所有檔案已有正確權限設定。 + + %0%。]]> + %0%。如果無須寫入,不需採取行動。]]> + X-Frame-Options 設定能控制網站是否可以被其他人IFRAMEd已找到。]]> + X-Frame-Options 設定能控制網站是否可以被其他人IFRAMEd沒有找到。]]> + 調整設定的標頭 + 在 web.config 的 httpProtocol/customHeaders 區域增加設定來防止本站被別的網站IFRAMEd。 + 在 web.config 的 httpProtocol/customHeaders 區域已經增加設定來防止本站被別的網站IFRAMEd。 + 無法更新web.config檔案,錯誤:%0% + + %0%。]]> + 在標頭中沒有找到揭露網站技術的資訊。 + 在 Web.config 檔案中,找不到 system.net/mailsettings。 + 在 Web.config 檔案中的 system.net/mailsettings,沒有設定 host 。 + SMTP設定正確,而且服務正常運作。 + SMTP伺服器 %0% : %1% 無法連接。請確認在Web.config 檔案中 system.net/mailsettings 設定正確。 + %0%。]]> + %0%。]]> + + + 停止網址追蹤器 + 啟動網址追蹤器 + 原本網址 + 轉址成 + 沒有任何轉址 + 當發佈後的頁面改名或移動時,會自動轉址至新網頁。 + 移除 + 您確定要移除從 %0% 到 %1% 的轉址嗎? + 轉址已移除。 + 移除轉址錯誤。 + + 您確定要停止轉址追蹤器? + 轉址追蹤器已停止。 + 停止轉址追蹤器錯誤,更多資訊請參閱您的紀錄檔。 + 轉址追蹤器已開啟。 + 啟動轉址追蹤器錯誤,更多資訊請參閱您的紀錄檔。 + +
      \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/da.xml b/src/Umbraco.Web.UI/umbraco/config/lang/da.xml index 4fe1120eee..c25f3ce562 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/da.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/da.xml @@ -1145,8 +1145,6 @@ Mange hilsner fra Umbraco robotten Indsæt efter felt Indsæt før felt Rekursivt - Fjern paragraf-tags - Fjerner eventuelle &lt;P&gt; omkring teksten Standard felter Uppercase URL encode @@ -1202,9 +1200,10 @@ Mange hilsner fra Umbraco robotten Medlemstype Dokumenttyper Relationstyper - Pakker Pakker + Partial Views + Partial View Makro Filer Python Installer fra "repository" Installer Runway @@ -1292,4 +1291,7 @@ Mange hilsner fra Umbraco robotten URL tracker er nu slået fra. Der opstod en fejl under forsøget på at slå URL trackeren til, der findes mere information i logfilen. + + Karakterer tilbage + diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/de.xml b/src/Umbraco.Web.UI/umbraco/config/lang/de.xml index 776a23183b..7dade3efa7 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/de.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/de.xml @@ -859,7 +859,7 @@ Wenn Sie sich für Runway entscheiden, können Sie optional Blöcke nutzen, die Element hinzufügen Zeilenlayout auswählen - Einfach auf <i class="icon icon-add blue"></i> klicken, um das erste Element anzulegen + Element mit <i class="icon icon-add blue"></i> hinzufügen Drop content Klicken, um Inhalt einzubetten Klicken, um Abbildung einzufügen @@ -903,8 +903,6 @@ Wenn Sie sich für Runway entscheiden, können Sie optional Blöcke nutzen, die An den Feldinhalt anhängen Dem Feldinhalt voranstellen Rekursiv - Textabsatz entfernen - Alle <p> am Anfang und am Ende des Feldinhalts werden entfernt Standardfelder Großbuchstaben URL kodieren diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/en.xml b/src/Umbraco.Web.UI/umbraco/config/lang/en.xml index 49a2fae91a..52c0779733 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/en.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/en.xml @@ -514,6 +514,7 @@ Rename Renew Required + Retrieve Retry Permissions Search @@ -1345,9 +1346,6 @@ To manage your website, simply open the Umbraco back office and start adding con Insert before field Recursive Yes, make it recursive - Remove paragraph tags - Yes, remove paragraph tags - Will remove any paragraph tag in the beginning and end of the text Separator Standard Fields Uppercase @@ -1427,6 +1425,8 @@ To manage your website, simply open the Umbraco back office and start adding con Relation Types Packages Packages + Partial Views + Partial View Macro Files Python Files Install from repository Install Runway @@ -1437,8 +1437,6 @@ To manage your website, simply open the Umbraco back office and start adding con Templates XSLT Files Analytics - Partial Views - Partial View Macro Files New update ready @@ -1549,8 +1547,10 @@ To manage your website, simply open the Umbraco back office and start adding con Media - Total XML: %0%, Total: %1%, Total invalid: %2% Content - Total XML: %0%, Total published: %1%, Total invalid: %2% - Your site certificate was marked as valid. + Your website's certificate is valid. Certificate validation error: '%0%' + Your website's SSL certificate has expired. + Your website's SSL certificate is expiring in %0% days. Error pinging the URL %0% - '%1%' You are currently %0% viewing the site using the HTTPS scheme. The appSetting 'umbracoUseSSL' is set to 'false' in your web.config file. Once you access this site using the HTTPS scheme, that should be set to 'true'. @@ -1630,4 +1630,7 @@ To manage your website, simply open the Umbraco back office and start adding con No Dictionary items to choose from - + + characters left + + \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml b/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml index d8d0cff830..f2ea5ad011 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml @@ -515,6 +515,7 @@ Rename Renew Required + Retrieve Retry Permissions Search @@ -1343,9 +1344,6 @@ To manage your website, simply open the Umbraco back office and start adding con Insert before field Recursive Yes, make it recursive - Remove paragraph tags - Yes, remove paragraph tags - Will remove any paragraph tag in the beginning and end of the text Separator Standard Fields Uppercase @@ -1545,8 +1543,10 @@ To manage your website, simply open the Umbraco back office and start adding con Media - Total XML: %0%, Total: %1%, Total invalid: %2% Content - Total XML: %0%, Total published: %1%, Total invalid: %2% - Your site certificate was marked as valid. + Your website's certificate is valid. Certificate validation error: '%0%' + Your website's SSL certificate has expired. + Your website's SSL certificate is expiring in %0% days. Error pinging the URL %0% - '%1%' You are currently %0% viewing the site using the HTTPS scheme. The appSetting 'umbracoUseSSL' is set to 'false' in your web.config file. Once you access this site using the HTTPS scheme, that should be set to 'true'. @@ -1626,4 +1626,7 @@ To manage your website, simply open the Umbraco back office and start adding con No Dictionary items to choose from + + characters left + diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/es.xml b/src/Umbraco.Web.UI/umbraco/config/lang/es.xml index 3635ec6f23..ad0c3ecf30 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/es.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/es.xml @@ -809,8 +809,6 @@ Insertar después del campo Insertar antes del campo Recursivo - Borrar los tags del párrafo - Borrará cualquier &lt;P&gt; al principio y al final del texto Mayúscula Codificar URL Formateará los caracteres especiales de las URLs diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/fr.xml b/src/Umbraco.Web.UI/umbraco/config/lang/fr.xml index 093c1a0af5..753f8513e4 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/fr.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/fr.xml @@ -1345,9 +1345,6 @@ Pour gérer votre site, ouvrez simplement le backoffice Umbraco et commencez à Insérer avant le champ Récursif Oui, rendre récursif - Supprimer les balises de paragraphe - Oui, supprimer les balises de paragraphe - Supprimera toute balise &lt;P&gt; au début et à la fin du texte Séparateur Champs standards Majuscules diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/he.xml b/src/Umbraco.Web.UI/umbraco/config/lang/he.xml index 02d8311c14..a99066ed24 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/he.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/he.xml @@ -818,8 +818,6 @@ To manage your website, simply open the Umbraco back office and start adding con הוסף אחרי השדה הוסף לפני השדה רקורסיבי - הסר תגי פסקה - מסיר את כל ה- &lt;P&gt; בתחילת ובסוף הטקסט אותיות גדולות קידוד URL תווים מיוחדים יעוצבו ב- URL diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/it.xml b/src/Umbraco.Web.UI/umbraco/config/lang/it.xml index 171dcd4902..a9bc64d9f9 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/it.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/it.xml @@ -789,8 +789,6 @@ Per gestire il tuo sito web, è sufficiente aprire il back office di Umbraco e i Ricorsivo - - Campi Standard Maiuscolo diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/ja.xml b/src/Umbraco.Web.UI/umbraco/config/lang/ja.xml index d01caaa315..21417dfbcb 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/ja.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/ja.xml @@ -1108,8 +1108,6 @@ Runwayをインストールして作られた新しいウェブサイトがど フィールド値の後ろ追加 フィールド値の前に追加 再帰的 - 段落タグの消去 - 段落タグ &lt;P&gt; を消去します 標準フィールド 大文字変換 URLエンコード diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/ko.xml b/src/Umbraco.Web.UI/umbraco/config/lang/ko.xml index b72503e987..ee9be97c71 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/ko.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/ko.xml @@ -794,8 +794,6 @@ 필드뒤에 삽입 필드앞에 삽입 Recursive - 단락 태그삭제 - 문서 시작과 끝의 &amp;lt;P&amp;gt; 를 삭제하시겠습니까 대문자 URL 인코딩 URL의 특수문자를 포맷하겠습니까 diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/nl.xml b/src/Umbraco.Web.UI/umbraco/config/lang/nl.xml index 0126a05962..0d7faa9f14 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/nl.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/nl.xml @@ -1173,8 +1173,6 @@ Echter, Runway biedt een gemakkelijke basis om je snel op weg te helpen. Als je Invoegen na veld Invoegen voor veld Recursief - Verwijder paragraaf tags - tags aan het begin en einde van de tekst worden verwijderd]]> Standaard velden Hoofdletters URL-encoderen diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/pl.xml b/src/Umbraco.Web.UI/umbraco/config/lang/pl.xml index 5ae15f11da..30e4f3039c 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/pl.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/pl.xml @@ -1280,8 +1280,6 @@ Naciśnij przycisk instaluj, aby zainstalować bazę danych Umb Wstaw za polem Wstaw przed polem Rekurencyjne - Usuń znaki paragrafu - Usuwa wszystkie &lt;P&gt; z początku i końca tekstu Standardowe Pola Wielkie litery Kodowanie URL diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/pt.xml b/src/Umbraco.Web.UI/umbraco/config/lang/pt.xml index adc26ca46a..1953dac8f8 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/pt.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/pt.xml @@ -783,8 +783,6 @@ Você pode publicar esta página e todas suas sub-páginas ao selecionar pub Inserir após campo Inserir antes do campo Recursivo - Remover etiquetas de parágrafo - Removerá quaisquer &lt;P&gt; do começo ao fim do texto Maiúscula Codificar URL Vai formatar caracteres especiais em URLs diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/ru.xml b/src/Umbraco.Web.UI/umbraco/config/lang/ru.xml index 1a0d55b6c4..3cc1978416 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/ru.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/ru.xml @@ -356,7 +356,8 @@ Самое дружелюбное сообщество Ссылка на страницу Открывать ссылку в новом окне или вкладке браузера - Ссылка на медиа-файл + Ссылка на медиа-элемент + Ссылка на файл Выбрать медиа Выбрать значок Выбрать элемент @@ -366,7 +367,7 @@ Выбрать участника Выбрать группу участников Это макрос без параметров - Нет макросов доступных для вставки в редактор + Нет макросов, доступных для вставки в редактор Провайдеры аутентификации Подробное сообщение об ошибке Трассировка стека @@ -487,6 +488,7 @@ Закрыть окно Примечание Подтвердить + Сохранять пропорции Сохранять пропорции Далее Копировать @@ -554,6 +556,7 @@ Переименовать Обновить Обязательное + Получить Повторить Разрешения Поиск @@ -571,7 +574,7 @@ Обновить Обновление Загрузить - URL + Интернет-ссылка Пользователь Имя пользователя Значение @@ -990,7 +993,7 @@ Перетащите сюда или нажмите здесь для выбора файла пакета Загрузить пакет - Установите локальный пакет из файла, расположенного на Вашем компьютере. Остерегайтесь устанавливать пакеты из непроверенных источников! + Установите локальный пакет из файла, расположенного на Вашем компьютере. Остерегайтесь устанавливать пакеты из непроверенных источников! Загрузить еще один пакет Отменить и загрузить другой пакет Лицензия @@ -1422,12 +1425,15 @@ Добавить поле замены + Поле замены Добавить значение по-умолчанию + Значение по-умолчанию Альтернативное поле Текст по-умолчанию Регистр Выбрать поле Преобразовать переводы строк + Да, преобразовывать Заменяет переводы строк на тэг html 'br' Пользовательские Только дата @@ -1447,8 +1453,6 @@ Вставить перед полем Рекурсивно Да, использовать рекурсию - Удалить тэги параграфов - Удаляются тэги параграфа ('p') в начале и в конце абзацев Разделитель Стандартные В верхнем регистре @@ -1528,6 +1532,8 @@ Типы документов Пакеты дополнений Пакеты дополнений + Частичные представления + Файлы макросов Скрипты Python Типы связей Установить из репозитория diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/sv.xml b/src/Umbraco.Web.UI/umbraco/config/lang/sv.xml index 75bb41e35c..51c780f57e 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/sv.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/sv.xml @@ -820,8 +820,6 @@ Infoga efter fält Infoga före fält Rekursiv - Avlägsna stycke-taggar - Kommer att avlägsna alla &lt;P&gt; i början och slutet av texten Standardfält Versaler URL-koda diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/zh.xml b/src/Umbraco.Web.UI/umbraco/config/lang/zh.xml index 0341316f25..55a01d299e 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/zh.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/zh.xml @@ -46,7 +46,7 @@ 添加域名 移除 错误的节点 - 域名错误 + 域名错误 域名重复 语言 域名 @@ -55,13 +55,17 @@ 域名 '%0%' 已使用 域名 '%0%' 已更新 编辑当前域名 - + + https://www.example.com/、example.com/en、……使用 * 代表任意域名,
      - 只需要设置语言部分即可。]]>
      + 只需要设置语言部分即可。]]> +
      继承 语言 - - 也可以从父节点继承。]]> + + + 也可以从父节点继承。]]> + 域名 @@ -100,27 +104,29 @@ 显示样式 插入表格 生成模型 + 撤销 + 重做 要更改所选节点的文档类型,先在列表中选择合适的文档类型。 然后设置当前文档类型到新文档类型的各字段间的对应映射关系并保存。 - 内容已被重新发布 + 内容已被重新发布 当前属性 当前类型 不能改变文档类型,因为没有可替代的类型。 - 文档类型已更改 + 文档类型已更改 要映射的字段 映射字段 新模板 新类型 - + 内容 选择新的文档类型 选中文档的类型已被成功更改为[new type],以下字段被映射: 不能完成字段映射,因为存在一个字段映射至多字段的问题。 - 仅显示可作为替代的文档类型。 - + 仅显示可作为替代的文档类型。 + 已发布 关于本页 @@ -151,8 +157,8 @@ 属性 该文档不可见,因为其上级 '%0%' 未发布。 该文档已发布,但是没有更新至缓存(内部错误) - Could not get the url - This document is published but its url would collide with content %0% + 无法获取网址 + 此文档已发布,但其url将与内容相冲突 %0% 发布 发布状态 发布于 @@ -162,7 +168,7 @@ 拖拽项目或单击列头即可排序,可以按住Shift多选。 统计 标题(可选) - Alternative text (optional) + 备选 (可选) 类型 取消发布 最近编辑 @@ -175,11 +181,13 @@ 目标 这将转换到服务器上的以下时间: 这是什么意思?]]> + 添加其他文本框 + 删除此文本框 点击上传 将文件放在此处.. - 链接到媒体 + 链接到媒体 或单击此处选择文件 仅允许的文件类型为 最大文件大小为 @@ -197,6 +205,13 @@ 没有模板的文档类型 新建文件夹 新数据类型 + 新建 javascript 文件 + 新建空分部视图 + 新的分部视图宏 + 从代码段中新建分部视图 + 新的空分部视图宏 + 从代码段中新建分部视图宏 + 新的分部视图宏 (不带宏) 浏览您的网站 @@ -213,29 +228,24 @@ 您有未保存的更改 确实要离开此页吗?-您有未保存的更改 - + 完成 - 已删除 %0% 项 已删除 %0% 项 已删除 %0% 项,共 %1% 项 已删除 %0% 项,共 %1% 项 - 已发布 %0% 项 已发布 %0% 项 已发布 %0% 项,共 %1% 项 已发布 %0% 项,共 %1% 项 - 已取消发布 %0% 项 已取消发布 %0% 项 已取消发布 %0% 项,共 %1% 项 已取消发布 %0% 项,共 %1% 项 - 已移动 %0% 项 已移动 %0% 项 已移动 %0% 项,共 %1% 项 已移动 %0% 项,共 %1% 项 - 已复制 %0% 项 已复制 %0% 项 已复制 %0% 项,共 %1% 项 @@ -281,10 +291,14 @@ 网站缓存将会刷新,所有已发布的内容将会更新。 表格列数 表格行数 - 设置一个占位符id 您可以在子模板中通过该ID来插入内容, - 引用格式: <asp:content />。]]> - 选择一个 - 占位符id。]]> + + 设置一个占位符id 您可以在子模板中通过该ID来插入内容, + 引用格式: <asp:content />。]]> + + + 选择一个 + 占位符id。]]> + 点击图片查看完整大小 拾取项 查看缓存项 @@ -313,11 +327,16 @@ 取消链接您的 帐户 选择编辑器 + 帐号 + 选择编辑器 + 选择代码段 - + %0%

      您可以在左侧的“语言”中添加一种语言 - ]]> + ]]> + 语言名称 编辑字典项的键。 @@ -338,6 +357,7 @@ 输入过滤词... 键入添加tags (在每个tag之后按 enter)... 输入您的电子邮件 + 您的用户名通常是您的电子邮件 允许在根目录 @@ -369,6 +389,13 @@ 关联的样式表 显示标签 宽和高 + 所有属性类型 & 属性数据 + 使用此数据类型将被永久删除, 请确认您还要删除这些 + 是, 删除 + 以及使用此数据类型的所有属性类型 & 属性数据 + 选择要移动的文件夹 + 在树结构下面 + 被移到下面 数据已保存,但是发布前您需要修正一些错误: @@ -427,6 +454,7 @@ 关闭窗口 备注 确认 + 约束 强制属性 继续 复制 @@ -438,6 +466,7 @@ 已删除 正在删除… 设计 + 字典 规格 下载 @@ -447,6 +476,7 @@ 邮箱 错误 查找文档 + 第一 帮助 图标 @@ -457,6 +487,7 @@ 无效 对齐 语言 + 最后 布局 加载中 锁定 @@ -484,18 +515,22 @@ 接收数据邮箱 回收站 保持状态中 + 移除 重命名 更新 必填 重试 权限 搜索 + 对不起, 我们找不到你要找的东西。 + 未添加任何项目 服务器 显示 在发送时预览 大小 排序 - 提交 + 提交 + 类型 输入内容开始查找… @@ -534,22 +569,26 @@ - 添加选项卡 - 添加属性 - 添加编辑器 - 添加模板 - 添加子节点 - 添加子项 - - 编辑数据类型 - - 导航节 - - 快捷方式 - 显示快捷方式 - - 切换列表视图 - 切换允许作为根 + 添加选项卡 + 添加属性 + 添加编辑器 + 添加模板 + 添加子节点 + 添加子项 + 编辑数据类型 + 导航节 + 快捷方式 + 显示快捷方式 + 切换列表视图 + 切换允许作为根 + 注释/取消注释行 + 移除行 + 向上复制行 + 向下复制行 + 向上移动行 + 向下移动线条 + 一般 + 编辑 @@ -568,26 +607,34 @@ 无法保存web.config文件,请手工修改。 发现数据库 数据库配置 - + 安装进行 %0% 数据库配置 - ]]> + ]]> + 下一步继续。]]> - 数据库未找到!请检查数据库连接串设置。

      + + 数据库未找到!请检查数据库连接串设置。

      您可以自行编辑“web.config”文件,键名为 “UmbracoDbDSN”

      当自行编辑后,单击重试按钮
      。 如何编辑web.config

      - ]]>
      - + ]]> + + + 如有必要,请联系您的系统管理员。 - 如果您是本机安装,请使用管理员账号。]]> - + + + 点击更新来更新系统到 %0%

      不用担心更新会丢失数据!

      - ]]>
      + ]]> +
      点击下一步继续。]]> 下一步继续]]> @@ -595,7 +642,8 @@ 默认账户已禁用或无权访问系统!

      点击下一步继续。]]> 安装过程中默认用户密码已更改

      点击下一步继续。]]> 密码已更改 - + 系统创建了一个默认用户(‘admin’)和默认密码(‘default’)。 现在密码是随机的。 @@ -603,48 +651,64 @@

      该步骤建议您修改默认密码。

      - ]]>
      + ]]> + 作为入门者,从视频教程开始吧! 点击下一步 (或在Web.config中自行修改UmbracoConfigurationStatus),意味着您接受上述许可协议。 安装失败。 受影响的文件和文件夹 此处查看更多信息 您需要对以下文件和文件夹授于ASP.NET用户修改权限 - 您当前的安全设置满足要求!

      - 您可以毫无问题的运行系统,但您不能安装系统所推荐的扩展包的完整功能。]]>
      + + 您当前的安全设置满足要求!

      + 您可以毫无问题的运行系统,但您不能安装系统所推荐的扩展包的完整功能。]]> +
      如何解决 点击阅读文字版 视频教程 ]]> - 您当前的安全设置有问题! + + 您当前的安全设置有问题!

      - 您可以毫无问题的运行系统,但您不能新建文件夹、也不能安装系统所推荐的包的完整功能。 ]]>
      - 您当前的安全设置不适合于系统! + 您可以毫无问题的运行系统,但您不能新建文件夹、也不能安装系统所推荐的包的完整功能。 ]]> + + + 您当前的安全设置不适合于系统!

      - 您需要修改系统访问权限。]]>
      - 您当前的权限设置正确!

      - 您可以运行系统并安装其它扩展包!]]>
      + 您需要修改系统访问权限。]]> +
      + + 您当前的权限设置正确!

      + 您可以运行系统并安装其它扩展包!]]> +
      解决文件夹问题 点此查看ASP.NET和创建文件夹的问题解决方案 设置文件夹权限 - + + ]]> + 我要从头开始 - + 如何操作?) 您也可以安装晚一些安装“Runway”。 - ]]> + ]]> + 您刚刚安装了一个干净的系统,要继续吗? “Runway”已安装 - + 这是我们推荐的模块,您也可以查看 全部模块 - ]]> + ]]> + 仅推荐高级用户使用 给我一个简单的网站 - + “Runway”是一个简单的,包含文件类型和模板的示例网站。安装程序会自动为您安装。 您可以自行编辑和删除之。 @@ -655,7 +719,8 @@ Runway: 主页, 开始页, 安装模块页.
      可选模块: 顶部导航, 站点地图, 联系我们, 图库. - ]]>
      + ]]> + “Runway”是什么? 步骤 1/5:接受许可协议 步骤 2/5:数据库配置 @@ -663,24 +728,34 @@ 步骤 4/5:系统安全性 步骤 5/5:一切就绪,可以开始使用系统。 感谢选择我们的产品 - 浏览您的新站点 -您安装了“Runway”,那么来瞧瞧吧。]]> - 更多的帮助信息 -从社区获取帮助]]> + + 浏览您的新站点 +您安装了“Runway”,那么来瞧瞧吧。]]> + + + 更多的帮助信息 +从社区获取帮助]]> + 系统 %0% 安装完毕 - /web.config file 的 AppSetting 键 - UmbracoConfigurationStatus'%0%'。]]> + + /web.config file 的 AppSetting 键 + UmbracoConfigurationStatus'%0%'。]]> + 立即开始请点“运行系统”
      如果您是新手, 您可以得到相当丰富的学习资源。]]>
      - 运行系统 + + 运行系统 管理您的网站, 运行后台添加内容, -也可以添加模板和功能。]]> +也可以添加模板和功能。]]> + 无法连接到数据库。 系统版本 3 系统版本 4 观看 - +
      -按 “下一步”进入向导。]]>
      +按 “下一步”进入向导。]]> + 语言代码 @@ -735,7 +810,8 @@ 为 %0% 编写通知 - + - %0%:

      + ]]> +
      + + %0%:

      您好!这是一封自动发送的邮件,告诉您任务'%1%' 已在'%2%' @@ -774,23 +852,61 @@

      祝您愉快!

      该信息由系统自动发送 -

      ]]>
      +

      ]]> + 在 %2%,[%0%] 关于 %1% 的通告已执行。 通知 - + 选择 ".umb" 或者 ".zip" 文件 - ]]> + ]]> + + 拖入上传 + 或单击此处选择文件 + 上传包 + 通过从计算机中选择一个本地包来安装它。仅从您知道和信任的来源安装软件包 + 上传另一包 + 取消并上载另一个包 + 许可证 + 我接受 + 使用条款 + 安装包 + 完成 + 已安装的软件包 + 您没有安装任何软件包 + "程序包" 图标浏览可用的包]]> + 搜索包 + 结果为 + 我们找不到任何东西 + 请尝试搜索其他包或浏览类别 + 流行 + 新版本 + + karma 点 + 信息 + 所有者 + 贡献者 + 创建 + 当前版本 + .NET 版本 + 下载 + 喜欢 + 兼容性 + 此软件包与社区成员报告的 Umbraco 的以下版本兼容。报告100% 以下版本不能保证完全兼容 + 外部来源 作者 演示 文档 元数据 名称 扩展包不含任何项 -
      - 点击下面的“卸载”,您可以安全的删除。]]>
      + +
      + 点击下面的“卸载”,您可以安全的删除。]]> +
      无可用更新 选项 说明 @@ -799,9 +915,11 @@ 已卸载 扩展包卸载成功 卸载 - + + 注意: - 卸载包将导致所有依赖该包的东西失效,请确认。 ]]> + 卸载包将导致所有依赖该包的东西失效,请确认。 ]]> + 从程序库下载更新 更新扩展包 更新说明 @@ -818,6 +936,7 @@ 重启中, 请稍候... 所有完成后, 您的浏览器将立即刷新, 请稍候... 请单击 "完成" 以完成安装和重新加载页面。 + Uploading package... 带格式粘贴(不推荐) @@ -849,27 +968,37 @@ %0% 无法发布, 因为该项在计划发布中。 ]]> - + - + + + - + + + - + + + + ]]> + 包含未发布的子项 正在发布,请稍候… %0% 中的 %1% 页面已发布… %0% 已发布 %0% 及其子项已发布 发布 %0% 及其子项 - 确定 发布 %0%

      + + 确定 发布 %0%

      要发布当前页和所有子页,请选中 全部发布 发布所有子页。 - ]]>
      + ]]> +
      您没有配置任何认可的颜色 @@ -885,6 +1014,10 @@ Reset + Define crop + Give the crop an alias and its default width and height + Save crop + Add new crop 当前版本 @@ -950,8 +1083,8 @@
      请不要关闭窗口]]>
      - 验证 - 在保存项之前必须修复验证错误 + 验证 + 在保存项之前必须修复验证错误 失败 用户权限不足, 无法完成操作 取消 @@ -1027,15 +1160,90 @@ 编辑模板 + 部分 插入内容区 插入内容占位符 + 插入 + 选择要插入到模板中的内容 插入字典项 + 字典项是可翻译的文本部分的占位符, 这使得为多语言网站创建设计变得容易。 插入宏 + + 宏是一个可配置的组件, 对于 + 设计的可重用部分, 在这里您需要提供参数的选项, + 如画廊、表格和列表。 + 插入页字段 + 显示当前页中指定字段的值, 其中有用于修改值或回退到替代值的选项。 + 分部视图 + + 分部视图是可以在另一个模板内呈现的单独的模板文件, + 它对于重用标记或将复杂的模板分离到单独的文件中非常重要。 + 母版 - 模板标签快速指南 + 无主模板 + 无主 + 呈现子模板 + + @RenderBody(). + ]]> + + 定义命名节 + + @section { ... }. 这可以呈现在 + 此模板的父级的特定区域, 请使用 @RenderSection. + ]]> + + 呈现命名节 + + @RenderSection(name). + 这将呈现子模板的一个区域, 它被包装在相应的 @section [名称] {...} 定义中. + ]]> + + 节名称 + 节是必需的 + + 如果强制, 子模板必须包含 @section 定义, 否则将显示错误。 + + 查询生成器 + 生成查询 + 返回的项, 在 + 我要 + 所有内容 + 类型 "%0%"的内容 + from + 我的网站 + where + and + is + is not + before + before (包含选定日期) + after + after (包含选定日期) + equals + does not equal + contains + does not contain + greater than + greater than or equal to + less than + less than or equal to + Id + Name + Created Date + Last Updated Date + order by + ascending + descending 模板 + 选择内容类别 选择一项布局 @@ -1043,15 +1251,12 @@ 添加内容 丢弃内容 设置已应用 - 此处不允许有该内容 此处允许有该内容 - 点击嵌入 点击添加图片 图片说明... 在这里输入... - 网格布局 布局是网格编辑器的整体工作区域, 通常只需要一个或两个不同的布局 添加网络布局 @@ -1060,18 +1265,13 @@ 行是水平排列的预定义单元格 添加行配置 通过设置单元格宽度和添加其他单元格来调整行 - 网格布局中的总和列数 - 设置 配置编辑器可以更改的设置 - 样式 配置编辑器可以更改的样式 - 输入的 json 配置有效, 设置才可保存 - 允许所有的编辑器 允许所有行配置 设置为默认值 @@ -1081,89 +1281,81 @@ - - 组合 - 您没有添加任何选项卡 - 添加新选项卡 - 添加其他选项卡 - 继承自 - 添加属性 - 必需的标签 - - 启用列表视图 - 配置内容项以显示其子项的可排序和搜索列表, 这些子项将不会显示在树中 - - 允许的模板 - 选择允许在该类型的内容上使用哪些模板编辑器 - - 允许作为根 - 允许编辑器在内容树的根目录中创建此类型的内容 - 是 - 允许根中的此类型的内容 - - 允许的子节点类型 - 允许在该类型的内容下方创建指定类型的内容 - - 选择子节点 - - 从现有文档类型继承选项卡和属性。如果存在同名的选项卡, 则新选项卡将添加到当前文档类型或合并。 - 此内容类型在组合中使用, 因此不能自行组成。 - 没有可供组合使用的内容类型。 - - 可用编辑器 - 重用 - 编辑器设置 - - 配置 - - 是,删除 - - 被移动到下方 - 被复制到下面 - 选择要移动的文件夹 - 选择要复制的文件夹 - 在下面的树结构中 - - 所有文档类型 - 所有文档 - 所有媒体项目 - - 使用此文档类型将被永久删除, 请确认您还要删除这些文件。 - 使用此媒体类型将被永久删除, 请确认您也要删除这些。 - 使用此成员类型将被永久删除, 请确认您想要删除这些 - - 和所有使用此类型的文档 - 和所有使用此类型的媒体项目 - 和使用此类型的所有成员 - - 使用此编辑器将用新设置更新 - - 成员可编辑 - 显示成员配置文件 - + 组合 + 您没有添加任何选项卡 + 添加新选项卡 + 添加其他选项卡 + 继承自 + 添加属性 + 必需的标签 + 启用列表视图 + 配置内容项以显示其子项的可排序和搜索列表, 这些子项将不会显示在树中 + 允许的模板 + 选择允许在该类型的内容上使用哪些模板编辑器 + 允许作为根 + 允许编辑器在内容树的根目录中创建此类型的内容 + 是 - 允许根中的此类型的内容 + 允许的子节点类型 + 允许在该类型的内容下方创建指定类型的内容 + 选择子节点 + 从现有文档类型继承选项卡和属性。如果存在同名的选项卡, 则新选项卡将添加到当前文档类型或合并。 + 此内容类型在组合中使用, 因此不能自行组成。 + 没有可供组合使用的内容类型。 + 可用编辑器 + 重用 + 编辑器设置 + 配置 + 是,删除 + 被移动到下方 + 被复制到下面 + 选择要移动的文件夹 + 选择要复制的文件夹 + 在下面的树结构中 + 所有文档类型 + 所有文档 + 所有媒体项目 + 使用此文档类型将被永久删除, 请确认您还要删除这些文件。 + 使用此媒体类型将被永久删除, 请确认您也要删除这些。 + 使用此成员类型将被永久删除, 请确认您想要删除这些 + 和所有使用此类型的文档 + 和所有使用此类型的媒体项目 + 和使用此类型的所有成员 + 使用此编辑器将用新设置更新 + 成员可编辑 + 显示成员配置文件 + 添加后备字段 + 后备字段 + 添加默认值 + 默认值 替代字段 替代文本 大小写 + 编码 选取字段 转换换行符 + 是, 转换换行符 将换行符转化为&lt;br&gt; 自定义字段 是,仅日期 - 编码 + 格式和编码 格式化时间 + 根据活动区域性将该值设置为日期或日期。 HTML编码 将替换HTML中的特殊字符 将在字段值后插入 将在字段值前插入 小写 + 修改输出 + 输出示例 字段后插入 字段前插入 递归 - 移除段落符号 - 将移除&lt;P&gt;标签 + 是, 让它递归 + 分隔符 标准字段 大写 URL编码 @@ -1174,10 +1366,12 @@ 标记为您的任务 - 分配给您. 查看详情, 点击“详情”或页名。 + + 分配给您. 查看详情, 点击“详情”或页名。 如果需要XML格式,请点击“下载 XML”链接。
      关闭翻译任务,请返回详细视图点击“关闭”按钮。 - ]]>
      + ]]> +
      关闭任务 翻译详情 将翻译任务下载为xml @@ -1185,7 +1379,8 @@ 下载 XML DTD 字段 包含子页 - + + ]]> + [%0%]翻译任务:%1% 没有翻译员,请创建翻译员角色的用户。 您创建的任务 - 您创建的页面. 查看详情, 点击“详情” 或页名. + + 您创建的页面. 查看详情, 点击“详情” 或页名. 如果需要XML格式,请点击“下载 Xml”链接。
      关闭翻译任务,请返回详细视图点击“关闭”按钮。 - ]]>
      + ]]> +
      页面'%0%'已经发送给翻译 请选择内容应翻译成的语言 发送页面'%0%'以便翻译 @@ -1242,6 +1440,8 @@ 关系类型 扩展包 扩展包 + 分部视图 + 分部视图宏文件 Python文件 从在线程序库安装 安装Runway @@ -1252,8 +1452,6 @@ 模板 XSLT文件 分析 - 分部视图 - 分部视图宏文件 有可用更新 @@ -1307,95 +1505,94 @@ 会话过期于 - 验证 - 验证为电子邮件 - 验证为数字 - 验证为 url - ...或输入自定义验证 - 字段是强制性的 + 验证 + 验证为电子邮件 + 验证为数字 + 验证为 url + ...或输入自定义验证 + 字段是强制性的 + 输入正则表达式 + 您需要添加至少 + 你只能有 + + 选定的项 + 无效日期 + 不是一个数字 + 无效的电子邮件 - + Value is set to the recommended value: '%0%'. - Value was set to '%1%' for XPath '%2%' in configuration file '%3%'. + Value was set to '%1%' for XPath '%2%' in configuration file '%3%'. Expected value '%1%' for '%2%' in configuration file '%3%', but found '%0%'. Found unexpected value '%0%' for '%2%' in configuration file '%3%'. - - Custom errors are set to '%0%'. - Custom errors are currently set to '%0%'. It is recommended to set this to '%1%' before go live. - Custom errors successfully set to '%0%'. + + Custom errors are set to '%0%'. + Custom errors are currently set to '%0%'. It is recommended to set this to '%1%' before go live. + Custom errors successfully set to '%0%'. + MacroErrors are set to '%0%'. + MacroErrors are set to '%0%' which will prevent some or all pages in your site from loading completely if there are any errors in macros. Rectifying this will set the value to '%1%'. + MacroErrors are now set to '%0%'. - MacroErrors are set to '%0%'. - MacroErrors are set to '%0%' which will prevent some or all pages in your site from loading completely if there are any errors in macros. Rectifying this will set the value to '%1%'. - MacroErrors are now set to '%0%'. + + Try Skip IIS Custom Errors is set to '%0%' and you're using IIS version '%1%'. + Try Skip IIS Custom Errors is currently '%0%'. It is recommended to set this to '%1%' for your IIS version (%2%). + Try Skip IIS Custom Errors successfully set to '%0%'. - - Try Skip IIS Custom Errors is set to '%0%' and you're using IIS version '%1%'. - Try Skip IIS Custom Errors is currently '%0%'. It is recommended to set this to '%1%' for your IIS version (%2%). - Try Skip IIS Custom Errors successfully set to '%0%'. + + File does not exist: '%0%'. + '%0%' in config file '%1%'.]]> + There was an error, check log for full error: %0%. + Members - Total XML: %0%, Total: %1%, Total invalid: %2% + Media - Total XML: %0%, Total: %1%, Total invalid: %2% + Content - Total XML: %0%, Total published: %1%, Total invalid: %2% + Your site certificate was marked as valid. + Certificate validation error: '%0%' + Error pinging the URL %0% - '%1%' + You are currently %0% viewing the site using the HTTPS scheme. + The appSetting 'umbracoUseSSL' is set to 'false' in your web.config file. Once you access this site using the HTTPS scheme, that should be set to 'true'. + The appSetting 'umbracoUseSSL' is set to '%0%' in your web.config file, your cookies are %1% marked as secure. + Could not update the 'umbracoUseSSL' setting in your web.config file. Error: %0% - - File does not exist: '%0%'. - '%0%' in config file '%1%'.]]> - There was an error, check log for full error: %0%. - - Members - Total XML: %0%, Total: %1%, Total invalid: %2% - Media - Total XML: %0%, Total: %1%, Total invalid: %2% - Content - Total XML: %0%, Total published: %1%, Total invalid: %2% - - Your site certificate was marked as valid. - Certificate validation error: '%0%' - Error pinging the URL %0% - '%1%' - You are currently %0% viewing the site using the HTTPS scheme. - The appSetting 'umbracoUseSSL' is set to 'false' in your web.config file. Once you access this site using the HTTPS scheme, that should be set to 'true'. - The appSetting 'umbracoUseSSL' is set to '%0%' in your web.config file, your cookies are %1% marked as secure. - Could not update the 'umbracoUseSSL' setting in your web.config file. Error: %0% - - - Enable HTTPS - Sets umbracoSSL setting to true in the appSettings of the web.config file. - The appSetting 'umbracoUseSSL' is now set to 'true' in your web.config file, your cookies will be marked as secure. - - Fix + + Enable HTTPS + Sets umbracoSSL setting to true in the appSettings of the web.config file. + The appSetting 'umbracoUseSSL' is now set to 'true' in your web.config file, your cookies will be marked as secure. + Fix Cannot fix a check with a value comparison type of 'ShouldNotEqual'. Cannot fix a check with a value comparison type of 'ShouldEqual' with a provided value. Value to fix check not provided. - - Debug compilation mode is disabled. - Debug compilation mode is currently enabled. It is recommended to disable this setting before go live. - Debug compilation mode successfully disabled. - - Trace mode is disabled. - Trace mode is currently enabled. It is recommended to disable this setting before go live. - Trace mode successfully disabled. - + Debug compilation mode is disabled. + Debug compilation mode is currently enabled. It is recommended to disable this setting before go live. + Debug compilation mode successfully disabled. + Trace mode is disabled. + Trace mode is currently enabled. It is recommended to disable this setting before go live. + Trace mode successfully disabled. All folders have the correct permissions set. + 0: Comma delimitted list of failed folder paths + --> %0%.]]> %0%. If they aren't being written to no action need be taken.]]> - All files have the correct permissions set. + 0: Comma delimitted list of failed folder paths + --> %0%.]]> %0%. If they aren't being written to no action need be taken.]]> - X-Frame-Options used to control whether a site can be IFRAMEd by another was found.]]> X-Frame-Options used to control whether a site can be IFRAMEd by another was not found.]]> Set Header in Config @@ -1404,16 +1601,14 @@ Could not update web.config file. Error: %0% + 0: Comma delimitted list of headers found + --> %0%.]]> No headers revealing information about the website technology were found. - In the Web.config file, system.net/mailsettings could not be found. In the Web.config file system.net/mailsettings section, the host is not configured. SMTP settings are configured correctly and the service is operating as expected. The SMTP server configured with host '%0%' and port '%1%' could not be reached. Please check to ensure the SMTP settings in the Web.config file system.net/mailsettings are correct. - %0%.]]> %0%.]]> @@ -1434,4 +1629,7 @@ 现在已启用 url 跟踪程序。 启用 url 跟踪程序时出错, 可以在日志文件中找到更多信息。 + + 没有可供选择的词典项目 + diff --git a/src/Umbraco.Web/Cache/DataTypeCacheRefresher.cs b/src/Umbraco.Web/Cache/DataTypeCacheRefresher.cs index 6b001d24fa..1aaa52a3f4 100644 --- a/src/Umbraco.Web/Cache/DataTypeCacheRefresher.cs +++ b/src/Umbraco.Web/Cache/DataTypeCacheRefresher.cs @@ -113,7 +113,7 @@ namespace Umbraco.Web.Cache } TagsValueConverter.ClearCaches(); - MultipleMediaPickerPropertyConverter.ClearCaches(); + LegacyMediaPickerPropertyConverter.ClearCaches(); SliderValueConverter.ClearCaches(); MediaPickerPropertyConverter.ClearCaches(); diff --git a/src/Umbraco.Web/Editors/MediaTypeController.cs b/src/Umbraco.Web/Editors/MediaTypeController.cs index 879ffd3d0a..32d3ba6f34 100644 --- a/src/Umbraco.Web/Editors/MediaTypeController.cs +++ b/src/Umbraco.Web/Editors/MediaTypeController.cs @@ -230,7 +230,7 @@ namespace Umbraco.Web.Editors basic.Description = TranslateItem(basic.Description); } - return basics; + return basics.OrderBy(x => x.Name); } /// diff --git a/src/Umbraco.Web/HealthCheck/Checks/Security/HttpsCheck.cs b/src/Umbraco.Web/HealthCheck/Checks/Security/HttpsCheck.cs index 4e2dc4f8f5..b50fc99a6e 100644 --- a/src/Umbraco.Web/HealthCheck/Checks/Security/HttpsCheck.cs +++ b/src/Umbraco.Web/HealthCheck/Checks/Security/HttpsCheck.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Net; +using System.Security.Cryptography.X509Certificates; using System.Web; using Umbraco.Core.IO; using Umbraco.Core.Services; @@ -53,7 +54,7 @@ namespace Umbraco.Web.HealthCheck.Checks.Security private HealthCheckStatus CheckForValidCertificate() { var message = string.Empty; - var success = false; + StatusResultType result; var url = HealthCheckContext.HttpContext.Request.Url; // Attempt to access the site over HTTPS to see if it HTTPS is supported @@ -65,7 +66,37 @@ namespace Umbraco.Web.HealthCheck.Checks.Security try { var response = (HttpWebResponse)request.GetResponse(); - success = response.StatusCode == HttpStatusCode.OK; + if (response.StatusCode == HttpStatusCode.OK) + { + // Got a valid response, check now for if certificate expiring within 14 days + // Hat-tip: https://stackoverflow.com/a/15343898/489433 + const int NumberOfDaysForExpiryWarning = 14; + var cert = request.ServicePoint.Certificate; + var cert2 = new X509Certificate2(cert); + var expirationDate = cert2.NotAfter; + + var daysToExpiry = (int)Math.Floor((cert2.NotAfter - DateTime.Now).TotalDays); + if (daysToExpiry <= 0) + { + result = StatusResultType.Error; + message = _textService.Localize("healthcheck/httpsCheckExpiredCertificate"); + } + else if (daysToExpiry < NumberOfDaysForExpiryWarning) + { + result = StatusResultType.Warning; + message = _textService.Localize("healthcheck/httpsCheckExpiringCertificate", new[] { daysToExpiry.ToString() }); + } + else + { + result = StatusResultType.Success; + message = _textService.Localize("healthcheck/httpsCheckValidCertificate"); + } + } + else + { + result = StatusResultType.Error; + message = _textService.Localize("healthcheck/httpsCheckInvalidUrl", new[] { address, response.StatusDescription }); + } } catch (Exception ex) { @@ -80,17 +111,16 @@ namespace Umbraco.Web.HealthCheck.Checks.Security { message = _textService.Localize("healthcheck/httpsCheckInvalidUrl", new[] { address, ex.Message }); } + + result = StatusResultType.Error; } var actions = new List(); - if (success) - message = _textService.Localize("healthcheck/httpsCheckValidCertificate"); - return new HealthCheckStatus(message) { - ResultType = success ? StatusResultType.Success : StatusResultType.Error, + ResultType = result, Actions = actions }; } diff --git a/src/Umbraco.Web/Models/ImageCropDataSet.cs b/src/Umbraco.Web/Models/ImageCropDataSet.cs index 4c5a68a6b9..00f46dd2d7 100644 --- a/src/Umbraco.Web/Models/ImageCropDataSet.cs +++ b/src/Umbraco.Web/Models/ImageCropDataSet.cs @@ -76,7 +76,7 @@ namespace Umbraco.Web.Models public bool HasImage() { - return string.IsNullOrEmpty(Src); + return ! string.IsNullOrEmpty(Src); } public string ToHtmlString() diff --git a/src/Umbraco.Web/Models/Mapping/TabsAndPropertiesResolver.cs b/src/Umbraco.Web/Models/Mapping/TabsAndPropertiesResolver.cs index 0671f59273..1722eecf79 100644 --- a/src/Umbraco.Web/Models/Mapping/TabsAndPropertiesResolver.cs +++ b/src/Umbraco.Web/Models/Mapping/TabsAndPropertiesResolver.cs @@ -165,12 +165,20 @@ namespace Umbraco.Web.Models.Mapping var listViewTab = new Tab(); listViewTab.Alias = Constants.Conventions.PropertyGroups.ListViewGroupName; listViewTab.Label = localizedTextService.Localize("content/childItems"); - listViewTab.Id = 25; + listViewTab.Id = display.Tabs.Count() + 1; listViewTab.IsActive = true; var listViewConfig = editor.PreValueEditor.ConvertDbToEditor(editor.DefaultPreValues, preVals); //add the entity type to the config - listViewConfig["entityType"] = entityType; + listViewConfig["entityType"] = entityType; + + //Override Tab Label if tabName is provided + if (listViewConfig.ContainsKey("tabName")) + { + var configTabName = listViewConfig["tabName"]; + if (configTabName != null && string.IsNullOrWhiteSpace(configTabName.ToString()) == false) + listViewTab.Label = configTabName.ToString(); + } var listViewProperties = new List(); listViewProperties.Add(new ContentPropertyDisplay diff --git a/src/Umbraco.Web/PropertyEditors/ListViewPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/ListViewPropertyEditor.cs index f744e4d807..2ee208ed48 100644 --- a/src/Umbraco.Web/PropertyEditors/ListViewPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/ListViewPropertyEditor.cs @@ -42,7 +42,7 @@ namespace Umbraco.Web.PropertyEditors allowBulkPublish = true, allowBulkUnpublish = true, allowBulkCopy = true, - allowBulkMove = true, + allowBulkMove = false, allowBulkDelete = true }} }; @@ -50,7 +50,10 @@ namespace Umbraco.Web.PropertyEditors } internal class ListViewPreValueEditor : PreValueEditor - { + { + [PreValueField("tabName", "Tab Name", "textstring", Description = "The name of the listview tab (default if empty: 'Child Items')")] + public int TabName { get; set; } + [PreValueField("displayAtTabNumber", "Display At Tab Number", "number", Description = "Which tab position that the list of child items will be displayed")] public int DisplayAtTabNumber { get; set; } diff --git a/src/Umbraco.Web/PropertyEditors/TextAreaPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/TextAreaPropertyEditor.cs index 3bec23f004..7006befdcd 100644 --- a/src/Umbraco.Web/PropertyEditors/TextAreaPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/TextAreaPropertyEditor.cs @@ -6,5 +6,15 @@ namespace Umbraco.Web.PropertyEditors [PropertyEditor(Constants.PropertyEditors.TextboxMultipleAlias, "Textarea", "textarea", IsParameterEditor = true, ValueType = PropertyEditorValueTypes.Text, Icon="icon-application-window-alt")] public class TextAreaPropertyEditor : PropertyEditor { + protected override PreValueEditor CreatePreValueEditor() + { + return new TextAreaPreValueEditor(); + } + + internal class TextAreaPreValueEditor : PreValueEditor + { + [PreValueField("maxChars", "Maximum allowed characters", "number", Description = "If empty - no character limit")] + public bool MaxChars { get; set; } + } } } diff --git a/src/Umbraco.Web/PropertyEditors/TextboxPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/TextboxPropertyEditor.cs index bcfbbbf682..0fd243180c 100644 --- a/src/Umbraco.Web/PropertyEditors/TextboxPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/TextboxPropertyEditor.cs @@ -12,6 +12,19 @@ namespace Umbraco.Web.PropertyEditors { [PropertyEditor(Constants.PropertyEditors.TextboxAlias, "Textbox", "textbox", IsParameterEditor = true, Group = "Common")] public class TextboxPropertyEditor : PropertyEditor - { + { + + + protected override PreValueEditor CreatePreValueEditor() + { + return new TextboxPreValueEditor(); + } + + internal class TextboxPreValueEditor : PreValueEditor + { + [PreValueField("maxChars", "Maximum allowed characters", "number", Description = "If empty - no character limit")] + public bool MaxChars { get; set; } + } + } } diff --git a/src/Umbraco.Web/PropertyEditors/ValueConverters/MultipleMediaPickerPropertyConverter.cs b/src/Umbraco.Web/PropertyEditors/ValueConverters/LegacyMediaPickerPropertyConverter.cs similarity index 90% rename from src/Umbraco.Web/PropertyEditors/ValueConverters/MultipleMediaPickerPropertyConverter.cs rename to src/Umbraco.Web/PropertyEditors/ValueConverters/LegacyMediaPickerPropertyConverter.cs index 161e7178e7..8ef11bec8d 100644 --- a/src/Umbraco.Web/PropertyEditors/ValueConverters/MultipleMediaPickerPropertyConverter.cs +++ b/src/Umbraco.Web/PropertyEditors/ValueConverters/LegacyMediaPickerPropertyConverter.cs @@ -1,5 +1,5 @@ // -------------------------------------------------------------------------------------------------------------------- -// +// // Umbraco // // @@ -24,20 +24,20 @@ using Umbraco.Core.Services; namespace Umbraco.Web.PropertyEditors.ValueConverters { /// - /// The multiple media picker property value converter. + /// The multiple media picker and double legacy media picker property value converter, should be deleted for v8 /// [DefaultPropertyValueConverter(typeof(MustBeStringValueConverter))] - public class MultipleMediaPickerPropertyConverter : PropertyValueConverterBase, IPropertyValueConverterMeta + public class LegacyMediaPickerPropertyConverter : PropertyValueConverterBase, IPropertyValueConverterMeta { private readonly IDataTypeService _dataTypeService; //TODO: Remove this ctor in v8 since the other one will use IoC - public MultipleMediaPickerPropertyConverter() + public LegacyMediaPickerPropertyConverter() : this(ApplicationContext.Current.Services.DataTypeService) { } - public MultipleMediaPickerPropertyConverter(IDataTypeService dataTypeService) + public LegacyMediaPickerPropertyConverter(IDataTypeService dataTypeService) { if (dataTypeService == null) throw new ArgumentNullException("dataTypeService"); _dataTypeService = dataTypeService; @@ -54,10 +54,17 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters /// public override bool IsConverter(PublishedPropertyType propertyType) { - if (UmbracoConfig.For.UmbracoSettings().Content.EnablePropertyValueConverters) + if (UmbracoConfig.For.UmbracoSettings().Content.EnablePropertyValueConverters && propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.MultipleMediaPickerAlias)) { - return propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.MultipleMediaPickerAlias); + return true; } + + if (UmbracoConfig.For.UmbracoSettings().Content.EnablePropertyValueConverters && propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.MediaPickerAlias)) + { + // this is the double legacy media picker, it can pick only single media items + return true; + } + return false; } @@ -109,7 +116,7 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters ApplicationContext.Current.Services.DataTypeService.GetDataTypeDefinitionById( propertyType.DataTypeId).Name); - LogHelper.Warn(error); + LogHelper.Warn(error); throw new Exception(error); } } @@ -264,4 +271,4 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters Storages.Clear(); } } -} \ No newline at end of file +} diff --git a/src/Umbraco.Web/PropertyEditors/ValueConverters/MediaPickerPropertyConverter.cs b/src/Umbraco.Web/PropertyEditors/ValueConverters/MediaPickerPropertyConverter.cs index 5f54363975..2e9d0c7d96 100644 --- a/src/Umbraco.Web/PropertyEditors/ValueConverters/MediaPickerPropertyConverter.cs +++ b/src/Umbraco.Web/PropertyEditors/ValueConverters/MediaPickerPropertyConverter.cs @@ -126,10 +126,6 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters if (propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.MediaPicker2Alias)) return true; - if (UmbracoConfig.For.UmbracoSettings().Content.EnablePropertyValueConverters) - { - return propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.MediaPickerAlias); - } return false; } diff --git a/src/Umbraco.Web/PublishedContentExtensions.cs b/src/Umbraco.Web/PublishedContentExtensions.cs index 36d1306ab6..38666dadb9 100644 --- a/src/Umbraco.Web/PublishedContentExtensions.cs +++ b/src/Umbraco.Web/PublishedContentExtensions.cs @@ -10,6 +10,7 @@ using Umbraco.Core.Models.PublishedContent; using Umbraco.Core.Services; using Umbraco.Web.Models; using Umbraco.Core; +using Umbraco.Core.Logging; using Umbraco.Web.Routing; using ContentType = umbraco.cms.businesslogic.ContentType; @@ -24,8 +25,24 @@ namespace Umbraco.Web public static Guid GetKey(this IPublishedContent content) { + // fast var contentWithKey = content as IPublishedContentWithKey; - return contentWithKey == null ? Guid.Empty : contentWithKey.Key; + if (contentWithKey != null) return contentWithKey.Key; + + // try to unwrap (models...) + var contentWrapped = content as PublishedContentWrapped; + while (contentWrapped != null) + { + content = contentWrapped.Unwrap(); + contentWrapped = content as PublishedContentWrapped; + } + + // again + contentWithKey = content as IPublishedContentWithKey; + if (contentWithKey != null) return contentWithKey.Key; + + LogHelper.Debug(typeof(PublishedContentExtensions), string.Format("Could not get key for IPublishedContent with id {0} of type {1}.", content.Id, content.GetType().FullName)); + return Guid.Empty; } #endregion @@ -634,14 +651,10 @@ namespace Umbraco.Web private static bool IsDocumentTypeRecursive(IPublishedContent content, string docTypeAlias) { var contentTypeService = UmbracoContext.Current.Application.Services.ContentTypeService; - var type = contentTypeService.GetContentType(content.DocumentTypeAlias); - while (type != null && type.ParentId > 0) - { - type = contentTypeService.GetContentType(type.ParentId); - if (type.Alias.InvariantEquals(docTypeAlias)) - return true; - } - return false; + var type = contentTypeService.GetContentType(content.DocumentTypeAlias); + if (type.Alias.InvariantEquals(docTypeAlias) || content.IsComposedOf(docTypeAlias)) + return true; + return false; } public static bool IsNull(this IPublishedContent content, string alias, bool recurse) @@ -912,14 +925,14 @@ namespace Umbraco.Web #region Axes: ancestors, ancestors-or-self - // as per XPath 1.0 specs 2.2, + // as per XPath 1.0 specs §2.2, // - the ancestor axis contains the ancestors of the context node; the ancestors of the context node consist // of the parent of context node and the parent's parent and so on; thus, the ancestor axis will always // include the root node, unless the context node is the root node. // - the ancestor-or-self axis contains the context node and the ancestors of the context node; thus, // the ancestor axis will always include the root node. // - // as per XPath 2.0 specs 3.2.1.1, + // as per XPath 2.0 specs §3.2.1.1, // - the ancestor axis is defined as the transitive closure of the parent axis; it contains the ancestors // of the context node (the parent, the parent of the parent, and so on) - The ancestor axis includes the // root node of the tree in which the context node is found, unless the context node is the root node. @@ -929,7 +942,7 @@ namespace Umbraco.Web // the ancestor and ancestor-or-self axis are reverse axes ie they contain the context node or nodes that // are before the context node in document order. // - // document order is defined by 2.4.1 as: + // document order is defined by §2.4.1 as: // - the root node is the first node. // - every node occurs before all of its children and descendants. // - the relative order of siblings is the order in which they occur in the children property of their parent node. @@ -1240,12 +1253,12 @@ namespace Umbraco.Web } - // as per XPath 1.0 specs 2.2, + // as per XPath 1.0 specs §2.2, // - the descendant axis contains the descendants of the context node; a descendant is a child or a child of a child and so on; thus // the descendant axis never contains attribute or namespace nodes. // - the descendant-or-self axis contains the context node and the descendants of the context node. // - // as per XPath 2.0 specs 3.2.1.1, + // as per XPath 2.0 specs §3.2.1.1, // - the descendant axis is defined as the transitive closure of the child axis; it contains the descendants of the context node (the // children, the children of the children, and so on). // - the descendant-or-self axis contains the context node and the descendants of the context node. @@ -1253,7 +1266,7 @@ namespace Umbraco.Web // the descendant and descendant-or-self axis are forward axes ie they contain the context node or nodes that are after the context // node in document order. // - // document order is defined by 2.4.1 as: + // document order is defined by §2.4.1 as: // - the root node is the first node. // - every node occurs before all of its children and descendants. // - the relative order of siblings is the order in which they occur in the children property of their parent node. diff --git a/src/Umbraco.Web/Routing/UrlProviderExtensions.cs b/src/Umbraco.Web/Routing/UrlProviderExtensions.cs index 54ef8a42b5..d464b8962e 100644 --- a/src/Umbraco.Web/Routing/UrlProviderExtensions.cs +++ b/src/Umbraco.Web/Routing/UrlProviderExtensions.cs @@ -70,6 +70,7 @@ namespace Umbraco.Web.Routing // test for collisions var uri = new Uri(url.TrimEnd('/'), UriKind.RelativeOrAbsolute); if (uri.IsAbsoluteUri == false) uri = uri.MakeAbsolute(UmbracoContext.Current.CleanedUmbracoUrl); + uri = UriUtility.UriToUmbraco(uri); var pcr = new PublishedContentRequest(uri, UmbracoContext.Current.RoutingContext, UmbracoConfig.For.UmbracoSettings().WebRouting, s => Roles.Provider.GetRolesForUser(s)); pcr.Engine.TryRouteRequest(); diff --git a/src/Umbraco.Web/Security/Providers/UmbracoMembershipProvider.cs b/src/Umbraco.Web/Security/Providers/UmbracoMembershipProvider.cs index 8482eb72a2..71e2b1d0f3 100644 --- a/src/Umbraco.Web/Security/Providers/UmbracoMembershipProvider.cs +++ b/src/Umbraco.Web/Security/Providers/UmbracoMembershipProvider.cs @@ -166,11 +166,11 @@ namespace Umbraco.Web.Security.Providers username, email, FormatPasswordForStorage(encodedPassword, salt), - memberTypeAlias); + memberTypeAlias, + isApproved); member.PasswordQuestion = passwordQuestion; member.RawPasswordAnswerValue = EncryptString(passwordAnswer); - member.IsApproved = isApproved; member.LastLoginDate = DateTime.Now; member.LastPasswordChangeDate = DateTime.Now; diff --git a/src/Umbraco.Web/Trees/FileSystemTreeController.cs b/src/Umbraco.Web/Trees/FileSystemTreeController.cs index 54979990b7..0d612b5d4e 100644 --- a/src/Umbraco.Web/Trees/FileSystemTreeController.cs +++ b/src/Umbraco.Web/Trees/FileSystemTreeController.cs @@ -1,21 +1,18 @@ using System; using System.IO; -using System.Linq; using System.Net.Http.Formatting; using umbraco.BusinessLogic.Actions; using Umbraco.Core; using Umbraco.Core.IO; -using Umbraco.Core.Services; using Umbraco.Web.Models.Trees; -using System.Web; +using Umbraco.Core.Services; namespace Umbraco.Web.Trees { public abstract class FileSystemTreeController : TreeController { - protected abstract IFileSystem2 FileSystem { get; } - protected abstract string[] Extensions { get; } - protected abstract string FileIcon { get; } + protected abstract string FilePath { get; } + protected abstract string FileSearchPattern { get; } /// /// Inheritors can override this method to modify the file node that is created. @@ -31,43 +28,67 @@ namespace Umbraco.Web.Trees protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings) { - var path = string.IsNullOrEmpty(id) == false && id != Constants.System.Root.ToInvariantString() - ? HttpUtility.UrlDecode(id).TrimStart("/") - : ""; + var orgPath = ""; + string path; + if (string.IsNullOrEmpty(id) == false && id != "-1") + { + orgPath = id; + path = IOHelper.MapPath(FilePath + "/" + orgPath); + orgPath += "/"; + } + else + { + path = IOHelper.MapPath(FilePath); + } - var directories = FileSystem.GetDirectories(path); + var dirInfo = new DirectoryInfo(path); + var dirInfos = dirInfo.GetDirectories(); var nodes = new TreeNodeCollection(); - foreach (var directory in directories) + foreach (var dir in dirInfos) { - var hasChildren = FileSystem.GetFiles(directory).Any() || FileSystem.GetDirectories(directory).Any(); + if ((dir.Attributes & FileAttributes.Hidden) != 0) + continue; + + var hasChildren = dir.GetFiles().Length > 0 || dir.GetDirectories().Length > 0; + var node = CreateTreeNode(orgPath + dir.Name, orgPath, queryStrings, dir.Name, "icon-folder", hasChildren); - var name = Path.GetFileName(directory); - var node = CreateTreeNode(HttpUtility.UrlEncode(directory), path, queryStrings, name, "icon-folder", hasChildren); OnRenderFolderNode(ref node); - if(node != null) + if (node != null) nodes.Add(node); } //this is a hack to enable file system tree to support multiple file extension look-up //so the pattern both support *.* *.xml and xml,js,vb for lookups - var files = FileSystem.GetFiles(path).Where(x => - { - var extension = Path.GetExtension(x); - return extension != null && Extensions.Contains(extension.Trim('.'), StringComparer.InvariantCultureIgnoreCase); - }); + var allowedExtensions = new string[0]; + var filterByMultipleExtensions = FileSearchPattern.Contains(","); + FileInfo[] fileInfo; - foreach (var file in files) - { - var withoutExt = Path.GetFileNameWithoutExtension(file); - if (withoutExt.IsNullOrWhiteSpace() == false) - { - var name = Path.GetFileName(file); - var node = CreateTreeNode(HttpUtility.UrlEncode(file), path, queryStrings, name, FileIcon, false); - OnRenderFileNode(ref node); - if (node != null) - nodes.Add(node); - } + if (filterByMultipleExtensions) + { + fileInfo = dirInfo.GetFiles(); + allowedExtensions = FileSearchPattern.ToLower().Split(','); + } + else + fileInfo = dirInfo.GetFiles(FileSearchPattern); + + foreach (var file in fileInfo) + { + if ((file.Attributes & FileAttributes.Hidden) != 0) + continue; + + if (filterByMultipleExtensions && Array.IndexOf(allowedExtensions, file.Extension.ToLower().Trim('.')) < 0) + continue; + + var withoutExt = Path.GetFileNameWithoutExtension(file.Name); + if (withoutExt.IsNullOrWhiteSpace()) + continue; + + var node = CreateTreeNode(orgPath + file.Name, orgPath, queryStrings, file.Name, "icon-file", false); + + OnRenderFileNode(ref node); + if (node != null) + nodes.Add(node); } return nodes; @@ -90,22 +111,27 @@ namespace Umbraco.Web.Trees return menu; } - var path = string.IsNullOrEmpty(id) == false && id != Constants.System.Root.ToInvariantString() - ? System.Web.HttpUtility.UrlDecode(id).TrimStart("/") - : ""; + string path; + if (string.IsNullOrEmpty(id) == false) + { + var orgPath = System.Web.HttpUtility.UrlDecode(id); + path = IOHelper.MapPath(FilePath + "/" + orgPath); + } + else + { + path = IOHelper.MapPath(FilePath); + } - var isFile = FileSystem.FileExists(path); - var isDirectory = FileSystem.DirectoryExists(path); - - if (isDirectory) + var dirInfo = new DirectoryInfo(path); + //check if it's a directory + if (dirInfo.Attributes == FileAttributes.Directory) { //set the default to create menu.DefaultMenuAlias = ActionNew.Instance.Alias; //create action menu.Items.Add(Services.TextService.Localize(string.Format("actions/{0}", ActionNew.Instance.Alias))); - - var hasChildren = FileSystem.GetFiles(path).Any() || FileSystem.GetDirectories(path).Any(); - + + var hasChildren = dirInfo.GetFiles().Length > 0 || dirInfo.GetDirectories().Length > 0; //We can only delete folders if it doesn't have any children (folders or files) if (hasChildren == false) { @@ -116,9 +142,10 @@ namespace Umbraco.Web.Trees //refresh action menu.Items.Add(Services.TextService.Localize(string.Format("actions/{0}", ActionRefresh.Instance.Alias)), true); } - else if (isFile) + //if it's not a directory then we only allow to delete the item + else { - //if it's not a directory then we only allow to delete the item + //delete action menu.Items.Add(Services.TextService.Localize(string.Format("actions/{0}", ActionDelete.Instance.Alias))); } diff --git a/src/Umbraco.Web/Trees/FileSystemTreeController2.cs b/src/Umbraco.Web/Trees/FileSystemTreeController2.cs new file mode 100644 index 0000000000..d43d68ee77 --- /dev/null +++ b/src/Umbraco.Web/Trees/FileSystemTreeController2.cs @@ -0,0 +1,127 @@ +using System; +using System.IO; +using System.Linq; +using System.Net.Http.Formatting; +using umbraco.BusinessLogic.Actions; +using Umbraco.Core; +using Umbraco.Core.IO; +using Umbraco.Core.Services; +using Umbraco.Web.Models.Trees; +using System.Web; + +namespace Umbraco.Web.Trees +{ + public abstract class FileSystemTreeController2 : TreeController + { + protected abstract IFileSystem2 FileSystem { get; } + protected abstract string[] Extensions { get; } + protected abstract string FileIcon { get; } + + /// + /// Inheritors can override this method to modify the file node that is created. + /// + /// + protected virtual void OnRenderFileNode(ref TreeNode treeNode) { } + + /// + /// Inheritors can override this method to modify the folder node that is created. + /// + /// + protected virtual void OnRenderFolderNode(ref TreeNode treeNode) { } + + protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings) + { + var path = string.IsNullOrEmpty(id) == false && id != Constants.System.Root.ToInvariantString() + ? HttpUtility.UrlDecode(id).TrimStart("/") + : ""; + + var directories = FileSystem.GetDirectories(path); + + var nodes = new TreeNodeCollection(); + foreach (var directory in directories) + { + var hasChildren = FileSystem.GetFiles(directory).Any() || FileSystem.GetDirectories(directory).Any(); + + var name = Path.GetFileName(directory); + var node = CreateTreeNode(HttpUtility.UrlEncode(directory), path, queryStrings, name, "icon-folder", hasChildren); + OnRenderFolderNode(ref node); + if(node != null) + nodes.Add(node); + } + + //this is a hack to enable file system tree to support multiple file extension look-up + //so the pattern both support *.* *.xml and xml,js,vb for lookups + var files = FileSystem.GetFiles(path).Where(x => + { + var extension = Path.GetExtension(x); + return extension != null && Extensions.Contains(extension.Trim('.'), StringComparer.InvariantCultureIgnoreCase); + }); + + foreach (var file in files) + { + var withoutExt = Path.GetFileNameWithoutExtension(file); + if (withoutExt.IsNullOrWhiteSpace()) continue; + + var name = Path.GetFileName(file); + var node = CreateTreeNode(HttpUtility.UrlEncode(file), path, queryStrings, name, FileIcon, false); + OnRenderFileNode(ref node); + if (node != null) + nodes.Add(node); + } + + return nodes; + } + + protected override MenuItemCollection GetMenuForNode(string id, FormDataCollection queryStrings) + { + var menu = new MenuItemCollection(); + + //if root node no need to visit the filesystem so lets just create the menu and return it + if (id == Constants.System.Root.ToInvariantString()) + { + //set the default to create + menu.DefaultMenuAlias = ActionNew.Instance.Alias; + //create action + menu.Items.Add(Services.TextService.Localize(string.Format("actions/{0}", ActionNew.Instance.Alias))); + //refresh action + menu.Items.Add(Services.TextService.Localize(string.Format("actions/{0}", ActionRefresh.Instance.Alias)), true); + + return menu; + } + + var path = string.IsNullOrEmpty(id) == false && id != Constants.System.Root.ToInvariantString() + ? HttpUtility.UrlDecode(id).TrimStart("/") + : ""; + + var isFile = FileSystem.FileExists(path); + var isDirectory = FileSystem.DirectoryExists(path); + + if (isDirectory) + { + //set the default to create + menu.DefaultMenuAlias = ActionNew.Instance.Alias; + //create action + menu.Items.Add(Services.TextService.Localize(string.Format("actions/{0}", ActionNew.Instance.Alias))); + + var hasChildren = FileSystem.GetFiles(path).Any() || FileSystem.GetDirectories(path).Any(); + + //We can only delete folders if it doesn't have any children (folders or files) + if (hasChildren == false) + { + //delete action + menu.Items.Add(Services.TextService.Localize(string.Format("actions/{0}", ActionDelete.Instance.Alias)), true); + } + + //refresh action + menu.Items.Add(Services.TextService.Localize(string.Format("actions/{0}", ActionRefresh.Instance.Alias)), true); + } + else if (isFile) + { + //if it's not a directory then we only allow to delete the item + menu.Items.Add(Services.TextService.Localize(string.Format("actions/{0}", ActionDelete.Instance.Alias))); + } + + return menu; + } + } +} diff --git a/src/Umbraco.Web/Trees/PartialViewMacrosTreeController.cs b/src/Umbraco.Web/Trees/PartialViewMacrosTreeController.cs index b4cc2eb2fd..ba4724aead 100644 --- a/src/Umbraco.Web/Trees/PartialViewMacrosTreeController.cs +++ b/src/Umbraco.Web/Trees/PartialViewMacrosTreeController.cs @@ -7,15 +7,15 @@ namespace Umbraco.Web.Trees /// /// Tree for displaying partial view macros in the developer app /// - [Tree(Constants.Applications.Developer, "partialViewMacros", "Partial View Macro Files", sortOrder: 6)] - public class PartialViewMacrosTreeController : FileSystemTreeController + [Tree(Constants.Applications.Developer, "partialViewMacros", null, sortOrder: 6)] + public class PartialViewMacrosTreeController : FileSystemTreeController2 { protected override IFileSystem2 FileSystem { get { return FileSystemProviderManager.Current.MacroPartialsFileSystem; } } - private static readonly string[] ExtensionsStatic = { "cshtml" }; + private static readonly string[] ExtensionsStatic = {"cshtml"}; protected override string[] Extensions { diff --git a/src/Umbraco.Web/Trees/PartialViewsTreeController.cs b/src/Umbraco.Web/Trees/PartialViewsTreeController.cs index 264b44ad73..bf4ec65a2e 100644 --- a/src/Umbraco.Web/Trees/PartialViewsTreeController.cs +++ b/src/Umbraco.Web/Trees/PartialViewsTreeController.cs @@ -7,15 +7,15 @@ namespace Umbraco.Web.Trees /// /// Tree for displaying partial views in the settings app /// - [Tree(Constants.Applications.Settings, "partialViews", "Partial Views", sortOrder: 2)] - public class PartialViewsTreeController : FileSystemTreeController + [Tree(Constants.Applications.Settings, "partialViews", null, sortOrder: 2)] + public class PartialViewsTreeController : FileSystemTreeController2 { - protected override IFileSystem2 FileSystem - { - get { return FileSystemProviderManager.Current.PartialViewsFileSystem; } - } + protected override IFileSystem2 FileSystem + { + get { return FileSystemProviderManager.Current.PartialViewsFileSystem; } + } - private static readonly string[] ExtensionsStatic = { "cshtml" }; + private static readonly string[] ExtensionsStatic = {"cshtml"}; protected override string[] Extensions { diff --git a/src/Umbraco.Web/Trees/ScriptTreeController.cs b/src/Umbraco.Web/Trees/ScriptTreeController.cs index 616106a625..cb9954019b 100644 --- a/src/Umbraco.Web/Trees/ScriptTreeController.cs +++ b/src/Umbraco.Web/Trees/ScriptTreeController.cs @@ -4,8 +4,8 @@ using Umbraco.Web.Models.Trees; namespace Umbraco.Web.Trees { - [Tree(Constants.Applications.Settings, "scripts", "Scripts", sortOrder: 4)] - public class ScriptTreeController : FileSystemTreeController + [Tree(Constants.Applications.Settings, "scripts", null, sortOrder: 4)] + public class ScriptTreeController : FileSystemTreeController2 { protected override IFileSystem2 FileSystem { diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index cb51683498..7724f083a2 100644 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -411,7 +411,7 @@ - + @@ -435,6 +435,7 @@ + @@ -712,7 +713,7 @@ - + diff --git a/src/Umbraco.Web/UmbracoApplication.cs b/src/Umbraco.Web/UmbracoApplication.cs index 0f6fc03b80..b9650a8230 100644 --- a/src/Umbraco.Web/UmbracoApplication.cs +++ b/src/Umbraco.Web/UmbracoApplication.cs @@ -34,9 +34,9 @@ namespace Umbraco.Web var appPluginFolder = IOHelper.MapPath("~/App_Plugins/"); if (Directory.Exists(appPluginFolder)) { - _mw = new ManifestWatcher(LoggerResolver.Current.Logger); - _mw.Start(Directory.GetDirectories(IOHelper.MapPath("~/App_Plugins/"))); - } + _mw = new ManifestWatcher(LoggerResolver.Current.Logger); + _mw.Start(Directory.GetDirectories(appPluginFolder)); + } } } diff --git a/src/Umbraco.Web/umbraco.presentation/library.cs b/src/Umbraco.Web/umbraco.presentation/library.cs index 38b8b1b95d..4ab89c5c7d 100644 --- a/src/Umbraco.Web/umbraco.presentation/library.cs +++ b/src/Umbraco.Web/umbraco.presentation/library.cs @@ -1393,15 +1393,25 @@ namespace umbraco /// An XpathNodeIterator containing the current page as Xml. public static XPathNodeIterator GetXmlNodeCurrent() { + var pageId = ""; + try { var nav = Umbraco.Web.UmbracoContext.Current.ContentCache.GetXPathNavigator(); - nav.MoveToId(HttpContext.Current.Items["pageID"].ToString()); + var pageIdItem = HttpContext.Current.Items["pageID"]; + + if (pageIdItem == null) + { + throw new NullReferenceException("pageID not found in the current HTTP context"); + } + + pageId = pageIdItem.ToString(); + nav.MoveToId(pageId); return nav.Select("."); } catch (Exception ex) { - LogHelper.Error("Could not retrieve current xml node", ex); + LogHelper.Error(string.Concat("Could not retrieve current xml node for page Id ",pageId), ex); } XmlDocument xd = new XmlDocument(); diff --git a/src/Umbraco.Web/umbraco.presentation/macro.cs b/src/Umbraco.Web/umbraco.presentation/macro.cs index 6d2936cd9a..dac3c0e1bf 100644 --- a/src/Umbraco.Web/umbraco.presentation/macro.cs +++ b/src/Umbraco.Web/umbraco.presentation/macro.cs @@ -46,6 +46,7 @@ using System.Linq; using File = System.IO.File; using MacroTypes = umbraco.cms.businesslogic.macro.MacroTypes; using Member = umbraco.cms.businesslogic.member.Member; +using UserControl = System.Web.UI.UserControl; namespace umbraco { diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Macros/assemblyBrowser.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Macros/assemblyBrowser.aspx.cs index d186d9ef50..273318cbff 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Macros/assemblyBrowser.aspx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Macros/assemblyBrowser.aspx.cs @@ -19,6 +19,7 @@ using Umbraco.Core.PropertyEditors; using umbraco.BusinessLogic; using System.Collections.Generic; using MacroProperty = umbraco.cms.businesslogic.macro.MacroProperty; +using UserControl = System.Web.UI.UserControl; namespace umbraco.developer {