Skip to content

Commit

Permalink
Creating missing DetailAdmin templates (#2857)
Browse files Browse the repository at this point in the history
Fixes #1337
  • Loading branch information
sebastienros authored Dec 14, 2018
1 parent 6d4b594 commit 9190bef
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
@using OrchardCore.Mvc.Utilities

@{
string name = Model.Metadata.Name;
}

@if (Model.Content != null)
{
<div class="contentpart [email protected]()">
@await DisplayAsync(Model.Content)
</div>
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@using OrchardCore.Mvc.Utilities;
@using OrchardCore.ContentManagement

@* This template is called when a Widget that has a custom Admin page is rendered. For instance a Widget with a ListPart *@

@{

Model.Classes.Add("content-item");
ContentItem contentItem = Model.ContentItem;
var contentTypeClassName = contentItem.ContentType.HtmlClassify();
Model.Classes.Add(contentTypeClassName);

var tag = Tag(Model, "article");
}

<h1>@RenderTitleSegments(contentItem.DisplayText)</h1>

<article>
<header>
@await DisplayAsync(Model.Header)
@if (Model.Meta != null)
{
<div class="metadata">
@await DisplayAsync(Model.Meta)
</div>
}
</header>
@await DisplayAsync(Model.Content)
@if (Model.Footer != null)
{
<footer>
@await DisplayAsync(Model.Footer)
</footer>
}
</article>

0 comments on commit 9190bef

Please sign in to comment.