Add a break element that renders the hr tag.

This commit is contained in:
Bertrand Le Roy
2015-06-11 20:47:37 -07:00
parent 564eeacf04
commit e3a9758331
4 changed files with 28 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
using Orchard.Layouts.Elements;
using Orchard.Layouts.Framework.Drivers;
namespace Orchard.Layouts.Drivers {
public class BreakElementDriver : ElementDriver<Break> {
}
}

View File

@@ -0,0 +1,11 @@
namespace Orchard.Layouts.Elements {
public class Break : ContentElement {
public override string ToolboxIcon {
get { return "\uf068"; }
}
public override bool HasEditor {
get { return false; }
}
}
}

View File

@@ -314,9 +314,11 @@
<Compile Include="Controllers\TemplateController.cs" />
<Compile Include="Drivers\CanvasElementDriver.cs" />
<Compile Include="Drivers\ShapeElementDriver.cs" />
<Compile Include="Drivers\BreakElementDriver.cs" />
<Compile Include="Elements\Canvas.cs" />
<Compile Include="Elements\ContentElement.cs" />
<Compile Include="Elements\Shape.cs" />
<Compile Include="Elements\Break.cs" />
<Compile Include="Filters\TokensFilter.cs" />
<Compile Include="Framework\Drivers\ImportContentContextWrapper.cs" />
<Compile Include="Framework\Drivers\IContentImportSession.cs" />
@@ -530,6 +532,9 @@
<ItemGroup>
<Content Include="Styles\Lib\FontAwesome\Fonts\fontawesome-webfont.woff2" />
</ItemGroup>
<ItemGroup>
<Content Include="Views\Elements\Break.cshtml" />
</ItemGroup>
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>

View File

@@ -0,0 +1,5 @@
@using Orchard.Layouts.Helpers
@{
var tagBuilder = TagBuilderExtensions.CreateElementTagBuilder(Model, "hr");
}
@tagBuilder.ToHtmlString()