Renamed WithDisplayName to DisplayedAs and removed test view from TheThemeMachine.

This commit is contained in:
Sipke Schoorstra
2015-11-19 17:56:42 +01:00
parent f7e3f48df1
commit e5bb771be1
3 changed files with 1 additions and 14 deletions

View File

@@ -36,7 +36,7 @@ namespace Orchard.Layouts.Helpers {
return this;
}
public SnippetFieldDescriptorBuilder WithDisplayName(LocalizedString value) {
public SnippetFieldDescriptorBuilder DisplayedAs(LocalizedString value) {
Descriptor.DisplayName = value;
return this;
}

View File

@@ -1,10 +0,0 @@
@using Orchard.Layouts.Elements
@using Orchard.Layouts.Helpers
@{
var element = (Snippet)Model.Element;
var tagBuilder = TagBuilderExtensions.CreateElementTagBuilder(Model, "a");
tagBuilder.SetInnerText(Html.SnippetField("ButtonText", "Text").WithDisplayName(T("Button Text")).WithDescription(T("The button text label.")).ToString());
tagBuilder.Attributes["href"] = Html.SnippetField("ButtonUrl", "Text").WithDisplayName(T("Button Url")).WithDescription(T("The button URL.")).ToString();
}
@tagBuilder.ToHtmlString()

View File

@@ -177,9 +177,6 @@
<ItemGroup>
<Content Include="TheAdmin\Views\AdminCultureSelector.cshtml" />
</ItemGroup>
<ItemGroup>
<Content Include="TheThemeMachine\Views\ButtonSnippet.cshtml" />
</ItemGroup>
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>