mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 11:44:58 +08:00
Merge
--HG-- branch : dev
This commit is contained in:
@@ -42,8 +42,9 @@ namespace Orchard.Core.Localization.Drivers {
|
||||
ContentLocalizations = new ContentLocalizationsViewModel(part) { Localizations = localizations }
|
||||
};
|
||||
|
||||
// TODO: andrerod convert to new shape API. Location code kept for reference.
|
||||
return ContentPartTemplate(model, "Parts/Localization.Translation", TemplatePrefix); //.Location(part.GetLocation("Editor"));
|
||||
return ContentShape("Parts_Localization_ContentTranslations_Edit", () => {
|
||||
return shapeHelper.EditorTemplate(TemplateName: "Parts/Localization.ContentTranslations.Edit", Model: model, Prefix: TemplatePrefix);
|
||||
});
|
||||
}
|
||||
|
||||
protected override DriverResult Editor(LocalizationPart part, IUpdateModel updater, dynamic shapeHelper) {
|
||||
|
@@ -1,6 +1,7 @@
|
||||
<Placement>
|
||||
<Place Parts_Localization_ContentTranslations="-"/>
|
||||
<Place Parts_Localization_ContentTranslations_Summary="-"/>
|
||||
<Place Parts_Localization_ContentTranslations_Edit="Primary:before.1"/>
|
||||
<Match DisplayType="Detail">
|
||||
<Place Parts_Localization_ContentTranslations="Content:before.5"/>
|
||||
</Match>
|
||||
@@ -8,6 +9,6 @@
|
||||
<Place Parts_Localization_ContentTranslations_Summary="Content:after.5"/>
|
||||
</Match>
|
||||
<Match DisplayType="SummaryAdmin">
|
||||
<Place Parts_Localization_ContentTranslations_Summary="Content:after.5"/>
|
||||
<Place Parts_Localization_ContentTranslations_Summary="Meta:after.1"/>
|
||||
</Match>
|
||||
</Placement>
|
@@ -256,7 +256,7 @@
|
||||
<Content Include="Contents\Views\Admin\Edit.cshtml" />
|
||||
<Content Include="Contents\Views\Admin\List.cshtml" />
|
||||
<Content Include="Feeds\Views\Feed.cshtml" />
|
||||
<Content Include="Localization\Views\EditorTemplates\Parts\Localization.Translation.cshtml" />
|
||||
<Content Include="Localization\Views\EditorTemplates\Parts\Localization.ContentTranslations.Edit.cshtml" />
|
||||
<Content Include="Contents\Views\Parts\Contents.Publish.cshtml" />
|
||||
<Content Include="Contents\Views\Parts\Contents.Publish.SummaryAdmin.cshtml" />
|
||||
<Content Include="Messaging\Module.txt" />
|
||||
|
@@ -1,4 +1,6 @@
|
||||
@model Orchard.Packaging.ViewModels.PackagingModulesViewModel
|
||||
@using System.Linq;
|
||||
|
||||
@{ Style.Require("PackagingAdmin"); }
|
||||
|
||||
<h1>@Html.TitleForPage(T("Browse Gallery - Modules").ToString())</h1>
|
||||
@@ -10,7 +12,7 @@
|
||||
<select id="sourceId" name="sourceId">
|
||||
@Html.SelectOption("", Model.SelectedSource == null, T("Any (show all feeds)").ToString())
|
||||
@foreach (var source in Model.Sources) {
|
||||
Html.SelectOption(source.Id, Model.SelectedSource != null && Model.SelectedSource.Id == source.Id, source.FeedTitle);
|
||||
@Html.SelectOption(source.Id, Model.SelectedSource != null && Model.SelectedSource.Id == source.Id, source.FeedTitle)
|
||||
}
|
||||
</select>
|
||||
<button type="submit">@T("Apply")</button>
|
||||
@@ -23,7 +25,7 @@
|
||||
@foreach (var item in Model.Modules) {
|
||||
<li>
|
||||
<div class="moduleName">
|
||||
<h2>@(item.SyndicationItem.Title == null ? T("(No title)").Text : item.SyndicationItem.Title.Text)<span> - @T("Version: {0}", "1.0")</span></h2>
|
||||
<h2>@(item.SyndicationItem.Title == null ? T("(No title)").Text : item.SyndicationItem.Title.Text)<span> - @T("Version: {0}", item.SyndicationItem.ElementExtensions.ReadElementExtensions<string>("Version", "http://orchardproject.net").FirstOrDefault() ?? T("N/A").Text)</span></h2>
|
||||
</div>
|
||||
|
||||
<div class="related">
|
||||
|
@@ -13,7 +13,7 @@
|
||||
<select id="sourceId" name="sourceId">
|
||||
@Html.SelectOption("", Model.SelectedSource == null, T("Any (show all feeds)").ToString())
|
||||
@foreach (var source in Model.Sources) {
|
||||
Html.SelectOption(source.Id, Model.SelectedSource != null && Model.SelectedSource.Id == source.Id, source.FeedTitle);
|
||||
@Html.SelectOption(source.Id, Model.SelectedSource != null && Model.SelectedSource.Id == source.Id, source.FeedTitle)
|
||||
}
|
||||
</select>
|
||||
<button type="submit">@T("Apply")</button>
|
||||
|
@@ -1,33 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %>
|
||||
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
|
||||
|
||||
<%--//todo: get the settings from the cookie to class-ify parts of the menu that should be closed on load--%>
|
||||
<%--<ul id="navigation" role="navigation">
|
||||
<%if (Model.Menu != null) {
|
||||
foreach (var menuSection in Model.Menu) {
|
||||
// todo: (heskew) need some help(er)
|
||||
var firstSectionItem = menuSection.Items.FirstOrDefault();
|
||||
var sectionHeaderMarkup = firstSectionItem != null
|
||||
? Html.ActionLink(menuSection.Text, (string)firstSectionItem.RouteValues["action"], firstSectionItem.RouteValues).ToHtmlString()
|
||||
: string.Format("<span>{0}</span>", Html.Encode(menuSection.Text));
|
||||
var classification = "";
|
||||
if (menuSection == Model.Menu.First())
|
||||
classification = "first ";
|
||||
if (menuSection == Model.Menu.Last())
|
||||
classification += "last ";
|
||||
|
||||
%>
|
||||
<li<%=!string.IsNullOrEmpty(classification) ? string.Format(" class=\"{0}\"", classification.TrimEnd()) : "" %>><h3><%=sectionHeaderMarkup %></h3><ul class="menuItems"><%foreach (var menuItem in menuSection.Items) { %>
|
||||
<li><%: Html.ActionLink(menuItem.Text, (string)menuItem.RouteValues["action"], menuItem.RouteValues)%></li>
|
||||
<%} %></ul></li>
|
||||
<%
|
||||
}
|
||||
}%>
|
||||
</ul>
|
||||
<% using (this.Capture("end-of-page-scripts")) { %>
|
||||
<script type="text/javascript">
|
||||
(function ($) {
|
||||
$("#navigation h3").expandoControl(function(controller) { return controller.next(); }, { key: "N42", path: "<%:ResolveUrl("~/") %>" });
|
||||
})(jQuery);
|
||||
</script>
|
||||
<% } %>--%>
|
@@ -1,14 +1,44 @@
|
||||
<ul id="navigation">
|
||||
@using System.Web.Routing;
|
||||
@{
|
||||
Script.Require("jQuery");
|
||||
Script.Include("admin.js");
|
||||
IEnumerable<dynamic> firstLevelMenuItems = Model;
|
||||
}
|
||||
<ul id="navigation" role="navigation">
|
||||
@foreach(var firstLevelMenuItem in Model) {
|
||||
<li>
|
||||
<h3><a href="#">@firstLevelMenuItem.Text</a></h3>
|
||||
IEnumerable<dynamic> secondLevelMenuItems = firstLevelMenuItem;
|
||||
|
||||
var firstOfTheSecond = secondLevelMenuItems.FirstOrDefault();
|
||||
var sectionHeaderMarkup = firstOfTheSecond != null
|
||||
? Html.ActionLink((string)firstLevelMenuItem.Text, (string)firstOfTheSecond.RouteValues["action"], (RouteValueDictionary)firstOfTheSecond.RouteValues)
|
||||
: new HtmlString(string.Format("<span>{0}</span>", Html.Encode(firstLevelMenuItem.Text)));
|
||||
|
||||
if (firstLevelMenuItem == firstLevelMenuItems.First()) {
|
||||
firstLevelMenuItem.Classes.Add("first");
|
||||
}
|
||||
if (firstLevelMenuItem == firstLevelMenuItems.Last()) {
|
||||
firstLevelMenuItem.Classes.Add("last");
|
||||
}
|
||||
|
||||
var firstLevelTag = Tag(firstLevelMenuItem, "li");
|
||||
@firstLevelTag.StartElement
|
||||
<h3>@sectionHeaderMarkup</h3>
|
||||
<ul class="menuItems">
|
||||
@foreach(var secondLevelMenuItem in firstLevelMenuItem) {
|
||||
@foreach(var secondLevelMenuItem in secondLevelMenuItems) {
|
||||
<li>
|
||||
<a href="@secondLevelMenuItem.Href">@secondLevelMenuItem.Text</a>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
</li>
|
||||
@firstLevelTag.EndElement
|
||||
}
|
||||
</ul>
|
||||
</ul>
|
||||
@using(Script.Foot()) {
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
(function ($) {
|
||||
$("#navigation h3").expandoControl(function(controller) { return controller.next(); }, { key: "N42", path: "@Url.Content("~/")" });
|
||||
})(jQuery);
|
||||
//]]>
|
||||
</script>
|
||||
}
|
@@ -68,6 +68,7 @@
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
<Content Include="TheThemeMachine\Views\User.cshtml" />
|
||||
<None Include="TheAdmin\Views\Menu.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="TheAdmin\Styles\images\icons.png" />
|
||||
|
Reference in New Issue
Block a user