From 4a9e32626747f5bc7ef21d89eb3e1a45c6bb4142 Mon Sep 17 00:00:00 2001 From: Robert Date: Wed, 27 Sep 2017 09:28:51 +0200 Subject: [PATCH] Remove the rest of umb properties --- .../Models/Mapping/ContentModelMapper.cs | 61 ++++++++----------- .../Mapping/TabsAndPropertiesResolver.cs | 8 +-- 2 files changed, 27 insertions(+), 42 deletions(-) diff --git a/src/Umbraco.Web/Models/Mapping/ContentModelMapper.cs b/src/Umbraco.Web/Models/Mapping/ContentModelMapper.cs index 01a74baf74..44f8448608 100644 --- a/src/Umbraco.Web/Models/Mapping/ContentModelMapper.cs +++ b/src/Umbraco.Web/Models/Mapping/ContentModelMapper.cs @@ -122,32 +122,32 @@ namespace Umbraco.Web.Models.Mapping var properties = new List { - new ContentPropertyDisplay - { - Alias = string.Format("{0}releasedate", Constants.PropertyEditors.InternalGenericPropertiesPrefix), - Label = localizedText.Localize("content/releaseDate"), - Value = display.ReleaseDate.HasValue ? display.ReleaseDate.Value.ToIsoString() : null, - //Not editible for people without publish permission (U4-287) - View = display.AllowedActions.Contains(ActionPublish.Instance.Letter.ToString(CultureInfo.InvariantCulture)) ? "datepicker" : PropertyEditorResolver.Current.GetByAlias(Constants.PropertyEditors.NoEditAlias).ValueEditor.View, - Config = new Dictionary - { - {"offsetTime", "1"} - } - //TODO: Fix up hard coded datepicker - }, - new ContentPropertyDisplay - { - Alias = string.Format("{0}expiredate", Constants.PropertyEditors.InternalGenericPropertiesPrefix), - Label = localizedText.Localize("content/unpublishDate"), - Value = display.ExpireDate.HasValue ? display.ExpireDate.Value.ToIsoString() : null, - //Not editible for people without publish permission (U4-287) - View = display.AllowedActions.Contains(ActionPublish.Instance.Letter.ToString(CultureInfo.InvariantCulture)) ? "datepicker" : PropertyEditorResolver.Current.GetByAlias(Constants.PropertyEditors.NoEditAlias).ValueEditor.View, - Config = new Dictionary - { - {"offsetTime", "1"} - } - //TODO: Fix up hard coded datepicker - }, + //new ContentPropertyDisplay + //{ + // Alias = string.Format("{0}releasedate", Constants.PropertyEditors.InternalGenericPropertiesPrefix), + // Label = localizedText.Localize("content/releaseDate"), + // Value = display.ReleaseDate.HasValue ? display.ReleaseDate.Value.ToIsoString() : null, + // //Not editible for people without publish permission (U4-287) + // View = display.AllowedActions.Contains(ActionPublish.Instance.Letter.ToString(CultureInfo.InvariantCulture)) ? "datepicker" : PropertyEditorResolver.Current.GetByAlias(Constants.PropertyEditors.NoEditAlias).ValueEditor.View, + // Config = new Dictionary + // { + // {"offsetTime", "1"} + // } + // //TODO: Fix up hard coded datepicker + //}, + //new ContentPropertyDisplay + //{ + // Alias = string.Format("{0}expiredate", Constants.PropertyEditors.InternalGenericPropertiesPrefix), + // Label = localizedText.Localize("content/unpublishDate"), + // Value = display.ExpireDate.HasValue ? display.ExpireDate.Value.ToIsoString() : null, + // //Not editible for people without publish permission (U4-287) + // View = display.AllowedActions.Contains(ActionPublish.Instance.Letter.ToString(CultureInfo.InvariantCulture)) ? "datepicker" : PropertyEditorResolver.Current.GetByAlias(Constants.PropertyEditors.NoEditAlias).ValueEditor.View, + // Config = new Dictionary + // { + // {"offsetTime", "1"} + // } + // //TODO: Fix up hard coded datepicker + //}, }; @@ -209,15 +209,6 @@ namespace Umbraco.Web.Models.Mapping display.AllowedTemplates = templateProperty.Config; display.DocTypeValue = docTypeProperty.Value; } - - // inject 'Link to document' as the first generic property - genericProperties.Insert(0, new ContentPropertyDisplay - { - Alias = string.Format("{0}urls", Constants.PropertyEditors.InternalGenericPropertiesPrefix), - Label = localizedText.Localize("content/urls"), - Value = string.Join(",", display.Urls), - View = "urllist" //TODO: Hard coding this because the templatepicker doesn't necessarily need to be a resolvable (real) property editor - }); }); } diff --git a/src/Umbraco.Web/Models/Mapping/TabsAndPropertiesResolver.cs b/src/Umbraco.Web/Models/Mapping/TabsAndPropertiesResolver.cs index 383373f465..3e0fcadfd4 100644 --- a/src/Umbraco.Web/Models/Mapping/TabsAndPropertiesResolver.cs +++ b/src/Umbraco.Web/Models/Mapping/TabsAndPropertiesResolver.cs @@ -64,13 +64,7 @@ namespace Umbraco.Web.Models.Mapping var contentProps = new List { - new ContentPropertyDisplay - { - Alias = string.Format("{0}id", Constants.PropertyEditors.InternalGenericPropertiesPrefix), - Label = "Id", - Value = Convert.ToInt32(display.Id).ToInvariantString() + "
" + display.Key + "", - View = labelEditor - }, + }; if (customProperties != null)