Added the user ID and GUID to the user details view. (#3279)

This commit is contained in:
Ed Parry
2018-10-19 14:13:07 +01:00
committed by Sebastiaan Janssen
parent ecf9c0adb4
commit 201a2cd7b1
7 changed files with 52 additions and 2 deletions

View File

@@ -0,0 +1,25 @@
/**
* @ngdoc controller
* @name Umbraco.Editors.IdWithGuidValueController
* @function
*
* @description
* The controller for the idwithguid property editor, which formats the ID as normal
* with the GUID in smaller text below, as used across the backoffice.
*/
function IdWithGuidValueController($rootScope, $scope, $filter) {
function formatDisplayValue() {
if ($scope.model.value.length > 1) {
$scope.displayid = $scope.model.value[0];
$scope.displayguid = $scope.model.value[1];
} else {
$scope.displayid = $scope.model.value;
}
}
//format the display value on init:
formatDisplayValue();
}
angular.module('umbraco').controller("Umbraco.PropertyEditors.IdWithGuidValueController", IdWithGuidValueController);

View File

@@ -0,0 +1,4 @@
<div class="umb-editor umb-readonlyvalue umb-idwithguidvalue" ng-controller="Umbraco.PropertyEditors.IdWithGuidValueController">
<div>{{ displayid }}</div>
<small>{{ displayguid }}</small>
</div>

View File

@@ -385,7 +385,19 @@
</div>
</div>
</div>
<div class="umb-user-details-details__information-item">
<div class="umb-user-details-details__information-item-label">
<localize key="general_id">Id</localize>:
</div>
<div class="umb-user-details-details__information-item-content">
{{ model.user.id }}
</div>
<div class="umb-user-details-details__information-item-content">
<small>{{ model.user.key }}</small>
</div>
</div>
</div>
</div>