@@ -16,10 +16,15 @@ angular.module("umbraco.directives")
|
||||
replace: true,
|
||||
templateUrl: 'views/components/property/umb-property.html',
|
||||
link: function (scope) {
|
||||
userService.getCurrentUser().then(function (u) {
|
||||
var isAdmin = u.userGroups.indexOf('admin') !== -1;
|
||||
scope.propertyAlias = (Umbraco.Sys.ServerVariables.isDebuggingEnabled === true || isAdmin) ? scope.property.alias : null;
|
||||
});
|
||||
|
||||
scope.controlLabelTitle = null;
|
||||
if(Umbraco.Sys.ServerVariables.isDebuggingEnabled) {
|
||||
userService.getCurrentUser().then(function (u) {
|
||||
if(u.allowedSections.indexOf("settings") !== -1 ? true : false) {
|
||||
scope.controlLabelTitle = scope.property.alias;
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
//Define a controller for this directive to expose APIs to other directives
|
||||
controller: function ($scope) {
|
||||
|
||||
@@ -102,10 +102,15 @@
|
||||
if (!scope.editLabelKey) {
|
||||
scope.editLabelKey = "general_edit";
|
||||
}
|
||||
userService.getCurrentUser().then(function (u) {
|
||||
var isAdmin = u.userGroups.indexOf('admin') !== -1;
|
||||
scope.alias = (Umbraco.Sys.ServerVariables.isDebuggingEnabled === true || isAdmin) ? scope.alias : null;
|
||||
});
|
||||
|
||||
scope.nodeNameTitle = null;
|
||||
if(Umbraco.Sys.ServerVariables.isDebuggingEnabled) {
|
||||
userService.getCurrentUser().then(function (u) {
|
||||
if (u.allowedSections.indexOf("settings") !== -1 ? true : false) {
|
||||
scope.nodeNameTitle = scope.alias;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
var directive = {
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<localize key="contentTypeEditor_inheritedFrom"></localize> {{inheritsFrom}}
|
||||
</small>
|
||||
|
||||
<label class="control-label" for="{{property.alias}}" ng-attr-title="{{propertyAlias}}">
|
||||
<label class="control-label" for="{{property.alias}}" ng-attr-title="{{controlLabelTitle}}">
|
||||
|
||||
{{property.label}}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<i ng-if="icon" class="umb-node-preview__icon {{ icon }}" aria-hidden="true"></i>
|
||||
<div class="umb-node-preview__content">
|
||||
|
||||
<div class="umb-node-preview__name" ng-attr-title="{{alias}}">{{ name }}</div>
|
||||
<div class="umb-node-preview__name" ng-attr-title="{{nodeNameTitle}}">{{ name }}</div>
|
||||
<div class="umb-node-preview__description" ng-if="description">{{ description }}</div>
|
||||
|
||||
<div class="umb-user-group-preview__permissions" ng-if="permissions">
|
||||
|
||||
Reference in New Issue
Block a user