From cfc6ccbe04b960699e2dda6ea78f6d7ed57b078b Mon Sep 17 00:00:00 2001 From: Antoine Griffard Date: Thu, 17 Dec 2020 13:16:27 +0100 Subject: [PATCH] Cont type badges --- .../Views/Admin/Edit.cshtml | 22 ++-- .../Views/Admin/EditPart.cshtml | 14 +-- .../Views/ContentTypeSettings.Edit.cshtml | 102 ++++++++++++------ .../Views/FullTextAspectSettings.Edit.cshtml | 53 +++++---- .../Views/PlacementSettings.cshtml | 2 +- .../Views/TemplateSettings.cshtml | 2 +- .../Views/WorkflowType/Edit.cshtml | 2 +- 7 files changed, 122 insertions(+), 75 deletions(-) diff --git a/src/OrchardCore.Modules/OrchardCore.ContentTypes/Views/Admin/Edit.cshtml b/src/OrchardCore.Modules/OrchardCore.ContentTypes/Views/Admin/Edit.cshtml index 1f802e8634f..45af35bc057 100644 --- a/src/OrchardCore.Modules/OrchardCore.ContentTypes/Views/Admin/Edit.cshtml +++ b/src/OrchardCore.Modules/OrchardCore.ContentTypes/Views/Admin/Edit.cshtml @@ -29,13 +29,6 @@ - @if (Model.Editor.Shortcuts != null) - { -
- @await DisplayAsync(Model.Editor.Shortcuts) -
- } - @await DisplayAsync(Model.Editor)
@@ -53,6 +46,14 @@ @T["Remove"]
@field.DisplayName() @field.FieldDefinition.Name.CamelFriendly() + @if (!string.IsNullOrEmpty(field.DisplayMode())) + { + @field.DisplayMode() + } + @if (!string.IsNullOrEmpty(field.Editor())) + { + @field.Editor() + } @@ -100,6 +101,13 @@ @T["Add Parts"] @T["Add Named Part"] + + @if (Model.Editor.Shortcuts != null) + { +
+ @await DisplayAsync(Model.Editor.Shortcuts) +
+ }
diff --git a/src/OrchardCore.Modules/OrchardCore.ContentTypes/Views/Admin/EditPart.cshtml b/src/OrchardCore.Modules/OrchardCore.ContentTypes/Views/Admin/EditPart.cshtml index d9126dad226..8bb3784ac15 100644 --- a/src/OrchardCore.Modules/OrchardCore.ContentTypes/Views/Admin/EditPart.cshtml +++ b/src/OrchardCore.Modules/OrchardCore.ContentTypes/Views/Admin/EditPart.cshtml @@ -22,13 +22,6 @@ @T["Technical name of the part."]
- @if (Model.Editor.Shortcuts != null) - { -
- @await DisplayAsync(Model.Editor.Shortcuts) -
- } - @await DisplayAsync(Model.Editor)
@@ -56,6 +49,13 @@ + + @if (Model.Editor.Shortcuts != null) + { +
+ @await DisplayAsync(Model.Editor.Shortcuts) +
+ }
diff --git a/src/OrchardCore.Modules/OrchardCore.ContentTypes/Views/ContentTypeSettings.Edit.cshtml b/src/OrchardCore.Modules/OrchardCore.ContentTypes/Views/ContentTypeSettings.Edit.cshtml index d5af6458970..8c2c7a728be 100644 --- a/src/OrchardCore.Modules/OrchardCore.ContentTypes/Views/ContentTypeSettings.Edit.cshtml +++ b/src/OrchardCore.Modules/OrchardCore.ContentTypes/Views/ContentTypeSettings.Edit.cshtml @@ -1,49 +1,81 @@ @model ContentTypeSettingsViewModel -
-
- - - @T["Determines if an instance of this content type can be created through the UI."] +

+ + @if (Model.Creatable) + { + @T["Creatable"] + } + @if (Model.Listable) + { + @T["Listable"] + } + @if (Model.Draftable) + { + @T["Draftable"] + } + @if (Model.Versionable) + { + @T["Versionable"] + } + @if (Model.Securable) + { + @T["Securable"] + } + @if (!string.IsNullOrEmpty(Model.Stereotype)) + { + @Model.Stereotype + } +

+ +
+
+
+ + + @T["Determines if an instance of this content type can be created through the UI."] +
-
-
-
- - - @T["Determines if an instance of this content type can be listed through the UI."] +
+
+ + + @T["Determines if an instance of this content type can be listed through the UI."] +
-
-
-
- - - @T["Determines if this content type supports draft versions."] +
+
+ + + @T["Determines if this content type supports draft versions."] +
-
-
-
- - - @T["Determines if this content type supports versioning."] +
+
+ + + @T["Determines if this content type supports versioning."] +
-
-
-
- - - @T["Determines if this content type can have custom permissions."] +
+
+ + + @T["Determines if this content type can have custom permissions."] +
-
-
-
- - +
+
+ + +
+ @T["(Optional) The stereotype of the content type. e.g., Widget, MenuItem, ..."]
- @T["(Optional) The stereotype of the content type. e.g., Widget, MenuItem, ..."]
diff --git a/src/OrchardCore.Modules/OrchardCore.Contents/Views/FullTextAspectSettings.Edit.cshtml b/src/OrchardCore.Modules/OrchardCore.Contents/Views/FullTextAspectSettings.Edit.cshtml index c6cfb01f617..9d2dbe5ffbe 100644 --- a/src/OrchardCore.Modules/OrchardCore.Contents/Views/FullTextAspectSettings.Edit.cshtml +++ b/src/OrchardCore.Modules/OrchardCore.Contents/Views/FullTextAspectSettings.Edit.cshtml @@ -10,33 +10,40 @@ -

@T["Full-text"]

-@T["The full-text content is used in search queries to find content items from free-text searches."] +

+ +

+
+

@T["Full-text"]

+ @T["The full-text content is used in search queries to find content items from free-text searches."] -
-
- - - @T["Check to include the display text in the full-text content."] -
+
+
+ + + @T["Check to include the display text in the full-text content."] +
-
- - - @T["Check to include the body parts content in the full-text content."] -
+
+ + + @T["Check to include the body parts content in the full-text content."] +
-
- - - @T["Check to define a custom Liquid template generating some text to include in the full-text content."] -
+
+ + + @T["Check to define a custom Liquid template generating some text to include in the full-text content."] +
-
-
-
- - @T["Tip: Include custom fields like {{{{ Model.Content.Article.Summary.Text }}}}."] +
+
+
+ + @T["Tip: Include custom fields like {{{{ Model.Content.Article.Summary.Text }}}}."] +
diff --git a/src/OrchardCore.Modules/OrchardCore.Placements/Views/PlacementSettings.cshtml b/src/OrchardCore.Modules/OrchardCore.Placements/Views/PlacementSettings.cshtml index 0bb633d996f..d9f5dba0238 100644 --- a/src/OrchardCore.Modules/OrchardCore.Placements/Views/PlacementSettings.cshtml +++ b/src/OrchardCore.Modules/OrchardCore.Placements/Views/PlacementSettings.cshtml @@ -1,7 +1,7 @@ @model OrchardCore.Placements.ViewModels.ContentSettingsViewModel
-