mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +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)]
|
[HiddenInput(DisplayValue = false)]
|
||||||
public int Id { get { return ContentItem.Id; } }
|
public int Id { get { return ContentItem.Id; } }
|
||||||
|
|
||||||
public bool AddToMainMenu {
|
public bool OnMainMenu {
|
||||||
get { return Record.AddToMainMenu; }
|
get { return Record.OnMainMenu; }
|
||||||
set { Record.AddToMainMenu = value; }
|
set { Record.OnMainMenu = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public string MenuText {
|
public string MenuText {
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ namespace Orchard.Core.Navigation.Models {
|
|||||||
Filters.Add(StorageFilter.For(menuPartRepository));
|
Filters.Add(StorageFilter.For(menuPartRepository));
|
||||||
|
|
||||||
OnActivated<MenuPart>((ctx, x) => {
|
OnActivated<MenuPart>((ctx, x) => {
|
||||||
x.AddToMainMenu = false;
|
x.OnMainMenu = false;
|
||||||
x.MenuText = String.Empty;
|
x.MenuText = String.Empty;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,6 @@ namespace Orchard.Core.Navigation.Records {
|
|||||||
public class MenuPartRecord : ContentPartRecord {
|
public class MenuPartRecord : ContentPartRecord {
|
||||||
public virtual string MenuText { get; set; }
|
public virtual string MenuText { get; set; }
|
||||||
public virtual string MenuPosition { 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.Models"%>
|
||||||
<%@ Import Namespace="Orchard.Core.Navigation.ViewModels"%>
|
<%@ Import Namespace="Orchard.Core.Navigation.ViewModels"%>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<%=Html.LabelFor(m => m.AddToMainMenu) %>
|
<%=Html.EditorFor(m => m.OnMainMenu) %>
|
||||||
<%=Html.EditorFor(m => m.AddToMainMenu) %>
|
<label for="OnMainMenu" class="forcheckbox"><%=_Encoded("Add to the main menu") %></label>
|
||||||
<%=Html.LabelFor(m => m.MenuText) %>
|
<label for="MenuText"><%=_Encoded("Menu text") %></label>
|
||||||
<%=Html.TextBoxFor(m => m.MenuText, new { @class = "large text" })%>
|
<%=Html.TextBoxFor(m => m.MenuText, new { @class = "large text" })%>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
Reference in New Issue
Block a user