manually merges: U4-4075 umbracoSettings help section removed
This commit is contained in:
@@ -1,31 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
|
||||
namespace Umbraco.Core.Configuration.UmbracoSettings
|
||||
{
|
||||
internal class HelpElement : ConfigurationElement, IHelpSection
|
||||
{
|
||||
[ConfigurationProperty("defaultUrl", DefaultValue = "http://our.umbraco.org/wiki/umbraco-help/{0}/{1}")]
|
||||
public string DefaultUrl
|
||||
{
|
||||
get { return (string) base["defaultUrl"]; }
|
||||
}
|
||||
|
||||
[ConfigurationCollection(typeof (LinksCollection), AddItemName = "link")]
|
||||
[ConfigurationProperty("", IsDefaultCollection = true)]
|
||||
public LinksCollection Links
|
||||
{
|
||||
get { return (LinksCollection) base[""]; }
|
||||
}
|
||||
|
||||
string IHelpSection.DefaultUrl
|
||||
{
|
||||
get { return DefaultUrl; }
|
||||
}
|
||||
|
||||
IEnumerable<ILink> IHelpSection.Links
|
||||
{
|
||||
get { return Links; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Umbraco.Core.Configuration.UmbracoSettings
|
||||
{
|
||||
public interface IHelpSection : IUmbracoConfigurationSection
|
||||
{
|
||||
string DefaultUrl { get; }
|
||||
|
||||
IEnumerable<ILink> Links { get; }
|
||||
}
|
||||
}
|
||||
@@ -22,9 +22,7 @@
|
||||
IRepositoriesSection PackageRepositories { get; }
|
||||
|
||||
IProvidersSection Providers { get; }
|
||||
|
||||
IHelpSection Help { get; }
|
||||
|
||||
|
||||
IWebRoutingSection WebRouting { get; }
|
||||
|
||||
}
|
||||
|
||||
@@ -105,12 +105,6 @@ namespace Umbraco.Core.Configuration.UmbracoSettings
|
||||
get { return (ProvidersElement)this["providers"]; }
|
||||
}
|
||||
|
||||
[ConfigurationProperty("help")]
|
||||
internal HelpElement Help
|
||||
{
|
||||
get { return (HelpElement)this["help"]; }
|
||||
}
|
||||
|
||||
[ConfigurationProperty("web.routing")]
|
||||
internal WebRoutingElement WebRouting
|
||||
{
|
||||
@@ -167,11 +161,6 @@ namespace Umbraco.Core.Configuration.UmbracoSettings
|
||||
get { return Providers; }
|
||||
}
|
||||
|
||||
IHelpSection IUmbracoSettingsSection.Help
|
||||
{
|
||||
get { return Help; }
|
||||
}
|
||||
|
||||
IWebRoutingSection IUmbracoSettingsSection.WebRouting
|
||||
{
|
||||
get { return WebRouting; }
|
||||
|
||||
@@ -28,14 +28,7 @@ namespace Umbraco.Core.Models
|
||||
/// returns the master template alias
|
||||
/// </summary>
|
||||
string MasterTemplateAlias { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the <see cref="RenderingEngine"/> that corresponds to the template file
|
||||
/// </summary>
|
||||
/// <returns><see cref="RenderingEngine"/></returns>
|
||||
[Obsolete("This is no longer used and will be removed from the codebase in future versions, use the IFileSystem DetermineRenderingEngine method instead")]
|
||||
RenderingEngine GetTypeOfRenderingEngine();
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Set the mastertemplate
|
||||
/// </summary>
|
||||
|
||||
@@ -231,7 +231,6 @@
|
||||
<Compile Include="Configuration\UmbracoSettings\DistributedCallElement.cs" />
|
||||
<Compile Include="Configuration\UmbracoSettings\ExternalLoggerElement.cs" />
|
||||
<Compile Include="Configuration\UmbracoSettings\FileExtensionElement.cs" />
|
||||
<Compile Include="Configuration\UmbracoSettings\HelpElement.cs" />
|
||||
<Compile Include="Configuration\UmbracoSettings\IChar.cs" />
|
||||
<Compile Include="Configuration\UmbracoSettings\IContentSection.cs" />
|
||||
<Compile Include="Configuration\UmbracoSettings\IContentErrorPage.cs" />
|
||||
@@ -239,7 +238,6 @@
|
||||
<Compile Include="Configuration\UmbracoSettings\IDeveloperSection.cs" />
|
||||
<Compile Include="Configuration\UmbracoSettings\IDistributedCallSection.cs" />
|
||||
<Compile Include="Configuration\UmbracoSettings\IFileExtension.cs" />
|
||||
<Compile Include="Configuration\UmbracoSettings\IHelpSection.cs" />
|
||||
<Compile Include="Configuration\UmbracoSettings\ILink.cs" />
|
||||
<Compile Include="Configuration\UmbracoSettings\ILoggingSection.cs" />
|
||||
<Compile Include="Configuration\UmbracoSettings\ILogType.cs" />
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
using System.Linq;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace Umbraco.Tests.Configurations.UmbracoSettings
|
||||
{
|
||||
[TestFixture]
|
||||
public class HelpElementDefaultTests : HelpElementTests
|
||||
{
|
||||
protected override bool TestingDefaults
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
[Test]
|
||||
public override void Links()
|
||||
{
|
||||
Assert.IsTrue(SettingsSection.Help.Links.Any() == false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
using System.Linq;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace Umbraco.Tests.Configurations.UmbracoSettings
|
||||
{
|
||||
[TestFixture]
|
||||
public class HelpElementTests : UmbracoSettingsTests
|
||||
{
|
||||
[Test]
|
||||
public void DefaultUrl()
|
||||
{
|
||||
Assert.IsTrue(SettingsSection.Help.DefaultUrl == "http://our.umbraco.org/wiki/umbraco-help/{0}/{1}");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public virtual void Links()
|
||||
{
|
||||
Assert.IsTrue(SettingsSection.Help.Links.Count() == 2);
|
||||
Assert.IsTrue(SettingsSection.Help.Links.ElementAt(0).Application == "content");
|
||||
Assert.IsTrue(SettingsSection.Help.Links.ElementAt(0).ApplicationUrl == "dashboard.aspx");
|
||||
Assert.IsTrue(SettingsSection.Help.Links.ElementAt(0).Language == "en");
|
||||
Assert.IsTrue(SettingsSection.Help.Links.ElementAt(0).UserType == "Administrators");
|
||||
Assert.IsTrue(SettingsSection.Help.Links.ElementAt(0).HelpUrl == "http://www.xyz.no?{0}/{1}/{2}/{3}");
|
||||
Assert.IsTrue(SettingsSection.Help.Links.ElementAt(1).Application == "media");
|
||||
Assert.IsTrue(SettingsSection.Help.Links.ElementAt(1).ApplicationUrl == "dashboard2.aspx");
|
||||
Assert.IsTrue(SettingsSection.Help.Links.ElementAt(1).Language == "ch");
|
||||
Assert.IsTrue(SettingsSection.Help.Links.ElementAt(1).UserType == "Writers");
|
||||
Assert.IsTrue(SettingsSection.Help.Links.ElementAt(1).HelpUrl == "http://www.abc.no?{0}/{1}/{2}/{3}");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -201,13 +201,6 @@
|
||||
</users>
|
||||
</providers>
|
||||
|
||||
<!-- Maps language, usertype, application and application_url to help pages -->
|
||||
<help defaultUrl="http://our.umbraco.org/wiki/umbraco-help/{0}/{1}">
|
||||
<!-- Add links that should open custom help pages -->
|
||||
<link application="content" applicationUrl="dashboard.aspx" language="en" userType="Administrators" helpUrl="http://www.xyz.no?{0}/{1}/{2}/{3}" />
|
||||
<link application="media" applicationUrl="dashboard2.aspx" language="ch" userType="Writers" helpUrl="http://www.abc.no?{0}/{1}/{2}/{3}" />
|
||||
</help>
|
||||
|
||||
<!--
|
||||
web.routing
|
||||
@trySkipIisCustomErrors
|
||||
|
||||
@@ -39,7 +39,6 @@ namespace Umbraco.Tests.TestHelpers
|
||||
var distCall = new Mock<IDistributedCallSection>();
|
||||
var repos = new Mock<IRepositoriesSection>();
|
||||
var providers = new Mock<IProvidersSection>();
|
||||
var help = new Mock<IHelpSection>();
|
||||
var routing = new Mock<IWebRoutingSection>();
|
||||
|
||||
settings.Setup(x => x.Content).Returns(content.Object);
|
||||
@@ -52,7 +51,6 @@ namespace Umbraco.Tests.TestHelpers
|
||||
settings.Setup(x => x.DistributedCall).Returns(distCall.Object);
|
||||
settings.Setup(x => x.PackageRepositories).Returns(repos.Object);
|
||||
settings.Setup(x => x.Providers).Returns(providers.Object);
|
||||
settings.Setup(x => x.Help).Returns(help.Object);
|
||||
settings.Setup(x => x.WebRouting).Returns(routing.Object);
|
||||
|
||||
//Now configure some defaults - the defaults in the config section classes do NOT pertain to the mocked data!!
|
||||
|
||||
@@ -265,8 +265,6 @@
|
||||
<Compile Include="Configurations\UmbracoSettings\DeveloperElementTests.cs" />
|
||||
<Compile Include="Configurations\UmbracoSettings\DistributedCallElementDefaultTests.cs" />
|
||||
<Compile Include="Configurations\UmbracoSettings\DistributedCallElementTests.cs" />
|
||||
<Compile Include="Configurations\UmbracoSettings\HelpElementDefaultTests.cs" />
|
||||
<Compile Include="Configurations\UmbracoSettings\HelpElementTests.cs" />
|
||||
<Compile Include="Configurations\UmbracoSettings\LoggingElementDefaultTests.cs" />
|
||||
<Compile Include="Configurations\UmbracoSettings\LoggingElementTests.cs" />
|
||||
<Compile Include="Configurations\UmbracoSettings\PackageRepositoriesElementDefaultTests.cs" />
|
||||
|
||||
@@ -238,12 +238,6 @@
|
||||
</users>
|
||||
</providers>
|
||||
|
||||
<!-- Maps language, usertype, application and application_url to help pages -->
|
||||
<help defaultUrl="http://our.umbraco.org/wiki/umbraco-help/{0}/{1}">
|
||||
<!-- Add links that should open custom help pages -->
|
||||
<!--<link application="content" applicationUrl="dashboard.aspx" language="en" userType="Administrators" helpUrl="http://www.xyz.no?{0}/{1}/{2}/{3}" /> -->
|
||||
</help>
|
||||
|
||||
<!--
|
||||
web.routing
|
||||
@trySkipIisCustomErrors
|
||||
|
||||
Reference in New Issue
Block a user