mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-23 04:43:35 +08:00
Cleaning up the MenuPart editor template and MenuPart a little
- changing MenuPart's AddToMainMenu property to OnMainMenu (action vs. state) - shuffling elements around in the editor template and changing some fo the text --HG-- branch : dev
This commit is contained in:
@@ -7,9 +7,9 @@ namespace Orchard.Core.Navigation.Models {
|
||||
[HiddenInput(DisplayValue = false)]
|
||||
public int Id { get { return ContentItem.Id; } }
|
||||
|
||||
public bool AddToMainMenu {
|
||||
get { return Record.AddToMainMenu; }
|
||||
set { Record.AddToMainMenu = value; }
|
||||
public bool OnMainMenu {
|
||||
get { return Record.OnMainMenu; }
|
||||
set { Record.OnMainMenu = value; }
|
||||
}
|
||||
|
||||
public string MenuText {
|
||||
|
@@ -14,7 +14,7 @@ namespace Orchard.Core.Navigation.Models {
|
||||
Filters.Add(StorageFilter.For(menuPartRepository));
|
||||
|
||||
OnActivated<MenuPart>((ctx, x) => {
|
||||
x.AddToMainMenu = false;
|
||||
x.OnMainMenu = false;
|
||||
x.MenuText = String.Empty;
|
||||
});
|
||||
}
|
||||
|
@@ -4,6 +4,6 @@ namespace Orchard.Core.Navigation.Records {
|
||||
public class MenuPartRecord : ContentPartRecord {
|
||||
public virtual string MenuText { get; set; }
|
||||
public virtual string MenuPosition { get; set; }
|
||||
public virtual bool AddToMainMenu { get; set; }
|
||||
public virtual bool OnMainMenu { get; set; }
|
||||
}
|
||||
}
|
@@ -1,9 +1,9 @@
|
||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<MenuPart>" %>
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<MenuPart>" %>
|
||||
<%@ Import Namespace="Orchard.Core.Navigation.Models"%>
|
||||
<%@ Import Namespace="Orchard.Core.Navigation.ViewModels"%>
|
||||
<fieldset>
|
||||
<%=Html.LabelFor(m => m.AddToMainMenu) %>
|
||||
<%=Html.EditorFor(m => m.AddToMainMenu) %>
|
||||
<%=Html.LabelFor(m => m.MenuText) %>
|
||||
<%=Html.EditorFor(m => m.OnMainMenu) %>
|
||||
<label for="OnMainMenu" class="forcheckbox"><%=_Encoded("Add to the main menu") %></label>
|
||||
<label for="MenuText"><%=_Encoded("Menu text") %></label>
|
||||
<%=Html.TextBoxFor(m => m.MenuText, new { @class = "large text" })%>
|
||||
</fieldset>
|
Reference in New Issue
Block a user