mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Fixing that Content.SaveButton should be "Save" instead of "Save Draft" if the type is not Draftable
This commit is contained in:
@@ -27,7 +27,7 @@ namespace Orchard.Core.Contents.Drivers {
|
|||||||
if (part.Id > 0) {
|
if (part.Id > 0) {
|
||||||
results.Add(ContentShape("Content_DeleteButton", deleteButton => deleteButton));
|
results.Add(ContentShape("Content_DeleteButton", deleteButton => deleteButton));
|
||||||
}
|
}
|
||||||
|
|
||||||
results.Add(ContentShape("Content_CancelButton", cancelButton => cancelButton));
|
results.Add(ContentShape("Content_CancelButton", cancelButton => cancelButton));
|
||||||
|
|
||||||
return Combined(results.ToArray());
|
return Combined(results.ToArray());
|
||||||
|
|||||||
@@ -1,3 +1,13 @@
|
|||||||
<fieldset class="save-button">
|
@using Orchard.ContentManagement
|
||||||
<button class="primaryAction" type="submit" name="submit.Save" value="submit.Save">@T("Save Draft")</button>
|
@using Orchard.Core.Contents.Settings
|
||||||
</fieldset>
|
|
||||||
|
@{
|
||||||
|
var contentItem = Model.ContentItem as ContentItem;
|
||||||
|
var label = contentItem.TypeDefinition.Settings.GetModel<ContentTypeSettings>().Draftable
|
||||||
|
? T("Save Draft")
|
||||||
|
: T("Save");
|
||||||
|
}
|
||||||
|
|
||||||
|
<fieldset class="save-button">
|
||||||
|
<button class="primaryAction" type="submit" name="submit.Save" value="submit.Save">@label</button>
|
||||||
|
</fieldset>
|
||||||
|
|||||||
Reference in New Issue
Block a user