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.
This commit is contained in:
@@ -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 <umb-node-preview/> 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 <umb-node-preview/> 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");
|
||||
|
||||
Reference in New Issue
Block a user