mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Getting content localization parts hooked back up
--HG-- branch : dev
This commit is contained in:
@@ -28,7 +28,7 @@ namespace Orchard.Core.Localization.Drivers {
|
||||
ContentShape("Parts_Localization_ContentTranslations",
|
||||
() => shapeHelper.Parts_Localization_ContentTranslations(ContentPart: part, MasterId: masterId, Localizations: GetDisplayLocalizations(part))),
|
||||
ContentShape("Parts_Localization_ContentTranslations_Summary",
|
||||
() => shapeHelper.Parts_Localization_ContentTranslations_Summary(ContentPart: part, MasterId: masterId, Localizations: GetDisplayLocalizations(part)))
|
||||
() => shapeHelper.Parts_Localization_ContentTranslations_Summary(ContentPart: part, MasterId: masterId, Localizations: GetDisplayLocalizations(part)))
|
||||
);
|
||||
}
|
||||
|
||||
@@ -42,9 +42,8 @@ namespace Orchard.Core.Localization.Drivers {
|
||||
ContentLocalizations = new ContentLocalizationsViewModel(part) { Localizations = localizations }
|
||||
};
|
||||
|
||||
return ContentShape("Parts_Localization_ContentTranslations_Edit", () => {
|
||||
return shapeHelper.EditorTemplate(TemplateName: "Parts/Localization.ContentTranslations.Edit", Model: model, Prefix: TemplatePrefix);
|
||||
});
|
||||
return ContentShape("Parts_Localization_ContentTranslations_Edit",
|
||||
() => shapeHelper.EditorTemplate(TemplateName: "Parts/Localization.ContentTranslations.Edit", Model: model, Prefix: TemplatePrefix));
|
||||
}
|
||||
|
||||
protected override DriverResult Editor(LocalizationPart part, IUpdateModel updater, dynamic shapeHelper) {
|
||||
|
@@ -1,14 +1,18 @@
|
||||
<Placement>
|
||||
<Place Parts_Localization_ContentTranslations="-"/>
|
||||
<Place Parts_Localization_ContentTranslations_Summary="-"/>
|
||||
<!-- available display shapes -->
|
||||
<!--
|
||||
Parts_Localization_ContentTranslations
|
||||
Parts_Localization_ContentTranslations_Summary
|
||||
-->
|
||||
<!-- edit shape just gets default placement -->
|
||||
<Place Parts_Localization_ContentTranslations_Edit="Primary:before.1"/>
|
||||
<Match DisplayType="Detail">
|
||||
<Place Parts_Localization_ContentTranslations="Content:before.5"/>
|
||||
<Place Parts_Localization_ContentTranslations="Content:2"/>
|
||||
</Match>
|
||||
<Match DisplayType="Summary">
|
||||
<Place Parts_Localization_ContentTranslations_Summary="Content:after.5"/>
|
||||
<Place Parts_Localization_ContentTranslations_Summary="Content:2"/>
|
||||
</Match>
|
||||
<Match DisplayType="SummaryAdmin">
|
||||
<Place Parts_Localization_ContentTranslations_Summary="Meta:after.1"/>
|
||||
<Place Parts_Localization_ContentTranslations_Summary="Primary:5"/>
|
||||
</Match>
|
||||
</Placement>
|
@@ -8,7 +8,7 @@
|
||||
.content-localization .culture-selected {
|
||||
margin-bottom:.5em;
|
||||
}
|
||||
.content-localization .content-localizations {
|
||||
.culture-selection .content-localizations li {
|
||||
font-size:.9em;
|
||||
}
|
||||
.content-localization .content-localizations>* {
|
||||
|
@@ -2,7 +2,7 @@
|
||||
@using Orchard.Core.Localization.ViewModels;
|
||||
@{
|
||||
dynamic content = Model.Content;
|
||||
content.Zones.primary.Add(New.Partial(TemplateName: "CultureSelection", Model: Model), "0");
|
||||
content.Zones.Primary.Add(New.Partial(TemplateName: "CultureSelection", Model: Model), "0");
|
||||
}
|
||||
<h1>@Html.TitleForPage(T("Translate Content").ToString())</h1>
|
||||
@using (Html.BeginFormAntiForgeryPost()) {
|
||||
|
@@ -1,4 +1,7 @@
|
||||
@model Orchard.Core.Localization.ViewModels.AddLocalizationViewModel
|
||||
@{
|
||||
Style.Require("LocalizationAdmin");
|
||||
}
|
||||
<fieldset class="localization culture-selection">
|
||||
<label for="SelectedCulture">@T("Content Localization")</label>
|
||||
@{
|
||||
@@ -6,7 +9,7 @@
|
||||
siteCultures.Insert(0, "");
|
||||
}
|
||||
<div>
|
||||
@T("This is the <em>{0}</em> variation of {1}.",
|
||||
@T("This is the <em>{0}</em> variation of {1}",
|
||||
Html.DropDownList("SelectedCulture", new SelectList(siteCultures, Model.SelectedCulture)),
|
||||
Html.ItemEditLink(Model.Content))
|
||||
</div>
|
||||
|
@@ -1,6 +1,5 @@
|
||||
@model Orchard.Core.Localization.ViewModels.EditLocalizationViewModel
|
||||
@if (Model.ContentItem.ContentItem.Id > 0 && Model.SelectedCulture != null && Model.ContentLocalizations.Localizations.Count() > 0) {
|
||||
Style.Require("Localization");
|
||||
Style.Require("LocalizationAdmin");
|
||||
<fieldset class="localization culture-selection">
|
||||
<fieldset class="culture-selected">
|
||||
|
@@ -1,11 +1,9 @@
|
||||
@using Orchard.Core.Contents;
|
||||
@using Orchard.Core.Localization.Models;
|
||||
@{
|
||||
Style.Require("LocalizationAdmin");
|
||||
IEnumerable<LocalizationPart> localizations = Model.Localizations;
|
||||
var localizationLinks = Html.UnorderedList(localizations, (c, i) => Html.ItemEditLink(c.Culture.Culture, c), "localizations");
|
||||
}
|
||||
@if (localizations.Count() > 0 || AuthorizedFor(Permissions.PublishContent)) {
|
||||
@if (AuthorizedFor(Permissions.PublishContent)) {
|
||||
Style.Require("LocalizationAdmin");
|
||||
IEnumerable<LocalizationPart> localizations = Model.Localizations;
|
||||
var localizationLinks = Html.UnorderedList(localizations, (c, i) => Html.ItemEditLink(c.Culture.Culture, c), "localizations");
|
||||
<div class="content-localization">
|
||||
@if (localizations.Count() > 0) {
|
||||
<div class="content-localizations"><h4>@T("Translations:")</h4>@localizationLinks</div>
|
||||
|
@@ -774,7 +774,6 @@ table .button {
|
||||
}
|
||||
.contentItems.bulk-items .primary {
|
||||
clear:both;
|
||||
float:left;
|
||||
margin-top:0;
|
||||
}
|
||||
.contentItems .properties li {
|
||||
|
Reference in New Issue
Block a user