diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/idwithguid/idwithguid.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/idwithguid/idwithguid.controller.js new file mode 100644 index 0000000000..1402226f78 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/idwithguid/idwithguid.controller.js @@ -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); diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/idwithguid/idwithguid.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/idwithguid/idwithguid.html new file mode 100644 index 0000000000..a3d9970cd0 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/idwithguid/idwithguid.html @@ -0,0 +1,4 @@ +
+
{{ displayid }}
+ {{ displayguid }} +
diff --git a/src/Umbraco.Web.UI.Client/src/views/users/views/user/details.html b/src/Umbraco.Web.UI.Client/src/views/users/views/user/details.html index 15a75c30b2..d0acec1522 100644 --- a/src/Umbraco.Web.UI.Client/src/views/users/views/user/details.html +++ b/src/Umbraco.Web.UI.Client/src/views/users/views/user/details.html @@ -385,7 +385,19 @@ - +
+
+ Id: +
+
+ {{ model.user.id }} +
+
+ {{ model.user.key }} +
+
+ + diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/da.xml b/src/Umbraco.Web.UI/umbraco/config/lang/da.xml index 2ce6a31786..e68365ddb8 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/da.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/da.xml @@ -564,6 +564,7 @@ Skjul Historik Ikon + Id Importer Indre margen Indsæt diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/en.xml b/src/Umbraco.Web.UI/umbraco/config/lang/en.xml index 89ba5e0828..f1b415f3c5 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/en.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/en.xml @@ -597,6 +597,7 @@ Hide History Icon + Id Import Info Inner margin diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml b/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml index a42d4d0c60..31d157f54c 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml @@ -597,6 +597,7 @@ Hide History Icon + Id Import Info Inner margin diff --git a/src/Umbraco.Web/Models/Mapping/MemberModelMapper.cs b/src/Umbraco.Web/Models/Mapping/MemberModelMapper.cs index 5b53f1ef8d..e7d048545d 100644 --- a/src/Umbraco.Web/Models/Mapping/MemberModelMapper.cs +++ b/src/Umbraco.Web/Models/Mapping/MemberModelMapper.cs @@ -328,11 +328,17 @@ namespace Umbraco.Web.Models.Mapping var genericProperties = new List { + new ContentPropertyDisplay + { + Alias = string.Format("{0}id", Constants.PropertyEditors.InternalGenericPropertiesPrefix), + Label = _localizedTextService.Localize("general/id"), + Value = new List {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 },