From d4fff978144a1d6d88f32449f05ec59b5cced192 Mon Sep 17 00:00:00 2001 From: Jan Skovgaard Date: Wed, 22 Aug 2018 11:23:51 +0200 Subject: [PATCH] Move the setModePublishStatus function above the scope.previewOpenUrl...not sure why but this makes the status be visible when logged in as something other than an administrator. When logged in as an admin it worked fine before. Can't quite make sense of this. But now it works. --- .../content/umbcontentnodeinfo.directive.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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 fd912d9f02..0043a2c77e 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 @@ -16,14 +16,13 @@ // By default we don't show the open anchors scope.allowOpen = false; - // If we're logged in as an admin user we show the open anchors + // // If we're logged in as an admin user we show the open anchors userService.getCurrentUser().then(function (currentUser) { if(currentUser.userType === "admin"){ scope.allowOpen = true; } }); - scope.datePickerConfig = { pickDate: true, pickTime: true, @@ -50,11 +49,11 @@ // make sure dates are formatted to the user's locale formatDatesToLocal(); - // Declare a fallback URL for the directive - scope.previewOpenUrl = '#/settings/documenttypes/edit/' + scope.documentType.id; - + // Make sure to set the node status setNodePublishStatus(scope.node); + // Declare a fallback URL for the directive + scope.previewOpenUrl = '#/settings/documenttypes/edit/' + scope.documentType.id; } scope.auditTrailPageChange = function (pageNumber) { @@ -124,6 +123,7 @@ function setAuditTrailLogTypeColor(auditTrail) { angular.forEach(auditTrail, function (item) { + switch (item.logType) { case "Publish": item.logTypeColor = "success"; @@ -140,6 +140,7 @@ function setNodePublishStatus(node) { + console.log(node); // deleted node if(node.trashed === true) { scope.publishStatus.label = localizationService.localize("general_deleted");