Added the user ID and GUID to the user details view. (#3279)
This commit is contained in:
committed by
Sebastiaan Janssen
parent
ecf9c0adb4
commit
201a2cd7b1
@@ -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);
|
||||
@@ -0,0 +1,4 @@
|
||||
<div class="umb-editor umb-readonlyvalue umb-idwithguidvalue" ng-controller="Umbraco.PropertyEditors.IdWithGuidValueController">
|
||||
<div>{{ displayid }}</div>
|
||||
<small>{{ displayguid }}</small>
|
||||
</div>
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -564,6 +564,7 @@
|
||||
<key alias="hide">Skjul</key>
|
||||
<key alias="history">Historik</key>
|
||||
<key alias="icon">Ikon</key>
|
||||
<key alias="id">Id</key>
|
||||
<key alias="import">Importer</key>
|
||||
<key alias="innerMargin">Indre margen</key>
|
||||
<key alias="insert">Indsæt</key>
|
||||
|
||||
@@ -597,6 +597,7 @@
|
||||
<key alias="hide">Hide</key>
|
||||
<key alias="history">History</key>
|
||||
<key alias="icon">Icon</key>
|
||||
<key alias="id">Id</key>
|
||||
<key alias="import">Import</key>
|
||||
<key alias="info">Info</key>
|
||||
<key alias="innerMargin">Inner margin</key>
|
||||
|
||||
@@ -597,6 +597,7 @@
|
||||
<key alias="hide">Hide</key>
|
||||
<key alias="history">History</key>
|
||||
<key alias="icon">Icon</key>
|
||||
<key alias="id">Id</key>
|
||||
<key alias="import">Import</key>
|
||||
<key alias="info">Info</key>
|
||||
<key alias="innerMargin">Inner margin</key>
|
||||
|
||||
@@ -328,11 +328,17 @@ namespace Umbraco.Web.Models.Mapping
|
||||
|
||||
var genericProperties = new List<ContentPropertyDisplay>
|
||||
{
|
||||
new ContentPropertyDisplay
|
||||
{
|
||||
Alias = string.Format("{0}id", Constants.PropertyEditors.InternalGenericPropertiesPrefix),
|
||||
Label = _localizedTextService.Localize("general/id"),
|
||||
Value = new List<string> {member.Id.ToString(), member.Key.ToString()},
|
||||
View = "idwithguid"
|
||||
},
|
||||
new ContentPropertyDisplay
|
||||
{
|
||||
Alias = string.Format("{0}doctype", Constants.PropertyEditors.InternalGenericPropertiesPrefix),
|
||||
Label = _localizedTextService.Localize("content/membertype"),
|
||||
//Value = localizedText.UmbracoDictionaryTranslate(display.ContentTypeName),
|
||||
Value = _localizedTextService.UmbracoDictionaryTranslate(member.ContentType.Name),
|
||||
View = PropertyEditorResolver.Current.GetByAlias(Constants.PropertyEditors.NoEditAlias).ValueEditor.View
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user