Merge pull request #4259 from umbraco/temp8-remove-related-links-with-migration

Remove related links and migrate existing data to Multi URL Picker
This commit is contained in:
Warren Buckley
2019-01-28 09:42:56 +00:00
committed by GitHub
24 changed files with 152 additions and 627 deletions

View File

@@ -1,11 +0,0 @@
using Umbraco.Core.Models.PublishedContent;
namespace Umbraco.Web.Models
{
public class RelatedLink : RelatedLinkBase
{
public int? Id { get; internal set; }
internal bool IsDeleted { get; set; }
public IPublishedContent Content { get; set; }
}
}

View File

@@ -1,18 +0,0 @@
using Newtonsoft.Json;
namespace Umbraco.Web.Models
{
public abstract class RelatedLinkBase
{
[JsonProperty("caption")]
public string Caption { get; set; }
[JsonProperty("link")]
public string Link { get; set; }
[JsonProperty("newWindow")]
public bool NewWindow { get; set; }
[JsonProperty("isInternal")]
public bool IsInternal { get; set; }
[JsonProperty("type")]
public RelatedLinkType Type { get; set; }
}
}

View File

@@ -1,27 +0,0 @@
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="RelatedLinkType.cs" company="Umbraco">
// Umbraco
// </copyright>
// <summary>
// Defines the RelatedLinkType type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------
namespace Umbraco.Web.Models
{
/// <summary>
/// The related link type.
/// </summary>
public enum RelatedLinkType
{
/// <summary>
/// Internal link type
/// </summary>
Internal,
/// <summary>
/// External link type
/// </summary>
External
}
}

View File

@@ -1,42 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
namespace Umbraco.Web.Models
{
[TypeConverter(typeof(RelatedLinksTypeConverter))]
public class RelatedLinks : IEnumerable<RelatedLink>
{
private readonly string _propertyData;
private readonly IEnumerable<RelatedLink> _relatedLinks;
public RelatedLinks(IEnumerable<RelatedLink> relatedLinks, string propertyData)
{
_relatedLinks = relatedLinks;
_propertyData = propertyData;
}
/// <summary>
/// Gets the property data.
/// </summary>
internal string PropertyData
{
get
{
return this._propertyData;
}
}
public IEnumerator<RelatedLink> GetEnumerator()
{
return _relatedLinks.GetEnumerator();
}
IEnumerator IEnumerable.GetEnumerator()
{
return this.GetEnumerator();
}
}
}