Add option for Listview to change the tab name

This commit is contained in:
srmooney
2017-07-06 10:50:19 -04:00
parent dde0f1aa36
commit 1e6d50a86b
2 changed files with 10 additions and 2 deletions

View File

@@ -170,7 +170,12 @@ namespace Umbraco.Web.Models.Mapping
var listViewConfig = editor.PreValueEditor.ConvertDbToEditor(editor.DefaultPreValues, preVals);
//add the entity type to the config
listViewConfig["entityType"] = entityType;
listViewConfig["entityType"] = entityType;
//Override Tab Label if tabName is provided
if (listViewConfig.ContainsKey("tabName") && !String.IsNullOrWhiteSpace(listViewConfig["tabName"].ToString())) {
listViewTab.Label = listViewConfig["tabName"].ToString();
}
var listViewProperties = new List<ContentPropertyDisplay>();
listViewProperties.Add(new ContentPropertyDisplay

View File

@@ -50,7 +50,10 @@ namespace Umbraco.Web.PropertyEditors
}
internal class ListViewPreValueEditor : PreValueEditor
{
{
[PreValueField("tabName", "Tab Name", "textstring", Description = "The name of the tab that the list of child items will be displayed")]
public int TabName { get; set; }
[PreValueField("displayAtTabNumber", "Display At Tab Number", "number", Description = "Which tab position that the list of child items will be displayed")]
public int DisplayAtTabNumber { get; set; }