diff --git a/src/Umbraco.Infrastructure/Packaging/PackageDataInstallation.cs b/src/Umbraco.Infrastructure/Packaging/PackageDataInstallation.cs
index f63df1d0d2..8f9352ce22 100644
--- a/src/Umbraco.Infrastructure/Packaging/PackageDataInstallation.cs
+++ b/src/Umbraco.Infrastructure/Packaging/PackageDataInstallation.cs
@@ -1558,7 +1558,15 @@ namespace Umbraco.Cms.Infrastructure.Packaging
var masterElement = templateElement.Element("Master");
var existingTemplate = _fileService.GetTemplate(alias) as Template;
+
var template = existingTemplate ?? new Template(_shortStringHelper, templateName, alias);
+
+ // For new templates, use the serialized key if avaialble.
+ if (existingTemplate == null && Guid.TryParse(templateElement.Element("Key")?.Value, out var key))
+ {
+ template.Key = key;
+ }
+
template.Content = design;
if (masterElement != null && string.IsNullOrEmpty((string)masterElement) == false)
diff --git a/src/Umbraco.Infrastructure/Services/Implement/EntityXmlSerializer.cs b/src/Umbraco.Infrastructure/Services/Implement/EntityXmlSerializer.cs
index 568e18b13e..d2c3189447 100644
--- a/src/Umbraco.Infrastructure/Services/Implement/EntityXmlSerializer.cs
+++ b/src/Umbraco.Infrastructure/Services/Implement/EntityXmlSerializer.cs
@@ -1,11 +1,9 @@
using System;
using System.Collections.Generic;
using System.Globalization;
-using System.IO;
using System.Linq;
using System.Net;
using System.Xml.Linq;
-using Umbraco.Cms.Core.IO;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.PropertyEditors;
using Umbraco.Cms.Core.Serialization;
@@ -319,6 +317,7 @@ namespace Umbraco.Cms.Core.Services.Implement
{
var xml = new XElement("Template");
xml.Add(new XElement("Name", template.Name));
+ xml.Add(new XElement("Key", template.Key));
xml.Add(new XElement("Alias", template.Alias));
xml.Add(new XElement("Design", new XCData(template.Content)));
diff --git a/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Users/userGroups.js b/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Users/userGroups.js
index afef0e7701..ce2e366f2c 100644
--- a/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Users/userGroups.js
+++ b/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Users/userGroups.js
@@ -19,7 +19,7 @@ context('User Groups', () => {
// Assign sections
cy.get('.umb-box:nth-child(1) .umb-property:nth-child(1) localize').click();
- cy.get('.umb-tree-item span').click({multiple:true});
+ cy.get('.umb-tree-item__inner').click({multiple:true, timeout: 10000});
cy.get('.btn-success').last().click();
// Save
diff --git a/src/Umbraco.Tests.Integration/Umbraco.Core/Packaging/CreatedPackagesRepositoryTests.cs b/src/Umbraco.Tests.Integration/Umbraco.Core/Packaging/CreatedPackagesRepositoryTests.cs
index b1f3fbf847..3eca38be76 100644
--- a/src/Umbraco.Tests.Integration/Umbraco.Core/Packaging/CreatedPackagesRepositoryTests.cs
+++ b/src/Umbraco.Tests.Integration/Umbraco.Core/Packaging/CreatedPackagesRepositoryTests.cs
@@ -327,7 +327,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Core.Packaging
Assert.Multiple(() =>
{
Assert.AreEqual("umbPackage", xml.Root.Name.ToString());
- Assert.AreEqual($"Text pagetextPage", xml.Element("umbPackage").Element("Templates").ToString(SaveOptions.DisableFormatting));
+ Assert.AreEqual($"Text page{template.Key}textPage", xml.Element("umbPackage").Element("Templates").ToString(SaveOptions.DisableFormatting));
Assert.IsNull(xml.DocumentType);
Assert.IsNull(xml.Parent);
Assert.IsNull(xml.NextNode);
diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Packaging/PackageDataInstallationTests.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Packaging/PackageDataInstallationTests.cs
index 6e45d1708a..39ca764f94 100644
--- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Packaging/PackageDataInstallationTests.cs
+++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Packaging/PackageDataInstallationTests.cs
@@ -233,6 +233,34 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Packaging
Assert.That(templates, Is.Not.Null);
Assert.That(templates.Any(), Is.True);
Assert.That(templates.Count(), Is.EqualTo(1));
+
+ var template = templates.First();
+ Assert.AreEqual(template.Name, "Articles");
+ }
+
+ [Test]
+ public void Can_Import_Single_Template_With_Key()
+ {
+ // Arrange
+ string strXml = ImportResources.StandardMvc_Package;
+ var xml = XElement.Parse(strXml);
+ XElement element = xml.Descendants("Templates").First();
+
+ var firstTemplateElement = element.Elements("Template").First();
+ var key = Guid.NewGuid();
+ firstTemplateElement.Add(new XElement("Key", key));
+
+ // Act
+ IEnumerable templates = PackageDataInstallation.ImportTemplate(firstTemplateElement, 0);
+
+ // Assert
+ Assert.That(templates, Is.Not.Null);
+ Assert.That(templates.Any(), Is.True);
+ Assert.That(templates.Count(), Is.EqualTo(1));
+
+ var template = templates.First();
+ Assert.AreEqual(template.Name, "Articles");
+ Assert.AreEqual(template.Key, key);
}
[Test]
diff --git a/src/Umbraco.Web.Common/Umbraco.Web.Common.csproj b/src/Umbraco.Web.Common/Umbraco.Web.Common.csproj
index ea4194431f..fcd62febf4 100644
--- a/src/Umbraco.Web.Common/Umbraco.Web.Common.csproj
+++ b/src/Umbraco.Web.Common/Umbraco.Web.Common.csproj
@@ -35,8 +35,8 @@
-
-
+
+
all
diff --git a/src/Umbraco.Web.UI.Client/src/less/components/prevalues/multivalues.less b/src/Umbraco.Web.UI.Client/src/less/components/prevalues/multivalues.less
index 6cdc5b1c99..48d581b313 100644
--- a/src/Umbraco.Web.UI.Client/src/less/components/prevalues/multivalues.less
+++ b/src/Umbraco.Web.UI.Client/src/less/components/prevalues/multivalues.less
@@ -45,15 +45,15 @@
&.ui-sortable-handle,
.ui-sortable-handle,
- .handle
- {
+ .handle {
cursor: move;
}
- i {
+ .umb-icon,
+ i.icon {
display: flex;
- align-items: center;
- margin-right: 5px
+ align-self: center;
+ margin-right: 5px;
}
a {
diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-form-check.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-form-check.less
index f13ae198d6..bb4af5e05c 100644
--- a/src/Umbraco.Web.UI.Client/src/less/components/umb-form-check.less
+++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-form-check.less
@@ -97,7 +97,8 @@
.icon,
.umb-icon {
- font-size: 1.2rem;
+ font-size: 0.9rem;
+ line-height: 1;
}
&__state {
@@ -110,6 +111,8 @@
&__check {
display: flex;
+ align-items: center;
+ justify-content: center;
position: relative;
background: @white;
border: 1px solid @inputBorder;
diff --git a/src/Umbraco.Web.UI.Client/src/less/components/umb-grid.less b/src/Umbraco.Web.UI.Client/src/less/components/umb-grid.less
index b92d1db05a..98438a3447 100644
--- a/src/Umbraco.Web.UI.Client/src/less/components/umb-grid.less
+++ b/src/Umbraco.Web.UI.Client/src/less/components/umb-grid.less
@@ -565,12 +565,11 @@
// ICONS
// -------------------------
.umb-grid .iconBox {
- padding: 4px 6px;
- display: inline-block;
- cursor: pointer;
+ padding: 6px;
+ display: flex;
border-radius: 200px;
border: 1px solid @ui-action-discreet-border;
- margin: 2px;
+ margin: 0 auto;
&:hover, &:hover * {
background: @ui-action-discreet-type-hover !important;
@@ -599,8 +598,6 @@
-webkit-appearance: none;
background-image: linear-gradient(to bottom,@gray-9,@gray-7);
background-repeat: repeat-x;
- zoom: 1;
- border-color: @gray-7 @gray-7 @gray-6;
border-color: rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);
box-shadow: inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);
border-radius: 3px;
diff --git a/src/Umbraco.Web.UI.Client/src/views/components/content/umb-tabbed-content.html b/src/Umbraco.Web.UI.Client/src/views/components/content/umb-tabbed-content.html
index 1b736490da..66687336e0 100644
--- a/src/Umbraco.Web.UI.Client/src/views/components/content/umb-tabbed-content.html
+++ b/src/Umbraco.Web.UI.Client/src/views/components/content/umb-tabbed-content.html
@@ -29,7 +29,8 @@
data-app-anchor="{{group.id}}"
data-element="group-{{group.alias}}"
ng-repeat="group in content.tabs track by group.key"
- ng-show="(group.parentAlias === activeTabAlias && group.type === 'Group') || tabs.length === 0">
+ ng-if="group.type === 'Group'"
+ ng-show="group.parentAlias === activeTabAlias || tabs.length === 0">