mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Updating Orchard.Core.Routable for the new shape API
--HG-- branch : dev
This commit is contained in:
@@ -293,6 +293,9 @@
|
||||
<Content Include="Settings\Styles\admin.css" />
|
||||
<Content Include="Settings\Views\Admin\Index.cshtml" />
|
||||
<Content Include="Settings\Views\Admin\Culture.cshtml" />
|
||||
<None Include="Routable\Placement.info">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<None Include="Settings\Placement.info">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
|
@@ -44,7 +44,8 @@ namespace Orchard.Core.Routable.Drivers {
|
||||
}
|
||||
|
||||
protected override DriverResult Display(RoutePart part, string displayType, dynamic shapeHelper) {
|
||||
return ContentShape("Parts_RoutableTitle", "Header:5", () => shapeHelper.Parts_RoutableTitle(ContentPart: part, Title: part.Title, Path: part.Path));
|
||||
return ContentShape("Parts_RoutableTitle",
|
||||
() => shapeHelper.Parts_RoutableTitle(ContentPart: part, Title: part.Title, Path: part.Path));
|
||||
}
|
||||
|
||||
protected override DriverResult Editor(RoutePart part, dynamic shapeHelper) {
|
||||
@@ -69,10 +70,9 @@ namespace Orchard.Core.Routable.Drivers {
|
||||
: "";
|
||||
}
|
||||
|
||||
// TODO: andrerod convert to new shape API. Location code kept for reference.
|
||||
//var location = part.GetLocation("Editor");
|
||||
model.PromoteToHomePage = model.Id != 0 && part.Path != null && _routableHomePageProvider != null && CurrentSite.HomePage == _routableHomePageProvider.GetSettingValue(model.Id);
|
||||
return ContentPartTemplate(model, TemplateName, Prefix); //.Location(location);
|
||||
return ContentShape("Parts_Routable_Edit",
|
||||
() => shapeHelper.EditorTemplate(TemplateName: TemplateName, Model: model, Prefix: Prefix));
|
||||
}
|
||||
|
||||
protected override DriverResult Editor(RoutePart part, IUpdateModel updater, dynamic shapeHelper) {
|
||||
|
4
src/Orchard.Web/Core/Routable/Placement.info
Normal file
4
src/Orchard.Web/Core/Routable/Placement.info
Normal file
@@ -0,0 +1,4 @@
|
||||
<Placement>
|
||||
<Place Parts_RoutableTitle="Header:5"/>
|
||||
<Place Parts_Routable_Edit="Primary:before.5"/>
|
||||
</Placement>
|
@@ -9,8 +9,10 @@
|
||||
<fieldset class="permalink">
|
||||
<label class="sub" for="Slug">@T("Permalink")<br /><span>@Request.ToRootUrlString()/@Model.DisplayLeadingPath</span></label>
|
||||
<span>@Html.TextBoxFor(m => m.Slug, new { @class = "text" })</span>
|
||||
@Html.EditorFor(m => m.PromoteToHomePage)
|
||||
<label for="@ViewData.TemplateInfo.GetFullHtmlFieldId("PromoteToHomePage")" class="forcheckbox">@T("Set as home page")</label>
|
||||
<span class="checkbox-and-label">
|
||||
@Html.EditorFor(m => m.PromoteToHomePage)
|
||||
<label for="@ViewData.TemplateInfo.GetFullHtmlFieldId("PromoteToHomePage")" class="forcheckbox">@T("Set as home page")</label>
|
||||
</span>
|
||||
</fieldset>
|
||||
@using(Script.Foot()){
|
||||
<script type="text/javascript">
|
||||
|
@@ -815,6 +815,9 @@ table .button {
|
||||
border-color:#666d51;
|
||||
border-style:solid;
|
||||
}
|
||||
.permalink .checkbox-and-label {
|
||||
white-space:nowrap;
|
||||
}
|
||||
/* Settings */
|
||||
.settings fieldset {
|
||||
margin:.5em 0;
|
||||
|
Reference in New Issue
Block a user