mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Migrating Routable and XmlRpc
--HG-- branch : theming
This commit is contained in:
@@ -315,8 +315,8 @@
|
||||
<Content Include="Localization\Views\CultureSelection.ascx" />
|
||||
<Content Include="Routable\Module.txt" />
|
||||
<Content Include="Routable\Scripts\jquery.slugify.js" />
|
||||
<Content Include="Routable\Views\EditorTemplates\Parts\Routable.RoutePart.ascx" />
|
||||
<Content Include="Routable\Views\Item\Display.ascx" />
|
||||
<None Include="Routable\Views\EditorTemplates\Parts\Routable.RoutePart.cshtml" />
|
||||
<None Include="Routable\Views\Item\Display.cshtml" />
|
||||
<Content Include="Settings\Module.txt" />
|
||||
<Content Include="Settings\Styles\admin.css" />
|
||||
<None Include="Settings\Views\Admin\Index.cshtml" />
|
||||
@@ -344,7 +344,7 @@
|
||||
<Content Include="Shapes\Views\UI\Switchable.ascx" />
|
||||
<Content Include="Web.config" />
|
||||
<Content Include="XmlRpc\Module.txt" />
|
||||
<Content Include="XmlRpc\Views\Home\Index.aspx" />
|
||||
<None Include="XmlRpc\Views\Home\Index.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\Clay\src\ClaySharp\ClaySharp.csproj">
|
||||
|
@@ -42,7 +42,7 @@ namespace Orchard.Core.Routable.Controllers {
|
||||
}
|
||||
|
||||
var model = _contentManager.BuildDisplayModel<IRoutableAspect>(hits.Single(), "Detail");
|
||||
return View(Shape.Model(model));
|
||||
return View(model);
|
||||
}
|
||||
|
||||
public ActionResult Slugify(string contentType, int? id, int? containerId) {
|
||||
|
@@ -1,32 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.Core.Routable.ViewModels.RoutableEditorViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Utility.Extensions"%>
|
||||
|
||||
<% Html.RegisterFootScript("jquery.slugify.js"); %>
|
||||
<fieldset>
|
||||
<%: Html.LabelFor(m => m.Title) %>
|
||||
<%: Html.TextBoxFor(m => m.Title, new { @class = "large text" }) %>
|
||||
</fieldset>
|
||||
<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>
|
||||
</fieldset>
|
||||
<% using (this.Capture("end-of-page-scripts")) { %>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
//pull slug input from tab order
|
||||
$("#<%: Html.FieldIdFor(m=>m.Slug)%>").attr("tabindex",-1);
|
||||
$("#<%: Html.FieldIdFor(m=>m.Title)%>").blur(function(){
|
||||
var slug = $("#<%:Html.FieldIdFor(m=>m.Slug)%>");
|
||||
if (slug.val()) { return true; }
|
||||
$(this).slugify({
|
||||
target:slug,
|
||||
url:"<%: Url.Action("Slugify","Item",new RouteValueDictionary{{"Area","Routable"}})%>",
|
||||
contentType:"<%: Model.ContentType %>",
|
||||
id:"<%=Model.Id %>" <%if (Model.ContainerId != null) { %>,
|
||||
containerId:<%: Model.ContainerId %><%} %>
|
||||
})
|
||||
})
|
||||
})</script>
|
||||
<% } %>
|
@@ -0,0 +1,32 @@
|
||||
@model Orchard.Core.Routable.ViewModels.RoutableEditorViewModel
|
||||
@using Orchard.Utility.Extensions
|
||||
|
||||
@Html.RegisterFootScript("jquery.slugify.js");
|
||||
<fieldset>
|
||||
@Html.LabelFor(m => m.Title)
|
||||
@Html.TextBoxFor(m => m.Title, new { @class = "large text" })
|
||||
</fieldset>
|
||||
<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>
|
||||
</fieldset>
|
||||
@using (this.Capture("end-of-page-scripts")) {
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
//pull slug input from tab order
|
||||
$("#@Html.FieldIdFor(m=>m.Slug)").attr("tabindex",-1);
|
||||
$("#@Html.FieldIdFor(m=>m.Title)").blur(function(){
|
||||
var slug = $("#@Html.FieldIdFor(m=>m.Slug)");
|
||||
if (slug.val()) { return true; }
|
||||
$(this).slugify({
|
||||
target:slug,
|
||||
url:"@Url.Action("Slugify","Item",new RouteValueDictionary{{"Area","Routable"}})",
|
||||
contentType:"@Model.ContentType",
|
||||
id:"@Model.Id" @if (Model.ContainerId != null) {,
|
||||
containerId:@Model.ContainerId}
|
||||
})
|
||||
})
|
||||
})</script>
|
||||
}
|
@@ -1,3 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.Core.Routable.ViewModels.RoutableDisplayViewModel>" %>
|
||||
<% Html.AddTitleParts(Model.Routable.Item.Title); %>
|
||||
<%: Html.DisplayForItem(m=>m.Routable) %>
|
3
src/Orchard.Web/Core/Routable/Views/Item/Display.cshtml
Normal file
3
src/Orchard.Web/Core/Routable/Views/Item/Display.cshtml
Normal file
@@ -0,0 +1,3 @@
|
||||
@model Orchard.Core.Routable.ViewModels.RoutableDisplayViewModel
|
||||
@Html.AddTitleParts(Model.Routable.Item.Title);
|
||||
@Display(Model.Routable)
|
@@ -1,4 +1,4 @@
|
||||
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %>
|
||||
@model dynamic
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head><title>Use this url for LiveWriter</title></head>
|
Reference in New Issue
Block a user