mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Migrating Common and Navigation
--HG-- branch : theming
This commit is contained in:
@@ -1,6 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.Core.Common.Settings.BodyPartSettings>" %>
|
||||
<fieldset>
|
||||
<label for="<%:Html.FieldIdFor(m => m.FlavorDefault) %>"><%:T("Default flavor") %></label>
|
||||
<%:Html.EditorFor(m => m.FlavorDefault)%>
|
||||
<%:Html.ValidationMessageFor(m => m.FlavorDefault)%>
|
||||
</fieldset>
|
||||
@@ -0,0 +1,6 @@
|
||||
@model Orchard.Core.Common.Settings.BodyPartSettings
|
||||
<fieldset>
|
||||
<label for="@Html.FieldIdFor(m => m.FlavorDefault)">@T("Default flavor")</label>
|
||||
@Html.EditorFor(m => m.FlavorDefault)
|
||||
@Html.ValidationMessageFor(m => m.FlavorDefault)
|
||||
</fieldset>
|
||||
@@ -1,6 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.Core.Common.Settings.BodyTypePartSettings>" %>
|
||||
<fieldset>
|
||||
<label for="<%:Html.FieldIdFor(m => m.Flavor) %>"><%:T("Flavor") %></label>
|
||||
<%:Html.EditorFor(m => m.Flavor) %>
|
||||
<%:Html.ValidationMessageFor(m => m.Flavor) %>
|
||||
</fieldset>
|
||||
@@ -0,0 +1,6 @@
|
||||
@model Orchard.Core.Common.Settings.BodyTypePartSettings
|
||||
<fieldset>
|
||||
<label for="@Html.FieldIdFor(m => m.Flavor)">@T("Flavor")</label>
|
||||
@Html.EditorFor(m => m.Flavor)
|
||||
@Html.ValidationMessageFor(m => m.Flavor)
|
||||
</fieldset>
|
||||
@@ -1,3 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.Core.Common.Fields.TextField>" %>
|
||||
<%@ Import Namespace="Orchard.Utility.Extensions" %>
|
||||
<p class="text-field"><span class="name"><%:Model.Name.CamelFriendly() %>:</span> <%:Model.Value %></p>
|
||||
@@ -0,0 +1,3 @@
|
||||
@model Orchard.Core.Common.Fields.TextField
|
||||
@using Orchard.Utility.Extensions
|
||||
<p class="text-field"><span class="name">@Model.Name.CamelFriendly():</span> @Model.Value</p>
|
||||
@@ -1 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.Core.Common.ViewModels.BodyDisplayViewModel>" %>
|
||||
@@ -0,0 +1 @@
|
||||
@model Orchard.Core.Common.ViewModels.BodyDisplayViewModel
|
||||
@@ -1,5 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<BodyDisplayViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Core.Common.ViewModels"%>
|
||||
<div class="manage">
|
||||
<%: Html.ItemEditLinkWithReturnUrl(T("Edit").ToString(), Model.BodyPart.ContentItem) %>
|
||||
</div>
|
||||
@@ -0,0 +1,5 @@
|
||||
@model BodyDisplayViewModel
|
||||
@using Orchard.Core.Common.ViewModels
|
||||
<div class="manage">
|
||||
@Html.ItemEditLinkWithReturnUrl(T("Edit").ToString(), Model.BodyPart.ContentItem)
|
||||
</div>
|
||||
@@ -1 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.Core.Common.ViewModels.BodyDisplayViewModel>" %>
|
||||
@@ -0,0 +1 @@
|
||||
@model Orchard.Core.Common.ViewModels.BodyDisplayViewModel
|
||||
@@ -1,7 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<BodyDisplayViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Core.Common.ViewModels"%>
|
||||
<%-- begin: knowingly broken HTML (hence the ManageWrapperPre and ManageWrapperPost templates)
|
||||
we need "wrapper templates" (among other functionality) in the future of UI composition
|
||||
please do not delete or the front end will be broken when the user is authenticated. --%>
|
||||
</div>
|
||||
<%-- begin: knowingly broken HTML --%>
|
||||
@@ -0,0 +1,7 @@
|
||||
@model BodyDisplayViewModel
|
||||
@using Orchard.Core.Common.ViewModels
|
||||
@/* begin: knowingly broken HTML (hence the ManageWrapperPre and ManageWrapperPost templates)
|
||||
we need "wrapper templates" (among other functionality) in the future of UI composition
|
||||
please do not delete or the front end will be broken when the user is authenticated. */
|
||||
</div>
|
||||
@/* begin: knowingly broken HTML */
|
||||
@@ -1 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.Core.Common.ViewModels.BodyDisplayViewModel>" %>
|
||||
@@ -0,0 +1 @@
|
||||
@model Orchard.Core.Common.ViewModels.BodyDisplayViewModel
|
||||
@@ -1,3 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<BodyDisplayViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Core.Common.ViewModels"%>
|
||||
<div class="managewrapper">
|
||||
@@ -0,0 +1,3 @@
|
||||
@model BodyDisplayViewModel
|
||||
@using Orchard.Core.Common.ViewModels
|
||||
<div class="managewrapper">
|
||||
@@ -1,9 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<BodyDisplayViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Core.Common.ViewModels"%>
|
||||
<%--//doing excerpt generation on the way out for now so we don't stick ourselves with needing to regen excerpts for existing data
|
||||
//also, doing this here, inline, until we have a pluggable processing model (both in and out)
|
||||
//also, ...this is ugly--%>
|
||||
<%: new HtmlString(string.Format(
|
||||
"<p>{0} {1}</p>",
|
||||
Html.Excerpt(Model.Html.ToString(), 200).ToString().Replace(Environment.NewLine, "</p>" + Environment.NewLine + "<p>"),
|
||||
Html.ItemDisplayLink(T("[more]").ToString(), Model.BodyPart.ContentItem))) %>
|
||||
@@ -0,0 +1,9 @@
|
||||
@model BodyDisplayViewModel
|
||||
@using Orchard.Core.Common.ViewModels
|
||||
@/*//doing excerpt generation on the way out for now so we don't stick ourselves with needing to regen excerpts for existing data
|
||||
//also, doing this here, inline, until we have a pluggable processing model (both in and out)
|
||||
//also, ...this is ugly*/
|
||||
@{
|
||||
var body = new HtmlString(Html.Excerpt(Model.Html.ToString(), 200).ToString().Replace(Environment.NewLine, "</p>" + Environment.NewLine + "<p>"));
|
||||
}
|
||||
<p>@body @Html.ItemDisplayLink(T("[more]").ToString(), Model.BodyPart.ContentItem)</p>
|
||||
@@ -1 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.Core.Common.ViewModels.BodyDisplayViewModel>" %>
|
||||
@@ -0,0 +1 @@
|
||||
@model Orchard.Core.Common.ViewModels.BodyDisplayViewModel
|
||||
@@ -1,3 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BodyDisplayViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Core.Common.ViewModels"%>
|
||||
<%:Model.Html %>
|
||||
@@ -0,0 +1,3 @@
|
||||
@model BodyDisplayViewModel
|
||||
@using Orchard.Core.Common.ViewModels
|
||||
@Model.Html
|
||||
@@ -1,9 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.Core.Common.ViewModels.CommonMetadataViewModel>" %>
|
||||
<ul class="pageStatus">
|
||||
<li><%
|
||||
if (Model.ModifiedUtc.HasValue) { %>
|
||||
<%:T("Last modified: {0}", Html.DateTimeRelative(Model.ModifiedUtc.Value, T)) %><%
|
||||
} %> |
|
||||
</li>
|
||||
<li><%:T("By {0}", Model.Creator.UserName) %></li>
|
||||
</ul>
|
||||
@@ -0,0 +1,7 @@
|
||||
@model Orchard.Core.Common.ViewModels.CommonMetadataViewModel
|
||||
<ul class="pageStatus">
|
||||
<li>@if (Model.ModifiedUtc.HasValue) {
|
||||
@T("Last modified: {0}", Html.DateTimeRelative(Model.ModifiedUtc.Value, T))} |
|
||||
</li>
|
||||
<li>@T("By {0}", Model.Creator.UserName)</li>
|
||||
</ul>
|
||||
@@ -1,7 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.Core.Common.ViewModels.CommonMetadataViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Core.Common.Extensions" %><%
|
||||
if (Model.Creator != null) { %>
|
||||
<div class="metadata">
|
||||
<div class="posted"><%: T("Published by {0} {1}", Model.Creator.UserName, Html.PublishedWhen(Model, T))%></div>
|
||||
</div><%
|
||||
} %>
|
||||
@@ -0,0 +1,6 @@
|
||||
@model Orchard.Core.Common.ViewModels.CommonMetadataViewModel
|
||||
@using Orchard.Core.Common.Extensions
|
||||
@if (Model.Creator != null) {
|
||||
<div class="metadata">
|
||||
<div class="posted">@T("Published by {0} {1}", Model.Creator.UserName, Html.PublishedWhen(Model, T))</div>
|
||||
</div>}
|
||||
@@ -1,5 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.Core.Common.Fields.TextField>" %>
|
||||
<fieldset>
|
||||
<label for="<%:Html.FieldIdFor(m=>m.Value) %>"><%:Model.Name %></label>
|
||||
<%:Html.EditorFor(m=>m.Value) %><%:Html.ValidationMessageFor(m=>m.Value) %>
|
||||
</fieldset>
|
||||
@@ -0,0 +1,5 @@
|
||||
@model Orchard.Core.Common.Fields.TextField
|
||||
<fieldset>
|
||||
<label for="@Html.FieldIdFor(m=>m.Value)">@Model.Name</label>
|
||||
@Html.EditorFor(m=>m.Value)@Html.ValidationMessageFor(m=>m.Value)
|
||||
</fieldset>
|
||||
@@ -1,7 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<BodyEditorViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Core.Common.ViewModels" %>
|
||||
<fieldset>
|
||||
<label><%: T("Body")%></label>
|
||||
<%: Html.Partial("EditorTemplates/" + Model.TextEditorTemplate, Model) %>
|
||||
<%: Html.ValidationMessageFor(m => m.Text) %>
|
||||
</fieldset>
|
||||
@@ -0,0 +1,7 @@
|
||||
@model BodyEditorViewModel
|
||||
@using Orchard.Core.Common.ViewModels
|
||||
<fieldset>
|
||||
<label>@T("Body")</label>
|
||||
@Html.Partial("EditorTemplates/" + Model.TextEditorTemplate, Model)
|
||||
@Html.ValidationMessageFor(m => m.Text)
|
||||
</fieldset>
|
||||
@@ -1,5 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<ContainerEditorViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Core.Common.ViewModels" %>
|
||||
<fieldset>
|
||||
<%: Html.HiddenFor(m=>m.ContainerId) %>
|
||||
</fieldset>
|
||||
@@ -0,0 +1,5 @@
|
||||
@model ContainerEditorViewModel
|
||||
@using Orchard.Core.Common.ViewModels
|
||||
<fieldset>
|
||||
@Html.HiddenFor(m=>m.ContainerId)
|
||||
</fieldset>
|
||||
@@ -1,7 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<OwnerEditorViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Core.Common.ViewModels"%>
|
||||
<fieldset>
|
||||
<%: Html.LabelFor(m=>m.Owner) %>
|
||||
<%: Html.EditorFor(m=>m.Owner) %>
|
||||
<%: Html.ValidationMessageFor(m=>m.Owner) %>
|
||||
</fieldset>
|
||||
@@ -0,0 +1,7 @@
|
||||
@model OwnerEditorViewModel
|
||||
@using Orchard.Core.Common.ViewModels
|
||||
<fieldset>
|
||||
@Html.LabelFor(m=>m.Owner)
|
||||
@Html.EditorFor(m=>m.Owner)
|
||||
@Html.ValidationMessageFor(m=>m.Owner)
|
||||
</fieldset>
|
||||
@@ -1,3 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<BodyEditorViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Core.Common.ViewModels"%>
|
||||
<%: Html.TextArea("Text", Model.Text, 25, 80, new { @class = Model.Format }) %>
|
||||
@@ -0,0 +1,3 @@
|
||||
@model BodyEditorViewModel
|
||||
@using Orchard.Core.Common.ViewModels
|
||||
@Html.TextArea("Text", Model.Text, 25, 80, new { @class = Model.Format })
|
||||
@@ -1,7 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %>
|
||||
|
||||
<h1><%: Html.TitleForPage(T("Welcome to Orchard").ToString())%></h1>
|
||||
<p><%: T("This is the place where you can manage your web site, its appearance and its contents. Please take a moment to explore the different menu items on the left of the screen to familiarize yourself with the features of the application. For example, try to change the theme through the “Manage Themes” menu entry. You can also create new pages and manage existing ones through the “Manage Pages” menu entry or create blogs through “Manage Blogs”.") %></p>
|
||||
<p><%: T("Have fun!") %><br /><%: T("The Orchard Team") %></p>
|
||||
|
||||
<div style="border:1px solid black;" role="experimentation"><%:Display(Model) %></div>
|
||||
7
src/Orchard.Web/Core/Dashboard/Views/Admin/Index.cshtml
Normal file
7
src/Orchard.Web/Core/Dashboard/Views/Admin/Index.cshtml
Normal file
@@ -0,0 +1,7 @@
|
||||
@model dynamic
|
||||
|
||||
<h1>@Html.TitleForPage(T("Welcome to Orchard").ToString())</h1>
|
||||
<p>@T("This is the place where you can manage your web site, its appearance and its contents. Please take a moment to explore the different menu items on the left of the screen to familiarize yourself with the features of the application. For example, try to change the theme through the “Manage Themes” menu entry. You can also create new pages and manage existing ones through the “Manage Pages” menu entry or create blogs through “Manage Blogs”.")</p>
|
||||
<p>@T("Have fun!")<br />@T("The Orchard Team")</p>
|
||||
|
||||
<div style="border:1px solid black;" role="experimentation">@Display(Model)</div>
|
||||
@@ -2,7 +2,6 @@
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Core.Navigation.Drivers;
|
||||
using Orchard.Core.Navigation.Models;
|
||||
using Orchard.Core.Navigation.Services;
|
||||
using Orchard.Core.Navigation.ViewModels;
|
||||
@@ -42,9 +41,9 @@ namespace Orchard.Core.Navigation.Controllers {
|
||||
model = new NavigationManagementViewModel();
|
||||
|
||||
if (model.MenuItemEntries == null || model.MenuItemEntries.Count() < 1)
|
||||
model.MenuItemEntries = _menuService.Get().Select(menuPart => CreateMenuItemEntries(menuPart)).OrderBy(menuPartEntry => menuPartEntry.MenuItem.Position, new PositionComparer()).ToList();
|
||||
model.MenuItemEntries = _menuService.Get().Select(CreateMenuItemEntries).OrderBy(menuPartEntry => menuPartEntry.MenuItem.Position, new PositionComparer()).ToList();
|
||||
|
||||
return View(Shape.Model(model));
|
||||
return View(model);
|
||||
}
|
||||
|
||||
[HttpPost, ActionName("Index")]
|
||||
@@ -66,7 +65,7 @@ namespace Orchard.Core.Navigation.Controllers {
|
||||
|
||||
private MenuItemEntry CreateMenuItemEntries(MenuPart menuPart) {
|
||||
return new MenuItemEntry {
|
||||
MenuItem = new UI.Navigation.MenuItem {
|
||||
MenuItem = new MenuItem {
|
||||
Text = menuPart.MenuText,
|
||||
Position = menuPart.MenuPosition,
|
||||
Url = menuPart.Is<MenuItemPart>()
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<NavigationManagementViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.ContentManagement"%>
|
||||
<%@ Import Namespace="Orchard.Core.Navigation.Models"%>
|
||||
<%@ Import Namespace="Orchard.Core.Navigation.ViewModels"%>
|
||||
<h1><%: Html.TitleForPage(T("Manage Main Menu").ToString())%></h1><%
|
||||
using (Html.BeginFormAntiForgeryPost()) { %>
|
||||
<table class="items">
|
||||
<colgroup>
|
||||
<col id="Text" />
|
||||
<col id="Position" />
|
||||
<col id="Url" />
|
||||
<col id="Actions" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<td scope="col"><%: T("Text") %></td>
|
||||
<td scope="col"><%: T("Position") %></td>
|
||||
<td scope="col"><%: T("Url") %></td>
|
||||
<td scope="col"></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><%
|
||||
var menuPartEntryIndex = 0;
|
||||
foreach (var menuPartEntry in Model.MenuItemEntries) {
|
||||
var i = menuPartEntryIndex; %>
|
||||
<tr>
|
||||
<td><input type="text" class="text-box" name="<%: Html.NameOf(m => m.MenuItemEntries[i].MenuItem.Text) %>" value="<%=menuPartEntry.MenuItem.Text %>" /></td>
|
||||
<td><input type="text" class="text-box" name="<%: Html.NameOf(m => m.MenuItemEntries[i].MenuItem.Position) %>" value="<%=menuPartEntry.MenuItem.Position %>" /></td>
|
||||
<td><% if (!menuPartEntry.IsMenuItem) { %><input type="text" class="text-box disabled" disabled="disabled" value="<%=menuPartEntry.MenuItem.Url %>" /><% } else { %><input type="text" class="text-box" name="<%: Html.NameOf(m => m.MenuItemEntries[i].MenuItem.Url) %>" value="<%=menuPartEntry.MenuItem.Url %>" /><% } %></td>
|
||||
<td><input type="hidden" name="<%: Html.NameOf(m => m.MenuItemEntries[i].MenuItemId) %>" value="<%=menuPartEntry.MenuItemId %>" /><a href="<%: Html.AntiForgeryTokenGetUrl(Url.Action("Delete", new {id = menuPartEntry.MenuItemId})) %>" class="remove"><%: T("Remove") %></a></td>
|
||||
</tr><%
|
||||
++menuPartEntryIndex;
|
||||
} %>
|
||||
</tbody>
|
||||
</table>
|
||||
<fieldset class="actions"><button type="submit" class="button primaryAction"><%: T("Update All") %></button></fieldset><%
|
||||
}
|
||||
%>
|
||||
|
||||
<h2><%: T("Add New Item") %></h2><%
|
||||
using (Html.BeginFormAntiForgeryPost(Url.Action("create"), FormMethod.Post)) { %>
|
||||
<table class="menu items">
|
||||
<colgroup>
|
||||
<col id="AddText" />
|
||||
<col id="AddPosition" />
|
||||
<col id="AddUrl" />
|
||||
<col id="AddActions" />
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="MenuText"><%: T("Text") %></label>
|
||||
<%: Html.EditorFor(nmvm => nmvm.NewMenuItem.MenuItem.Item.As<MenuPart>().MenuText) %>
|
||||
</td>
|
||||
<td>
|
||||
<label for="MenuPosition"><%: T("Position")%></label>
|
||||
<%: Html.EditorFor(nmvm => nmvm.NewMenuItem.MenuItem.Item.As<MenuPart>().MenuPosition) %>
|
||||
</td>
|
||||
<td>
|
||||
<label for="Url"><%: T("Url")%></label>
|
||||
<%: Html.EditorFor(nmvm => nmvm.NewMenuItem.MenuItem.Item.As<Orchard.Core.Navigation.Models.MenuItemPart>().Url)%>
|
||||
</td>
|
||||
<td><button class="add" type="submit"><%: T("Add") %></button></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table><%
|
||||
} %>
|
||||
68
src/Orchard.Web/Core/Navigation/Views/Admin/Index.cshtml
Normal file
68
src/Orchard.Web/Core/Navigation/Views/Admin/Index.cshtml
Normal file
@@ -0,0 +1,68 @@
|
||||
@model NavigationManagementViewModel
|
||||
@using Orchard.ContentManagement
|
||||
@using Orchard.Core.Navigation.Models
|
||||
@using Orchard.Core.Navigation.ViewModels
|
||||
|
||||
<h1>@Html.TitleForPage(T("Manage Main Menu").ToString())</h1>
|
||||
@using (Html.BeginFormAntiForgeryPost()) {
|
||||
<table class="items">
|
||||
<colgroup>
|
||||
<col id="Text" />
|
||||
<col id="Position" />
|
||||
<col id="Url" />
|
||||
<col id="Actions" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<td scope="col">@T("Text")</td>
|
||||
<td scope="col">@T("Position")</td>
|
||||
<td scope="col">@T("Url")</td>
|
||||
<td scope="col"></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>@{
|
||||
var menuPartEntryIndex = 0;
|
||||
foreach (var menuPartEntry in Model.MenuItemEntries) {
|
||||
var i = menuPartEntryIndex;
|
||||
<tr>
|
||||
<td><input type="text" class="text-box" name="@Html.NameOf(m => m.MenuItemEntries[i].MenuItem.Text)" value="@menuPartEntry.MenuItem.Text" /></td>
|
||||
<td><input type="text" class="text-box" name="@Html.NameOf(m => m.MenuItemEntries[i].MenuItem.Position)" value="@menuPartEntry.MenuItem.Position" /></td>
|
||||
<td>@if (!menuPartEntry.IsMenuItem) {<input type="text" class="text-box disabled" disabled="disabled" value="@menuPartEntry.MenuItem.Url" /> } else {<input type="text" class="text-box" name="@Html.NameOf(m => m.MenuItemEntries[i].MenuItem.Url)" value="@menuPartEntry.MenuItem.Url" />}</td>
|
||||
<td><input type="hidden" name="@Html.NameOf(m => m.MenuItemEntries[i].MenuItemId)" value="@menuPartEntry.MenuItemId" /><a href="@Html.AntiForgeryTokenGetUrl(Url.Action("Delete", new {id = menuPartEntry.MenuItemId}))" class="remove">@T("Remove")</a></td>
|
||||
</tr>
|
||||
++menuPartEntryIndex;
|
||||
}
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
<fieldset class="actions"><button type="submit" class="button primaryAction">@T("Update All")</button></fieldset>
|
||||
}
|
||||
|
||||
<h2>@T("Add New Item")</h2>
|
||||
@using (Html.BeginFormAntiForgeryPost(Url.Action("create"), FormMethod.Post)) {
|
||||
<table class="menu items">
|
||||
<colgroup>
|
||||
<col id="AddText" />
|
||||
<col id="AddPosition" />
|
||||
<col id="AddUrl" />
|
||||
<col id="AddActions" />
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="MenuText">@T("Text")</label>
|
||||
@Html.EditorFor(nmvm => nmvm.NewMenuItem.MenuItem.As<MenuPart>().MenuText)
|
||||
</td>
|
||||
<td>
|
||||
<label for="MenuPosition">@T("Position")</label>
|
||||
@Html.EditorFor(nmvm => nmvm.NewMenuItem.MenuItem.As<MenuPart>().MenuPosition)
|
||||
</td>
|
||||
<td>
|
||||
<label for="Url">@T("Url")</label>
|
||||
@Html.EditorFor(nmvm => nmvm.NewMenuItem.MenuItem.As<MenuItemPart>().Url)
|
||||
</td>
|
||||
<td><button class="add" type="submit">@T("Add")</button></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<MenuPart>" %>
|
||||
<%@ Import Namespace="Orchard.Core.Navigation.Models"%>
|
||||
<%@ Import Namespace="Orchard.Core.Navigation.ViewModels"%>
|
||||
<fieldset>
|
||||
<%: Html.EditorFor(m => m.OnMainMenu) %>
|
||||
<label for="OnMainMenu" class="forcheckbox"><%: T("Show on main menu") %></label>
|
||||
<div data-controllerid="OnMainMenu" class="">
|
||||
<label for="MenuText"><%: T("Menu text") %></label>
|
||||
<%: Html.TextBoxFor(m => m.MenuText, new { @class = "large text" })%>
|
||||
</div>
|
||||
</fieldset>
|
||||
@@ -0,0 +1,11 @@
|
||||
@model MenuPart
|
||||
@using Orchard.Core.Navigation.Models
|
||||
@using Orchard.Core.Navigation.ViewModels
|
||||
<fieldset>
|
||||
@Html.EditorFor(m => m.OnMainMenu)
|
||||
<label for="OnMainMenu" class="forcheckbox">@T("Show on main menu")</label>
|
||||
<div data-controllerid="OnMainMenu" class="">
|
||||
<label for="MenuText">@T("Menu text")</label>
|
||||
@Html.TextBoxFor(m => m.MenuText, new { @class = "large text" })
|
||||
</div>
|
||||
</fieldset>
|
||||
@@ -240,15 +240,15 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Common\Module.txt" />
|
||||
<Content Include="Common\Views\DefinitionTemplates\BodyTypePartSettings.ascx" />
|
||||
<Content Include="Common\Views\DefinitionTemplates\BodyPartSettings.ascx" />
|
||||
<Content Include="Common\Views\DisplayTemplates\Fields\Common.TextField.ascx" />
|
||||
<Content Include="Common\Views\DisplayTemplates\Parts\Common.Body.SummaryAdmin.ascx" />
|
||||
<Content Include="Common\Views\DisplayTemplates\Parts\Common.Body.Manage.SummaryAdmin.ascx" />
|
||||
<Content Include="Common\Views\DisplayTemplates\Parts\Common.Body.ManageWrapperPost.SummaryAdmin.ascx" />
|
||||
<Content Include="Common\Views\DisplayTemplates\Parts\Common.Body.ManageWrapperPre.SummaryAdmin.ascx" />
|
||||
<Content Include="Common\Views\DisplayTemplates\Parts\Common.Metadata.ascx" />
|
||||
<Content Include="Common\Views\DisplayTemplates\Parts\Common.Metadata.SummaryAdmin.ascx" />
|
||||
<None Include="Common\Views\DefinitionTemplates\BodyTypePartSettings.cshtml" />
|
||||
<None Include="Common\Views\DefinitionTemplates\BodyPartSettings.cshtml" />
|
||||
<None Include="Common\Views\DisplayTemplates\Fields\Common.TextField.cshtml" />
|
||||
<None Include="Common\Views\DisplayTemplates\Parts\Common.Body.SummaryAdmin.cshtml" />
|
||||
<None Include="Common\Views\DisplayTemplates\Parts\Common.Body.Manage.SummaryAdmin.cshtml" />
|
||||
<None Include="Common\Views\DisplayTemplates\Parts\Common.Body.ManageWrapperPost.SummaryAdmin.cshtml" />
|
||||
<None Include="Common\Views\DisplayTemplates\Parts\Common.Body.ManageWrapperPre.SummaryAdmin.cshtml" />
|
||||
<None Include="Common\Views\DisplayTemplates\Parts\Common.Metadata.cshtml" />
|
||||
<None Include="Common\Views\DisplayTemplates\Parts\Common.Metadata.SummaryAdmin.cshtml" />
|
||||
<Content Include="ContentsLocation\Module.txt" />
|
||||
<Content Include="ContentsLocation\Styles\admin.css" />
|
||||
<Content Include="ContentsLocation\Views\DefinitionTemplates\LocationSettings.ascx" />
|
||||
@@ -265,9 +265,9 @@
|
||||
<Content Include="PublishLater\Content\Admin\images\scheduled.gif" />
|
||||
<Content Include="PublishLater\Views\DisplayTemplates\Parts\PublishLater.Metadata.ascx" />
|
||||
<Content Include="PublishLater\Views\DisplayTemplates\Parts\PublishLater.Metadata.SummaryAdmin.ascx" />
|
||||
<Content Include="Common\Views\EditorTemplates\Fields\Common.TextField.ascx" />
|
||||
<Content Include="Common\Views\EditorTemplates\Parts\Common.Container.ascx" />
|
||||
<Content Include="Common\Views\EditorTemplates\PlainTextEditor.ascx" />
|
||||
<None Include="Common\Views\EditorTemplates\Fields\Common.TextField.cshtml" />
|
||||
<None Include="Common\Views\EditorTemplates\Parts\Common.Container.cshtml" />
|
||||
<None Include="Common\Views\EditorTemplates\PlainTextEditor.cshtml" />
|
||||
<Content Include="Contents\Module.txt" />
|
||||
<Content Include="Contents\Views\Admin\Edit.ascx" />
|
||||
<Content Include="Contents\Views\Admin\CreatableTypeList.ascx" />
|
||||
@@ -366,9 +366,9 @@
|
||||
<Content Include="Common\Views\Web.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Common\Views\DisplayTemplates\Parts\Common.Body.ascx" />
|
||||
<Content Include="Common\Views\EditorTemplates\Parts\Common.Body.ascx" />
|
||||
<Content Include="Common\Views\EditorTemplates\Parts\Common.Owner.ascx" />
|
||||
<None Include="Common\Views\DisplayTemplates\Parts\Common.Body.cshtml" />
|
||||
<None Include="Common\Views\EditorTemplates\Parts\Common.Body.cshtml" />
|
||||
<None Include="Common\Views\EditorTemplates\Parts\Common.Owner.cshtml" />
|
||||
<Content Include="Feeds\Module.txt" />
|
||||
<Content Include="Navigation\Module.txt" />
|
||||
<Content Include="Scheduling\Module.txt" />
|
||||
@@ -376,17 +376,17 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Dashboard\Module.txt" />
|
||||
<Content Include="Dashboard\Views\Admin\Index.ascx" />
|
||||
<None Include="Dashboard\Views\Admin\Index.cshtml" />
|
||||
<Content Include="HomePage\Module.txt" />
|
||||
<Content Include="Navigation\Views\Admin\Index.ascx" />
|
||||
<Content Include="Navigation\Views\EditorTemplates\Parts\Navigation.EditMenuPart.ascx" />
|
||||
<None Include="Navigation\Views\Admin\Index.cshtml" />
|
||||
<None Include="Navigation\Views\EditorTemplates\Parts\Navigation.EditMenuPart.cshtml" />
|
||||
<Content Include="Navigation\Views\Web.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Common\Views\DisplayTemplates\Parts\Common.Body.Summary.ascx" />
|
||||
<Content Include="Common\Views\DisplayTemplates\Parts\Common.Body.ManageWrapperPost.ascx" />
|
||||
<Content Include="Common\Views\DisplayTemplates\Parts\Common.Body.ManageWrapperPre.ascx" />
|
||||
<Content Include="Common\Views\DisplayTemplates\Parts\Common.Body.Manage.ascx" />
|
||||
<None Include="Common\Views\DisplayTemplates\Parts\Common.Body.Summary.cshtml" />
|
||||
<None Include="Common\Views\DisplayTemplates\Parts\Common.Body.ManageWrapperPost.cshtml" />
|
||||
<None Include="Common\Views\DisplayTemplates\Parts\Common.Body.ManageWrapperPre.cshtml" />
|
||||
<None Include="Common\Views\DisplayTemplates\Parts\Common.Body.Manage.cshtml" />
|
||||
<Content Include="Dashboard\Views\Web.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
|
||||
Reference in New Issue
Block a user