mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-07 16:13:42 +08:00
Blog admin editor: Removing the duplicate Delete button, since the Core ContentsDriver now renders one
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Orchard.Blogs.Models;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.Drivers;
|
||||
@@ -23,19 +22,9 @@ namespace Orchard.Blogs.Drivers {
|
||||
);
|
||||
}
|
||||
|
||||
protected override DriverResult Editor(BlogPart blogPart, dynamic shapeHelper) {
|
||||
var results = new List<DriverResult> {
|
||||
protected override DriverResult Editor(BlogPart blogPart, dynamic shapeHelper) =>
|
||||
ContentShape("Parts_Blogs_Blog_Fields",
|
||||
() => shapeHelper.EditorTemplate(TemplateName: "Parts.Blogs.Blog.Fields", Model: blogPart, Prefix: Prefix))
|
||||
};
|
||||
|
||||
|
||||
if (blogPart.Id > 0)
|
||||
results.Add(ContentShape("Blog_DeleteButton",
|
||||
deleteButton => deleteButton));
|
||||
|
||||
return Combined(results.ToArray());
|
||||
}
|
||||
() => shapeHelper.EditorTemplate(TemplateName: "Parts.Blogs.Blog.Fields", Model: blogPart, Prefix: Prefix));
|
||||
|
||||
protected override DriverResult Editor(BlogPart blogPart, IUpdateModel updater, dynamic shapeHelper) {
|
||||
updater.TryUpdateModel(blogPart, Prefix, null, null);
|
||||
|
@@ -236,9 +236,6 @@
|
||||
<ItemGroup>
|
||||
<Content Include="Views\Parts.Blogs.Blog.SummaryAdmin.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\Blog.DeleteButton.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\Content-BlogPost.SummaryAdmin.cshtml" />
|
||||
</ItemGroup>
|
||||
|
@@ -12,7 +12,6 @@
|
||||
<Place Parts_Blogs_Blog_Fields="Content:2"/>
|
||||
<Place Parts_Blogs_BlogArchives_Edit="Content:5"/>
|
||||
<Place Parts_Blogs_RecentBlogPosts_Edit="Content:5"/>
|
||||
<Place Blog_DeleteButton="Sidebar:25" />
|
||||
<!-- widgets -->
|
||||
<Place Parts_Blogs_BlogArchives="Content"/>
|
||||
<Place Parts_Blogs_RecentBlogPosts="Content"/>
|
||||
|
@@ -1,3 +0,0 @@
|
||||
<fieldset class="delete-button">
|
||||
<button type="submit" name="submit.Delete" value="@T("Delete")" itemprop="RemoveUrl">@T("Delete")</button>
|
||||
</fieldset>
|
Reference in New Issue
Block a user