mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Localization: Removed +New Translation from 'Summary' view. Admin now has its own Summary template.
--HG-- branch : dev
This commit is contained in:
@@ -28,7 +28,9 @@ 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))),
|
||||
ContentShape("Parts_Localization_ContentTranslations_SummaryAdmin",
|
||||
() => shapeHelper.Parts_Localization_ContentTranslations_SummaryAdmin(ContentPart: part, MasterId: masterId, Localizations: GetDisplayLocalizations(part)))
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -3,6 +3,7 @@
|
||||
<!--
|
||||
Parts_Localization_ContentTranslations
|
||||
Parts_Localization_ContentTranslations_Summary
|
||||
Parts_Localization_ContentTranslations_SummaryAdmin
|
||||
-->
|
||||
<!-- edit shape just gets default placement -->
|
||||
<Place Parts_Localization_ContentTranslations_Edit="Primary:before.1"/>
|
||||
@@ -13,6 +14,6 @@
|
||||
<Place Parts_Localization_ContentTranslations_Summary="Content:2"/>
|
||||
</Match>
|
||||
<Match DisplayType="SummaryAdmin">
|
||||
<Place Parts_Localization_ContentTranslations_Summary="Primary:5"/>
|
||||
<Place Parts_Localization_ContentTranslations_SummaryAdmin="Primary:5"/>
|
||||
</Match>
|
||||
</Placement>
|
@@ -8,8 +8,5 @@ var localizationLinks = Html.UnorderedList(localizations, (c, i) => Html.ItemEdi
|
||||
@if (localizations.Count() > 0) {
|
||||
<div class="content-localizations"><h4>@T("Translations:")</h4>@localizationLinks</div>
|
||||
}
|
||||
@if (AuthorizedFor(Permissions.PublishContent)) {
|
||||
<div class="add-localization">@Html.ActionLink(T("+ New translation").Text, "Translate", "Admin", new { area = "Localization", id = Model.MasterId }, null)</div>
|
||||
}
|
||||
</div>
|
||||
}
|
@@ -0,0 +1,13 @@
|
||||
@using Orchard.Core.Contents;
|
||||
@using Orchard.Core.Localization.Models;
|
||||
@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>
|
||||
}
|
||||
<div class="add-localization">@Html.ActionLink(T("+ New translation").Text, "Translate", "Admin", new { area = "Localization", id = Model.MasterId }, null)</div>
|
||||
</div>
|
||||
}
|
Reference in New Issue
Block a user