diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js index b1ce4a266c..9844118858 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js @@ -174,8 +174,8 @@ */ function createButtons(content) { - // for trashed items, the save button is the primary action - otherwise it's a secondary action - $scope.page.saveButtonStyle = content.trashed ? "primary" : "info"; + // for trashed and element type items, the save button is the primary action - otherwise it's a secondary action + $scope.page.saveButtonStyle = content.trashed || content.isElement ? "primary" : "info"; // only create the save/publish/preview buttons if the // content app is "Conent" diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbcontentnodeinfo.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbcontentnodeinfo.directive.js index 7ca7e337bb..0fdfe6a457 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbcontentnodeinfo.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbcontentnodeinfo.directive.js @@ -64,7 +64,7 @@ setNodePublishStatus(); - if (scope.currentUrls.length === 0) { + if (scope.currentUrls && scope.currentUrls.length === 0) { if (scope.node.id > 0) { //it's created but not published scope.currentUrls.push({ text: labels.notPublished, isUrl: false }); @@ -104,6 +104,8 @@ loadAuditTrail(); } + // never show templates for element types (if they happen to have been created in the content tree) + scope.disableTemplates = scope.disableTemplates || scope.node.isElement; } scope.auditTrailPageChange = function (pageNumber) { @@ -303,6 +305,12 @@ } function updateCurrentUrls() { + // never show urls for element types (if they happen to have been created in the content tree) + if (scope.node.isElement) { + scope.currentUrls = null; + return; + } + // find the urls for the currently selected language if (scope.node.variants.length > 1) { // nodes with variants diff --git a/src/Umbraco.Web.UI.Client/src/views/components/content/edit.html b/src/Umbraco.Web.UI.Client/src/views/components/content/edit.html index dda9334e05..1f38d61469 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/content/edit.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/content/edit.html @@ -57,9 +57,9 @@ shortcut="ctrl+s" add-ellipsis="{{page.saveButtonEllipsis}}"> - - (content); - display.AllowPreview = display.AllowPreview && content.Trashed == false; + display.AllowPreview = display.AllowPreview && content.Trashed == false && content.ContentType.IsElement == false; return display; }