Refactor of ContentTypeContainerConfiguration to use a collection instead of multiple delimited strings

This commit is contained in:
AndyButland
2014-07-28 22:34:30 +02:00
parent 50f1a995e9
commit 180e93a3bf
4 changed files with 58 additions and 49 deletions

View File

@@ -1,4 +1,5 @@
using System.ComponentModel.DataAnnotations;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Runtime.Serialization;
namespace Umbraco.Web.Models.ContentEditing
@@ -20,20 +21,6 @@ namespace Umbraco.Web.Models.ContentEditing
/// </summary>
[DataMember(Name = "additionalColumnAliases")]
public string AdditionalColumnAliases { get; set; }
/// <summary>
/// The headers for the additional columns displayed after the node name in the list
/// </summary>
/// <remarks>This isn't persisted, but is calculated from the aliases when passed to the UI</remarks>
[DataMember(Name = "additionalColumnHeaders")]
public string AdditionalColumnHeaders { get; set; }
/// <summary>
/// The localization keys for the additional columns displayed after the node name in the list
/// </summary>
/// <remarks>This isn't persisted, but is calculated from the aliases when passed to the UI</remarks>
[DataMember(Name = "additionalColumnLocalizationKeys")]
public string AdditionalColumnLocalizationKeys { get; set; }
/// <summary>
/// The default order by column for the list
@@ -64,5 +51,25 @@ namespace Umbraco.Web.Models.ContentEditing
/// </summary>
[DataMember(Name = "allowBulkDelete")]
public bool AllowBulkDelete { get; set; }
/// <summary>
/// The column details for the additional columns displayed after the node name in the list
/// </summary>
/// <remarks>This isn't persisted, but is calculated from the aliases when passed to the UI</remarks>
[DataMember(Name = "additionalColumns")]
public IList<AdditionalColumnDetail> AdditionalColumns { get; set; }
[DataContract(Namespace = "")]
public class AdditionalColumnDetail
{
[DataMember(Name = "alias")]
public string Alias { get; set; }
[DataMember(Name = "header")]
public string Header { get; set; }
[DataMember(Name = "localizationKey")]
public string LocalizationKey { get; set; }
}
}
}