-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Creating missing DetailAdmin templates (#2857)
Fixes #1337
- Loading branch information
1 parent
6d4b594
commit 9190bef
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
src/OrchardCore.Modules/OrchardCore.Contents/Views/ContentPart.DetailAdmin.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
} |
35 changes: 35 additions & 0 deletions
35
src/OrchardCore.Modules/OrchardCore.Widgets/Views/Widget.DetailAdmin.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |