From 3ea9359c7a46fb5b4408b485949ef3549f4629ef Mon Sep 17 00:00:00 2001 From: Sebastien Ros Date: Fri, 10 Sep 2010 16:33:55 -0700 Subject: [PATCH] Migrating Routable and XmlRpc --HG-- branch : theming --- src/Orchard.Web/Core/Orchard.Core.csproj | 6 ++-- .../Routable/Controllers/ItemController.cs | 2 +- .../Parts/Routable.RoutePart.ascx | 32 ------------------- .../Parts/Routable.RoutePart.cshtml | 32 +++++++++++++++++++ .../Core/Routable/Views/Item/Display.ascx | 3 -- .../Core/Routable/Views/Item/Display.cshtml | 3 ++ .../Views/Home/{Index.aspx => Index.cshtml} | 2 +- 7 files changed, 40 insertions(+), 40 deletions(-) delete mode 100644 src/Orchard.Web/Core/Routable/Views/EditorTemplates/Parts/Routable.RoutePart.ascx create mode 100644 src/Orchard.Web/Core/Routable/Views/EditorTemplates/Parts/Routable.RoutePart.cshtml delete mode 100644 src/Orchard.Web/Core/Routable/Views/Item/Display.ascx create mode 100644 src/Orchard.Web/Core/Routable/Views/Item/Display.cshtml rename src/Orchard.Web/Core/XmlRpc/Views/Home/{Index.aspx => Index.cshtml} (66%) diff --git a/src/Orchard.Web/Core/Orchard.Core.csproj b/src/Orchard.Web/Core/Orchard.Core.csproj index 527ac3e44..4a515db80 100644 --- a/src/Orchard.Web/Core/Orchard.Core.csproj +++ b/src/Orchard.Web/Core/Orchard.Core.csproj @@ -315,8 +315,8 @@ - - + + @@ -344,7 +344,7 @@ - + diff --git a/src/Orchard.Web/Core/Routable/Controllers/ItemController.cs b/src/Orchard.Web/Core/Routable/Controllers/ItemController.cs index 417aeb478..e182b3a2d 100644 --- a/src/Orchard.Web/Core/Routable/Controllers/ItemController.cs +++ b/src/Orchard.Web/Core/Routable/Controllers/ItemController.cs @@ -42,7 +42,7 @@ namespace Orchard.Core.Routable.Controllers { } var model = _contentManager.BuildDisplayModel(hits.Single(), "Detail"); - return View(Shape.Model(model)); + return View(model); } public ActionResult Slugify(string contentType, int? id, int? containerId) { diff --git a/src/Orchard.Web/Core/Routable/Views/EditorTemplates/Parts/Routable.RoutePart.ascx b/src/Orchard.Web/Core/Routable/Views/EditorTemplates/Parts/Routable.RoutePart.ascx deleted file mode 100644 index 6489fd13f..000000000 --- a/src/Orchard.Web/Core/Routable/Views/EditorTemplates/Parts/Routable.RoutePart.ascx +++ /dev/null @@ -1,32 +0,0 @@ -<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %> -<%@ Import Namespace="Orchard.Utility.Extensions"%> - -<% Html.RegisterFootScript("jquery.slugify.js"); %> -
- <%: Html.LabelFor(m => m.Title) %> - <%: Html.TextBoxFor(m => m.Title, new { @class = "large text" }) %> -
- -<% using (this.Capture("end-of-page-scripts")) { %> - -<% } %> \ No newline at end of file diff --git a/src/Orchard.Web/Core/Routable/Views/EditorTemplates/Parts/Routable.RoutePart.cshtml b/src/Orchard.Web/Core/Routable/Views/EditorTemplates/Parts/Routable.RoutePart.cshtml new file mode 100644 index 000000000..1ac5a53cb --- /dev/null +++ b/src/Orchard.Web/Core/Routable/Views/EditorTemplates/Parts/Routable.RoutePart.cshtml @@ -0,0 +1,32 @@ +@model Orchard.Core.Routable.ViewModels.RoutableEditorViewModel +@using Orchard.Utility.Extensions + +@Html.RegisterFootScript("jquery.slugify.js"); +
+ @Html.LabelFor(m => m.Title) + @Html.TextBoxFor(m => m.Title, new { @class = "large text" }) +
+ +@using (this.Capture("end-of-page-scripts")) { + +} \ No newline at end of file diff --git a/src/Orchard.Web/Core/Routable/Views/Item/Display.ascx b/src/Orchard.Web/Core/Routable/Views/Item/Display.ascx deleted file mode 100644 index 130543d3f..000000000 --- a/src/Orchard.Web/Core/Routable/Views/Item/Display.ascx +++ /dev/null @@ -1,3 +0,0 @@ -<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %> -<% Html.AddTitleParts(Model.Routable.Item.Title); %> -<%: Html.DisplayForItem(m=>m.Routable) %> diff --git a/src/Orchard.Web/Core/Routable/Views/Item/Display.cshtml b/src/Orchard.Web/Core/Routable/Views/Item/Display.cshtml new file mode 100644 index 000000000..6bc417102 --- /dev/null +++ b/src/Orchard.Web/Core/Routable/Views/Item/Display.cshtml @@ -0,0 +1,3 @@ +@model Orchard.Core.Routable.ViewModels.RoutableDisplayViewModel +@Html.AddTitleParts(Model.Routable.Item.Title); +@Display(Model.Routable) diff --git a/src/Orchard.Web/Core/XmlRpc/Views/Home/Index.aspx b/src/Orchard.Web/Core/XmlRpc/Views/Home/Index.cshtml similarity index 66% rename from src/Orchard.Web/Core/XmlRpc/Views/Home/Index.aspx rename to src/Orchard.Web/Core/XmlRpc/Views/Home/Index.cshtml index 56e93b956..07031ed09 100644 --- a/src/Orchard.Web/Core/XmlRpc/Views/Home/Index.aspx +++ b/src/Orchard.Web/Core/XmlRpc/Views/Home/Index.cshtml @@ -1,4 +1,4 @@ -<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %> +@model dynamic Use this url for LiveWriter