mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-07 16:13:58 +08:00
Compare commits
7 Commits
8d862f5a94
...
2dc01bba5e
Author | SHA1 | Date | |
---|---|---|---|
![]() |
2dc01bba5e | ||
![]() |
55fafa896f | ||
![]() |
fa5e1e48c7 | ||
![]() |
6c2420dae4 | ||
![]() |
e95bf05ecc | ||
![]() |
973114988e | ||
![]() |
8227579c2e |
6
.github/workflows/specflow.yml
vendored
6
.github/workflows/specflow.yml
vendored
@@ -3,8 +3,12 @@ name: SpecFlow Tests
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- 1.10.x
|
||||
- dev
|
||||
schedule:
|
||||
- cron: '0 0 * * *' # Every day at midnight.
|
||||
- cron: '0 0 * * 1' # Every Monday midnight.
|
||||
|
||||
jobs:
|
||||
define-matrix:
|
||||
|
@@ -293,6 +293,14 @@ namespace Orchard.Core.Navigation.Controllers {
|
||||
return RedirectToAction("Index", new { menuId = menuPart.Menu.Id });
|
||||
}
|
||||
|
||||
[HttpPost, ActionName("Edit")]
|
||||
[Mvc.FormValueRequired("submit.Delete")]
|
||||
public ActionResult EditDeletePOST(int id) => Delete(id);
|
||||
|
||||
[HttpPost, ActionName("Edit")]
|
||||
[Mvc.FormValueRequired("submit.Unpublish")]
|
||||
public ActionResult EditUnpublishPOST(int id) => Unpublish(id);
|
||||
|
||||
private MenuItemEntry CreateMenuItemEntries(MenuPart menuPart) {
|
||||
return new MenuItemEntry {
|
||||
MenuItemId = menuPart.Id,
|
||||
|
@@ -5,4 +5,8 @@
|
||||
<Place Parts_MenuWidget_Edit="Content:10"/>
|
||||
<Place Parts_MenuWidget="Content"/>
|
||||
<Place Parts_ShapeMenuItemPart_Edit="Content:10"/>
|
||||
|
||||
<Match ContentType="Menu">
|
||||
<Place Content_UnpublishButton="-" />
|
||||
</Match>
|
||||
</Placement>
|
@@ -1,8 +1,4 @@
|
||||
@{
|
||||
Model.Sidebar.Add(New.Menu_DeleteButton().ContentItem(Model.ContentItem), "25");
|
||||
}
|
||||
|
||||
<div class="edit-item">
|
||||
<div class="edit-item">
|
||||
<div class="edit-item-primary">
|
||||
@if (Model.Content != null) {
|
||||
<div class="edit-item-content">
|
||||
|
@@ -1,14 +0,0 @@
|
||||
@using Orchard.ContentManagement;
|
||||
@using Orchard.Core.Contents
|
||||
@using Orchard.Utility.Extensions;
|
||||
|
||||
@{
|
||||
ContentItem contentItem = Model.ContentItem;
|
||||
string returnUrl = Request["returnUrl"];
|
||||
}
|
||||
|
||||
@if (Authorizer.Authorize(Permissions.DeleteContent, contentItem)) {
|
||||
<fieldset class="delete-button">
|
||||
@Html.Link(T("Delete").Text, Url.ItemRemoveUrl(contentItem, new {returnUrl}), new { @class = "button", itemprop = "RemoveUrl UnsafeUrl"})
|
||||
</fieldset>
|
||||
}
|
@@ -574,9 +574,6 @@
|
||||
<ItemGroup>
|
||||
<Content Include="Navigation\Views\Content-Menu.Edit.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Navigation\Views\Menu.DeleteButton.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Navigation\Views\Menu.Edit.cshtml" />
|
||||
</ItemGroup>
|
||||
@@ -631,7 +628,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Contents\Views\Content.UnpublishButton.cshtml" />
|
||||
<Content Include="Contents\Views\Content.DeleteButton.cshtml" />
|
||||
<Content Include="Contents\Views\Content.DeleteButton.cshtml" />
|
||||
<None Include="packages.config" />
|
||||
<Content Include="Title\Views\DefinitionTemplates\TitlePartSettings.cshtml" />
|
||||
</ItemGroup>
|
||||
|
@@ -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> {
|
||||
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());
|
||||
}
|
||||
protected override DriverResult Editor(BlogPart blogPart, dynamic shapeHelper) =>
|
||||
ContentShape("Parts_Blogs_Blog_Fields",
|
||||
() => 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>
|
||||
@@ -277,4 +274,4 @@
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
</Project>
|
||||
</Project>
|
@@ -12,12 +12,12 @@
|
||||
<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"/>
|
||||
<!-- default positioning -->
|
||||
<Match ContentType="Blog">
|
||||
<Place Content_UnpublishButton="-"/>
|
||||
<Match DisplayType="Detail">
|
||||
<Place Parts_Common_Metadata="-"/>
|
||||
<!-- blog posts currently added to the blog within the controller into Content:5 <Place Parts_Blogs_BlogPost_List="Content:5" /> but...
|
||||
|
@@ -1,3 +0,0 @@
|
||||
<fieldset class="delete-button">
|
||||
<button type="submit" name="submit.Delete" value="@T("Delete")" itemprop="RemoveUrl">@T("Delete")</button>
|
||||
</fieldset>
|
@@ -1,4 +1,8 @@
|
||||
<Placement>
|
||||
<Place Parts_Widgets_LayerPart="Content:1"/>
|
||||
<Place Parts_Widgets_WidgetPart="Content:1"/>
|
||||
|
||||
<Match ContentPart="WidgetPart">
|
||||
<Place Content_UnpublishButton="-"/>
|
||||
</Match>
|
||||
</Placement>
|
||||
|
Reference in New Issue
Block a user