Convert Localization (partially working)

--HG--
branch : dev
This commit is contained in:
Dave Reed
2010-10-18 16:39:47 -07:00
parent 9e7954104e
commit c1e32eee36
4 changed files with 6 additions and 4 deletions

View File

@@ -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) {

View File

@@ -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>

View File

@@ -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" />