diff --git a/src/Orchard.Tests/Mvc/Html/HtmlHelperExtensionsTests.cs b/src/Orchard.Tests/Mvc/Html/HtmlHelperExtensionsTests.cs new file mode 100644 index 000000000..a2e757f5e --- /dev/null +++ b/src/Orchard.Tests/Mvc/Html/HtmlHelperExtensionsTests.cs @@ -0,0 +1,165 @@ +using System.Web; +using System.Web.Mvc; +using Moq; +using NUnit.Framework; +using Orchard.Mvc.Html; +using System.Collections.Generic; + +namespace Orchard.Tests.Mvc.Html { + [TestFixture] + public class HtmlHelperExtensionsTests { + [Test] + public void LinkReturnsIHtmlString() { + //arrange + var viewContext = new ViewContext(); + var viewDataContainer = new Mock(); + var html = new HtmlHelper(viewContext, viewDataContainer.Object); + + //act + var result = html.Link("test", "http://example.com") as IHtmlString; + + //assert + Assert.IsNotNull(result); + } + + [Test] + public void LinkHtmlEncodesLinkText() { + //arrange + var viewContext = new ViewContext(); + var viewDataContainer = new Mock(); + var html = new HtmlHelper(viewContext, viewDataContainer.Object); + + //act + var result = html.Link("
", "http://example.com"); + + //assert + Assert.AreEqual(@"<br />", result.ToString()); + } + + [Test] + public void LinkHtmlAttributeEncodesHref() { + //arrange + var viewContext = new ViewContext(); + var viewDataContainer = new Mock(); + var html = new HtmlHelper(viewContext, viewDataContainer.Object); + + //act + var result = html.Link("test", "
"); + + //assert + Assert.AreEqual(@""">test", result.ToString()); + } + + [Test] + public void LinkHtmlAttributeEncodesAttributes() { + //arrange + var viewContext = new ViewContext(); + var viewDataContainer = new Mock(); + var html = new HtmlHelper(viewContext, viewDataContainer.Object); + + //act + var result = html.Link("linkText", "http://example.com", new { title = "
" }); + + //assert + Assert.AreEqual(@""">linkText", result.ToString()); + } + + [Test] + public void LinkOrDefaultReturnsIHtmlString() { + //arrange + var viewContext = new ViewContext(); + var viewDataContainer = new Mock(); + var html = new HtmlHelper(viewContext, viewDataContainer.Object); + + //act + var result = html.LinkOrDefault("test", "http://example.com") as IHtmlString; + + //assert + Assert.IsNotNull(result); + } + + [Test] + public void LinkOrDefaultHtmlEncodesLinkText() { + //arrange + var viewContext = new ViewContext(); + var viewDataContainer = new Mock(); + var html = new HtmlHelper(viewContext, viewDataContainer.Object); + + //act + var result = html.LinkOrDefault("
", "http://example.com"); + + //assert + Assert.AreEqual(@"<br />", result.ToString()); + } + + [Test] + public void LinkOrDefaultWithoutHrefHtmlEncodesLinkText() { + //arrange + var viewContext = new ViewContext(); + var viewDataContainer = new Mock(); + var html = new HtmlHelper(viewContext, viewDataContainer.Object); + + //act + var result = html.LinkOrDefault("
", null); + + //assert + Assert.AreEqual(@"<br />", result.ToString()); + } + + [Test] + public void LinkOrDefaultWithHrefHtmlAttributeEncodesHref() { + //arrange + var viewContext = new ViewContext(); + var viewDataContainer = new Mock(); + var html = new HtmlHelper(viewContext, viewDataContainer.Object); + + //act + var result = html.LinkOrDefault("test", "
"); + + //assert + Assert.AreEqual(@""">test", result.ToString()); + } + + [Test] + public void SelectOptionHtmlEncodesText() { + //arrange + var viewContext = new ViewContext(); + var viewDataContainer = new Mock(); + var html = new HtmlHelper(viewContext, viewDataContainer.Object); + + //act + var result = html.SelectOption("value", false, "
"); + + //assert + Assert.AreEqual(@"", result.ToString()); + } + + [Test] + public void UnorderedListWithNullItemsReturnsEmptyHtmlString() { + //arrange + var viewContext = new ViewContext(); + var viewDataContainer = new Mock(); + var html = new HtmlHelper(viewContext, viewDataContainer.Object); + + //act + var result = html.UnorderedList((IEnumerable)null, (a, b) => "", "test"); + + //assert + Assert.AreEqual(string.Empty, result.ToString()); + } + + [Test] + public void UnorderedListWithEmptyItemsReturnsEmptyHtmlString() { + //arrange + var viewContext = new ViewContext(); + var viewDataContainer = new Mock(); + var html = new HtmlHelper(viewContext, viewDataContainer.Object); + + //act + var result = html.UnorderedList(new string[]{}, (a, b) => "", "test"); + + //assert + Assert.AreEqual(string.Empty, result.ToString()); + } + } +} diff --git a/src/Orchard.Tests/Orchard.Framework.Tests.csproj b/src/Orchard.Tests/Orchard.Framework.Tests.csproj index c6ad9d430..3fa3f8467 100644 --- a/src/Orchard.Tests/Orchard.Framework.Tests.csproj +++ b/src/Orchard.Tests/Orchard.Framework.Tests.csproj @@ -199,6 +199,7 @@ + diff --git a/src/Orchard.Web/Core/Common/Views/DisplayTemplates/Parts/Common.Body.Manage.ascx b/src/Orchard.Web/Core/Common/Views/DisplayTemplates/Parts/Common.Body.Manage.ascx index ab0c47ace..71cf574c5 100644 --- a/src/Orchard.Web/Core/Common/Views/DisplayTemplates/Parts/Common.Body.Manage.ascx +++ b/src/Orchard.Web/Core/Common/Views/DisplayTemplates/Parts/Common.Body.Manage.ascx @@ -1,5 +1,5 @@ <%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %> <%@ Import Namespace="Orchard.Core.Common.ViewModels"%>
- <%=Html.ItemEditLinkWithReturnUrl(_Encoded("Edit").ToString(), Model.BodyAspect.ContentItem) %> + <%: Html.ItemEditLinkWithReturnUrl(T("Edit").ToString(), Model.BodyAspect.ContentItem) %>
\ No newline at end of file diff --git a/src/Orchard.Web/Core/Common/Views/DisplayTemplates/Parts/Common.Body.Summary.ascx b/src/Orchard.Web/Core/Common/Views/DisplayTemplates/Parts/Common.Body.Summary.ascx index 681573b99..a1b1280ae 100644 --- a/src/Orchard.Web/Core/Common/Views/DisplayTemplates/Parts/Common.Body.Summary.ascx +++ b/src/Orchard.Web/Core/Common/Views/DisplayTemplates/Parts/Common.Body.Summary.ascx @@ -3,7 +3,7 @@ <%--//doing excerpt generation on the way out for now so we don't stick ourselves with needing to regen excerpts for existing data //also, doing this here, inline, until we have a pluggable processing model (both in and out) //also, ...this is ugly--%> -<%=string.Format( +<%: new HtmlString(string.Format( "

{0} {1}

", - Html.Excerpt(Model.Text, 200).ToString().Replace("\r\n", "

\r\n

"), - Html.ItemDisplayLink(T("[more]").ToString(), Model.BodyAspect.ContentItem)) %> \ No newline at end of file + Html.Excerpt(Model.Text, 200).ToString().Replace(Environment.NewLine, "

" + Environment.NewLine + "

"), + Html.ItemDisplayLink(T("[more]").ToString(), Model.BodyAspect.ContentItem))) %> \ No newline at end of file diff --git a/src/Orchard.Web/Core/Common/Views/EditorTemplates/Parts/Common.Body.ascx b/src/Orchard.Web/Core/Common/Views/EditorTemplates/Parts/Common.Body.ascx index 1dfd97beb..86bee340c 100644 --- a/src/Orchard.Web/Core/Common/Views/EditorTemplates/Parts/Common.Body.ascx +++ b/src/Orchard.Web/Core/Common/Views/EditorTemplates/Parts/Common.Body.ascx @@ -2,6 +2,6 @@ <%@ Import Namespace="Orchard.Core.Common.ViewModels" %>

- <%=Html.Partial("EditorTemplates/" + Model.TextEditorTemplate, Model) %> + <%: Html.Partial("EditorTemplates/" + Model.TextEditorTemplate, Model) %> <%: Html.ValidationMessageFor(m => m.Text) %>
\ No newline at end of file diff --git a/src/Orchard.Web/Core/Common/Views/EditorTemplates/Parts/Common.Container.ascx b/src/Orchard.Web/Core/Common/Views/EditorTemplates/Parts/Common.Container.ascx index fbefbac2d..32f6ff1b4 100644 --- a/src/Orchard.Web/Core/Common/Views/EditorTemplates/Parts/Common.Container.ascx +++ b/src/Orchard.Web/Core/Common/Views/EditorTemplates/Parts/Common.Container.ascx @@ -1,7 +1,7 @@ <%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %> <%@ Import Namespace="Orchard.Core.Common.ViewModels" %>
- <%=Html.LabelFor(m=>m.ContainerId) %> - <%=Html.EditorFor(m=>m.ContainerId) %> - <%=Html.ValidationMessageFor(m=>m.ContainerId) %> + <%: Html.LabelFor(m=>m.ContainerId) %> + <%: Html.EditorFor(m=>m.ContainerId) %> + <%: Html.ValidationMessageFor(m=>m.ContainerId) %>
diff --git a/src/Orchard.Web/Core/Common/Views/EditorTemplates/Parts/Common.Routable.ascx b/src/Orchard.Web/Core/Common/Views/EditorTemplates/Parts/Common.Routable.ascx index e018b7dac..cda27f412 100644 --- a/src/Orchard.Web/Core/Common/Views/EditorTemplates/Parts/Common.Routable.ascx +++ b/src/Orchard.Web/Core/Common/Views/EditorTemplates/Parts/Common.Routable.ascx @@ -21,7 +21,7 @@ $("<%=String.Format("input#{0}Title", !string.IsNullOrEmpty(Model.Prefix) ? Model.Prefix + "_" : "") %>").blur(function(){ $(this).slugify({ target:$("<%=String.Format("input#{0}Slug", !string.IsNullOrEmpty(Model.Prefix) ? Model.Prefix + "_" : "") %>"), - url:"<%=Url.Slugify() %>", + url:"<%: Url.Slugify() %>", contentType:"<%=Model.RoutableAspect.ContentItem.ContentType %>", id:"<%=Model.RoutableAspect.ContentItem.Id %>"<% var commonAspect = Model.RoutableAspect.ContentItem.As(); diff --git a/src/Orchard.Web/Core/Contents/Views/EditorTemplates/Items/Contents.Item.ascx b/src/Orchard.Web/Core/Contents/Views/EditorTemplates/Items/Contents.Item.ascx index 5e0cc4986..0e431bd8e 100644 --- a/src/Orchard.Web/Core/Contents/Views/EditorTemplates/Items/Contents.Item.ascx +++ b/src/Orchard.Web/Core/Contents/Views/EditorTemplates/Items/Contents.Item.ascx @@ -8,7 +8,7 @@
<% Html.Zone("secondary");%>
- "/> + "/>
\ No newline at end of file diff --git a/src/Orchard.Web/Core/Contents/Views/Item/Display.aspx b/src/Orchard.Web/Core/Contents/Views/Item/Display.aspx index 2eb28576d..0b4fe2b12 100644 --- a/src/Orchard.Web/Core/Contents/Views/Item/Display.aspx +++ b/src/Orchard.Web/Core/Contents/Views/Item/Display.aspx @@ -1,5 +1,5 @@ <%@ Page Language="C#" Inherits="Orchard.Mvc.ViewPage" %>
- <%=Html.DisplayForItem(m=>m.Content) %> + <%: Html.DisplayForItem(m=>m.Content) %>
diff --git a/src/Orchard.Web/Core/Contents/Views/Item/Preview.aspx b/src/Orchard.Web/Core/Contents/Views/Item/Preview.aspx index 9bb5300af..31d9c2274 100644 --- a/src/Orchard.Web/Core/Contents/Views/Item/Preview.aspx +++ b/src/Orchard.Web/Core/Contents/Views/Item/Preview.aspx @@ -1,3 +1,3 @@ <%@ Page Language="C#" Inherits="Orchard.Mvc.ViewPage" %> -<%=Html.DisplayForItem(m=>m.Content) %> +<%: Html.DisplayForItem(m=>m.Content) %> diff --git a/src/Orchard.Web/Core/Navigation/Views/Admin/Index.ascx b/src/Orchard.Web/Core/Navigation/Views/Admin/Index.ascx index 9725443cd..3afc1bc8f 100644 --- a/src/Orchard.Web/Core/Navigation/Views/Admin/Index.ascx +++ b/src/Orchard.Web/Core/Navigation/Views/Admin/Index.ascx @@ -24,10 +24,10 @@ using (Html.BeginFormAntiForgeryPost()) { %> foreach (var menuPartEntry in Model.MenuItemEntries) { var i = menuPartEntryIndex; %> - - - <% if (!menuPartEntry.IsMenuItem) { %><% } else { %><% } %> - " class="remove"><%: T("Remove") %> + + + <% if (!menuPartEntry.IsMenuItem) { %><% } else { %><% } %> + " class="remove"><%: T("Remove") %> <% ++menuPartEntryIndex; } %> diff --git a/src/Orchard.Web/Core/Routable/Views/EditorTemplates/Parts/Routable.IsRoutable.ascx b/src/Orchard.Web/Core/Routable/Views/EditorTemplates/Parts/Routable.IsRoutable.ascx index 7eb8638d5..f718e1121 100644 --- a/src/Orchard.Web/Core/Routable/Views/EditorTemplates/Parts/Routable.IsRoutable.ascx +++ b/src/Orchard.Web/Core/Routable/Views/EditorTemplates/Parts/Routable.IsRoutable.ascx @@ -4,12 +4,12 @@ <% Html.RegisterFootScript("jquery.slugify.js"); %>
- <%=Html.LabelFor(m => m.Title) %> - <%=Html.TextBoxFor(m => m.Title, new { @class = "large text" }) %> + <%: Html.LabelFor(m => m.Title) %> + <%: Html.TextBoxFor(m => m.Title, new { @class = "large text" }) %>
@@ -17,14 +17,14 @@ diff --git a/src/Orchard.Web/Core/Routable/Views/Item/Display.aspx b/src/Orchard.Web/Core/Routable/Views/Item/Display.aspx index c4878ad6d..6754283e7 100644 --- a/src/Orchard.Web/Core/Routable/Views/Item/Display.aspx +++ b/src/Orchard.Web/Core/Routable/Views/Item/Display.aspx @@ -1,3 +1,3 @@ <%@ Page Language="C#" Inherits="Orchard.Mvc.ViewPage" %> <% Html.AddTitleParts(Model.Routable.Item.Title); %> -<%=Html.DisplayForItem(m=>m.Routable) %> +<%: Html.DisplayForItem(m=>m.Routable) %> diff --git a/src/Orchard.Web/Core/Settings/Views/Admin/Culture.ascx b/src/Orchard.Web/Core/Settings/Views/Admin/Culture.ascx index 2ffdd3fad..8e5362596 100644 --- a/src/Orchard.Web/Core/Settings/Views/Admin/Culture.ascx +++ b/src/Orchard.Web/Core/Settings/Views/Admin/Culture.ascx @@ -4,7 +4,7 @@

<%:Html.TitleForPage(T("Supported Cultures").ToString()) %>

<%:T("Cultures this site supports") %>

-<%=Html.UnorderedList( +<%: Html.UnorderedList( Model.SiteCultures.OrderBy(s => s), (s, i) => Html.DisplayFor(scvm => s, s == Model.CurrentCulture ? "CurrentCulture" : "RemovableCulture", "").ToString(), "site-cultures", "culture", "odd")%> diff --git a/src/Orchard.Web/Core/Settings/Views/DisplayTemplates/RemovableCulture.ascx b/src/Orchard.Web/Core/Settings/Views/DisplayTemplates/RemovableCulture.ascx index 7de8fff75..9e05d07e2 100644 --- a/src/Orchard.Web/Core/Settings/Views/DisplayTemplates/RemovableCulture.ascx +++ b/src/Orchard.Web/Core/Settings/Views/DisplayTemplates/RemovableCulture.ascx @@ -1,6 +1,6 @@ <%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %>
<%:Model %>
<% using (Html.BeginFormAntiForgeryPost(Url.Action("DeleteCulture", "Admin", new { area = "Settings" }), FormMethod.Post, new {@class = "inline link"})) { %> - <%=Html.Hidden("cultureName", Model, new { id = "" }) %> + <%: Html.Hidden("cultureName", Model, new { id = "" }) %> <% } %> \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Views/Archives.ascx b/src/Orchard.Web/Modules/Orchard.Blogs/Views/Archives.ascx index eb1be4679..603ba7a01 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Views/Archives.ascx +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Views/Archives.ascx @@ -23,13 +23,13 @@ <% } %> <% } else { %> - <%=Html.UnorderedList(Model.Archives, (t, i) => Html.Link(string.Format("{0:MMMM yyyy} ({1})", t.Key.ToDateTime(), t.Value), Url.BlogArchiveMonth(Model.Blog.Slug, t.Key.Year, t.Key.Month)), "archiveMonthList") %><% + <%: Html.UnorderedList(Model.Archives, (t, i) => Html.Link(string.Format("{0:MMMM yyyy} ({1})", t.Key.ToDateTime(), t.Value), Url.BlogArchiveMonth(Model.Blog.Slug, t.Key.Year, t.Key.Month)).ToString(), "archiveMonthList") %><% } } else { %> diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Views/Blog/Item.ascx b/src/Orchard.Web/Modules/Orchard.Blogs/Views/Blog/Item.ascx index 56566178e..07c0d4fea 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Views/Blog/Item.ascx +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Views/Blog/Item.ascx @@ -1,3 +1,3 @@ <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> <%@ Import Namespace="Orchard.Blogs.ViewModels"%> -<%=Html.DisplayForItem(m => m.Blog) %> \ No newline at end of file +<%: Html.DisplayForItem(m => m.Blog) %> diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Views/Blog/List.ascx b/src/Orchard.Web/Modules/Orchard.Blogs/Views/Blog/List.ascx index cdf3f1172..144186f1e 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Views/Blog/List.ascx +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Views/Blog/List.ascx @@ -1,7 +1,7 @@ <%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %> <%@ Import Namespace="Orchard.Blogs.ViewModels"%> <%if (Model.Blogs.Count() > 0) { %> -<%=Html.UnorderedList(Model.Blogs, (b, i) => Html.DisplayForItem(b).ToHtmlString(), "blogs contentItems") %><% +<%: Html.UnorderedList(Model.Blogs, (b, i) => Html.DisplayForItem(b).ToHtmlString(), "blogs contentItems") %><% } else { %>

<%: T("No blogs found.") %>

<% diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Views/BlogAdmin/Item.ascx b/src/Orchard.Web/Modules/Orchard.Blogs/Views/BlogAdmin/Item.ascx index 1eafe5956..d5c557676 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Views/BlogAdmin/Item.ascx +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Views/BlogAdmin/Item.ascx @@ -1,4 +1,4 @@ <%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %> <%@ Import Namespace="Orchard.Blogs.ViewModels"%> <% Html.AddTitleParts(T("Manage Blog").ToString()); %> -<%=Html.DisplayForItem(m => m.Blog) %> \ No newline at end of file +<%: Html.DisplayForItem(m => m.Blog) %> \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Views/BlogAdmin/List.ascx b/src/Orchard.Web/Modules/Orchard.Blogs/Views/BlogAdmin/List.ascx index 7540f1460..4ae6ab255 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Views/BlogAdmin/List.ascx +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Views/BlogAdmin/List.ascx @@ -4,8 +4,8 @@

<%: Html.TitleForPage(T("Manage Blogs").ToString()) %>

<%-- todo: Add helper text here when ready.

<%: T("Possible text about setting up and managing a blog goes here.") %>

--%><% if (Model.Entries.Count() > 0) { %> - -<%=Html.UnorderedList(Model.Entries, (entry, i) => { + +<%: Html.UnorderedList(Model.Entries, (entry, i) => { // Add blog post count rendering into "meta" zone entry.ContentItemViewModel.Zones.AddAction("meta", html => { int draftCount = entry.TotalPostCount - entry.ContentItemViewModel.Item.PostCount; diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Views/BlogPost/Item.ascx b/src/Orchard.Web/Modules/Orchard.Blogs/Views/BlogPost/Item.ascx index a82ec30e9..f98896342 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Views/BlogPost/Item.ascx +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Views/BlogPost/Item.ascx @@ -1,4 +1,4 @@ <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> <%@ Import Namespace="Orchard.Blogs.ViewModels"%> <% Html.AddTitleParts(Model.Blog.Name); %> -<%=Html.DisplayForItem(m => m.BlogPost) %> \ No newline at end of file +<%: Html.DisplayForItem(m => m.BlogPost) %> diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Views/BlogPost/ListByArchive.ascx b/src/Orchard.Web/Modules/Orchard.Blogs/Views/BlogPost/ListByArchive.ascx index 2b3320577..5f42b0f35 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Views/BlogPost/ListByArchive.ascx +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Views/BlogPost/ListByArchive.ascx @@ -4,11 +4,11 @@

<%: Html.TitleForPage(T("Archives").ToString(), Model.ArchiveData.Year.ToString(), Model.ArchiveData.Month > 0 ? new DateTime(Model.ArchiveData.Year, Model.ArchiveData.Month, 1).ToString("MMMM") : null, Model.ArchiveData.Day > 0 ? Model.ArchiveData.Day.ToString() : null)%>

-<%=T("Archives").ToString() -%> / <%=Html.Link(Model.ArchiveData.Year.ToString(), Url.BlogArchiveYear(Model.Blog.Slug, Model.ArchiveData.Year)) +<%: T("Archives").ToString() +%> / <%: Html.Link(Model.ArchiveData.Year.ToString(), Url.BlogArchiveYear(Model.Blog.Slug, Model.ArchiveData.Year)) %><%=Model.ArchiveData.Month > 0 ? string.Format(" / {0}", Html.Link(Model.ArchiveData.ToDateTime().ToString("MMMM"), Url.BlogArchiveMonth(Model.Blog.Slug, Model.ArchiveData.Year, Model.ArchiveData.Month))) : "" %><%=Model.ArchiveData.Day > 0 ? string.Format(" / {0}", Html.Link(Model.ArchiveData.Day.ToString(), Url.BlogArchiveDay(Model.Blog.Slug, Model.ArchiveData.Year, Model.ArchiveData.Month, Model.ArchiveData.Day))) : "" %>
-<%=Html.UnorderedList(Model.BlogPosts, (c, i) => Html.DisplayForItem(c).ToHtmlString(), "blogPosts contentItems")%> \ No newline at end of file +<%: Html.UnorderedList(Model.BlogPosts, (c, i) => Html.DisplayForItem(c).ToHtmlString(), "blogPosts contentItems")%> diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Items/Blogs.Blog.DetailAdmin.ascx b/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Items/Blogs.Blog.DetailAdmin.ascx index eb5b72504..7eeb466f6 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Items/Blogs.Blog.DetailAdmin.ascx +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Items/Blogs.Blog.DetailAdmin.ascx @@ -2,7 +2,7 @@ <%@ Import Namespace="Orchard.Mvc.ViewModels"%> <%@ Import Namespace="Orchard.Blogs.Extensions"%> <%@ Import Namespace="Orchard.Blogs.Models"%> -

<%: Html.TitleForPage(Model.Item.Name) %> +

<%: Html.TitleForPage(Model.Item.Name) %>

<% Html.Zone("manage"); %><%-- @@ -18,6 +18,6 @@ --%> - + <% Html.Zone("primary"); Html.ZonesAny(); %> \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Items/Blogs.Blog.Summary.ascx b/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Items/Blogs.Blog.Summary.ascx index 0e1e9c710..852f50cae 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Items/Blogs.Blog.Summary.ascx +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Items/Blogs.Blog.Summary.ascx @@ -2,6 +2,6 @@ <%@ Import Namespace="Orchard.Mvc.ViewModels"%> <%@ Import Namespace="Orchard.Blogs.Extensions"%> <%@ Import Namespace="Orchard.Blogs.Models"%> -

<%=Html.Link(Html.Encode(Model.Item.Name), Url.Blog(Model.Item.Slug)) %>

+

<%: Html.Link(Model.Item.Name, Url.Blog(Model.Item.Slug)) %>

<% if (!string.IsNullOrEmpty(Model.Item.Description)) { %>

<%: Model.Item.Description %>

<% } %> diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Items/Blogs.Blog.SummaryAdmin.ascx b/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Items/Blogs.Blog.SummaryAdmin.ascx index 0ea733a2a..0644783cf 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Items/Blogs.Blog.SummaryAdmin.ascx +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Items/Blogs.Blog.SummaryAdmin.ascx @@ -4,17 +4,17 @@ <%@ Import Namespace="Orchard.Blogs.Models"%>
-

<%=Html.Link(Html.Encode(Model.Item.Name), Url.BlogForAdmin(Model.Item.Slug)) %>

+

<%: Html.Link(Model.Item.Name, Url.BlogForAdmin(Model.Item.Slug)) %>

<% Html.Zone("meta");%>

<%--

[list of authors] [modify blog access]

--%>

<%: Model.Item.Description %>

diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Items/Blogs.BlogPost.Summary.ascx b/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Items/Blogs.BlogPost.Summary.ascx index ab3177a20..7b2b4fd46 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Items/Blogs.BlogPost.Summary.ascx +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Items/Blogs.BlogPost.Summary.ascx @@ -2,6 +2,6 @@ <%@ Import Namespace="Orchard.Mvc.ViewModels"%> <%@ Import Namespace="Orchard.Blogs.Extensions"%> <%@ Import Namespace="Orchard.Blogs.Models"%> -

<%=Html.Link(Html.Encode(Model.Item.Title), Url.BlogPost(Model.Item)) %>

-
<%=Html.PublishedState(Model.Item, T) %> | <%Html.Zone("meta");%>
+

<%: Html.Link(Model.Item.Title, Url.BlogPost(Model.Item)) %>

+
<%: Html.PublishedState(Model.Item, T) %> | <%Html.Zone("meta");%>
<% Html.Zone("primary", ":manage :metadata");%>
diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Items/Blogs.BlogPost.SummaryAdmin.ascx b/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Items/Blogs.BlogPost.SummaryAdmin.ascx index 2ca459c3e..8646de578 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Items/Blogs.BlogPost.SummaryAdmin.ascx +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Items/Blogs.BlogPost.SummaryAdmin.ascx @@ -6,7 +6,7 @@ <%@ Import Namespace="Orchard.Blogs.Models"%>
-

<%=Html.Link(Html.Encode(Model.Item.Title), Url.BlogPostEdit(Model.Item))%>

+

<%: Html.Link(Model.Item.Title, Url.BlogPostEdit(Model.Item))%>

  • <% if (Model.Item.HasPublished) { %> @@ -18,7 +18,7 @@
  • <% if (Model.Item.HasDraft) { %> - " alt="<%: T("Draft") %>" title="<%: T("The post has a draft") %>" /><%=Html.PublishedState(Model.Item, T) %><% + " alt="<%: T("Draft") %>" title="<%: T("The post has a draft") %>" /><%: Html.PublishedState(Model.Item, T) %><% } else { %> <%: T("No draft")%><% @@ -27,7 +27,7 @@
  • <% if (Model.Item.ScheduledPublishUtc.HasValue && Model.Item.ScheduledPublishUtc.Value > DateTime.UtcNow) { %> " alt="<%: T("Scheduled") %>" title="<%: T("The post is scheduled for publishing") %>" /><%: T("Scheduled")%> - <%=Html.DateTime(Model.Item.ScheduledPublishUtc.Value, T("M/d/yyyy h:mm tt"))%><% + <%: Html.DateTime(Model.Item.ScheduledPublishUtc.Value, T("M/d/yyyy h:mm tt"))%><% } else if (Model.Item.IsPublished) { %> <%: T("Published: {0}", Html.DateTimeRelative(Model.Item.As().VersionPublishedUtc.Value, T)) %><% @@ -41,17 +41,17 @@
diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Parts/Blogs.Blog.Manage.ascx b/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Parts/Blogs.Blog.Manage.ascx index d2e16c4b2..8ef7e1e26 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Parts/Blogs.Blog.Manage.ascx +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Parts/Blogs.Blog.Manage.ascx @@ -5,6 +5,6 @@ Html.RegisterStyle("admin.css"); if (AuthorizedFor(Permissions.ManageBlogs)) { %> <% } %> \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Parts/Blogs.BlogPost.List.ascx b/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Parts/Blogs.BlogPost.List.ascx index cf95ecd8e..ce21cbb85 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Parts/Blogs.BlogPost.List.ascx +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Views/DisplayTemplates/Parts/Blogs.BlogPost.List.ascx @@ -1,5 +1,5 @@ <%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl>>" %> <%@ Import Namespace="Orchard.Mvc.ViewModels"%> <%@ Import Namespace="Orchard.Blogs.Models"%> -<%=Html.UnorderedList(Model, (bp, i) => Html.DisplayForItem(bp).ToHtmlString(), "blogPosts contentItems") %> +<%: Html.UnorderedList(Model, (bp, i) => Html.DisplayForItem(bp).ToHtmlString(), "blogPosts contentItems") %> <% if (Model.Count() < 1) { %>
<%: T("There are no posts for this blog.") %>
<% } %> diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Views/EditorTemplates/Items/Blogs.BlogPost.ascx b/src/Orchard.Web/Modules/Orchard.Blogs/Views/EditorTemplates/Items/Blogs.BlogPost.ascx index 1efb3c4df..c28f7ed3a 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Views/EditorTemplates/Items/Blogs.BlogPost.ascx +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Views/EditorTemplates/Items/Blogs.BlogPost.ascx @@ -13,7 +13,7 @@ "/><% //TODO: (erikpo) In the future, remove the HasPublished check so the user can delete the content item from here if the choose to if (Model.Item.HasDraft && Model.Item.HasPublished) { %> - <%=Html.AntiForgeryTokenValueOrchardLink(T("Discard Draft").ToString(), Url.Action("DiscardDraft", new {Area = "Orchard.Blogs", Controller = "BlogPostAdmin", id = Model.Item.Id}), new {@class = "button"})%><% + <%: Html.AntiForgeryTokenValueOrchardLink(T("Discard Draft").ToString(), Url.Action("DiscardDraft", new {Area = "Orchard.Blogs", Controller = "BlogPostAdmin", id = Model.Item.Id}), new {@class = "button"})%><% } %>
diff --git a/src/Orchard.Web/Modules/Orchard.Comments/Views/Admin/Details.aspx b/src/Orchard.Web/Modules/Orchard.Comments/Views/Admin/Details.aspx index c0d8ffceb..221c00862 100644 --- a/src/Orchard.Web/Modules/Orchard.Comments/Views/Admin/Details.aspx +++ b/src/Orchard.Web/Modules/Orchard.Comments/Views/Admin/Details.aspx @@ -21,22 +21,22 @@ <%: Html.ValidationSummary() %>
- + <%: Html.SelectOption(Model.Options.BulkAction, CommentDetailsBulkAction.None, T("Choose action...").ToString())%> + <%: Html.SelectOption(Model.Options.BulkAction, CommentDetailsBulkAction.Approve, T("Approve").ToString())%> + <%: Html.SelectOption(Model.Options.BulkAction, CommentDetailsBulkAction.Pend, T("Pend").ToString())%> + <%: Html.SelectOption(Model.Options.BulkAction, CommentDetailsBulkAction.MarkAsSpam, T("Mark as Spam").ToString())%> + <%: Html.SelectOption(Model.Options.BulkAction, CommentDetailsBulkAction.Delete, T("Remove").ToString())%> " />
- + <%: Html.SelectOption(Model.Options.Filter, CommentDetailsFilter.All, T("All Comments").ToString())%> + <%: Html.SelectOption(Model.Options.Filter, CommentDetailsFilter.Approved, T("Approved Comments").ToString())%> + <%: Html.SelectOption(Model.Options.Filter, CommentDetailsFilter.Pending, T("Pending Comments").ToString())%> + <%: Html.SelectOption(Model.Options.Filter, CommentDetailsFilter.Spam, T("Spam").ToString())%> "/>
@@ -67,8 +67,8 @@ %> - - + + @@ -83,11 +83,11 @@ <%: commentEntry.Comment.CommentText.Length > 23 ? commentEntry.Comment.CommentText.Substring(0, 24) : commentEntry.Comment.CommentText %><%: T(" ...") %> <% } %> - <%=Html.DateTime(commentEntry.Comment.CommentDateUtc.GetValueOrDefault()) %> + <%: Html.DateTime(commentEntry.Comment.CommentDateUtc.GetValueOrDefault()) %>
  • - " class="ibutton edit" title="<%: T("Edit Comment")%>"><%: T("Edit Comment")%> + " class="ibutton edit" title="<%: T("Edit Comment")%>"><%: T("Edit Comment")%>
  • <%-- a form in a form doesn't quite work <% using (Html.BeginFormAntiForgeryPost(Url.Action("Delete", new {id = commentEntry.Comment.Id, redirectToAction = "Details"}), FormMethod.Post, new { @class = "inline" })) { %> diff --git a/src/Orchard.Web/Modules/Orchard.Comments/Views/Admin/Index.aspx b/src/Orchard.Web/Modules/Orchard.Comments/Views/Admin/Index.aspx index f31b07e27..f957a2e38 100644 --- a/src/Orchard.Web/Modules/Orchard.Comments/Views/Admin/Index.aspx +++ b/src/Orchard.Web/Modules/Orchard.Comments/Views/Admin/Index.aspx @@ -6,22 +6,22 @@ <%: Html.ValidationSummary() %>
    - + <%: Html.SelectOption(Model.Options.BulkAction, CommentIndexBulkAction.None, T("Choose action...").ToString()) %> + <%: Html.SelectOption(Model.Options.BulkAction, CommentIndexBulkAction.Approve, T("Approve").ToString()) %> + <%: Html.SelectOption(Model.Options.BulkAction, CommentIndexBulkAction.Pend, T("Pend").ToString())%> + <%: Html.SelectOption(Model.Options.BulkAction, CommentIndexBulkAction.MarkAsSpam, T("Mark as Spam").ToString())%> + <%: Html.SelectOption(Model.Options.BulkAction, CommentIndexBulkAction.Delete, T("Remove").ToString())%> " />
    - + <%: Html.SelectOption(Model.Options.Filter, CommentIndexFilter.All, T("All Comments").ToString())%> + <%: Html.SelectOption(Model.Options.Filter, CommentIndexFilter.Approved, T("Approved Comments").ToString())%> + <%: Html.SelectOption(Model.Options.Filter, CommentIndexFilter.Pending, T("Pending Comments").ToString())%> + <%: Html.SelectOption(Model.Options.Filter, CommentIndexFilter.Spam, T("Spam").ToString())%> "/>
    @@ -54,8 +54,8 @@ %> - - + + <% if (commentEntry.Comment.Status == CommentStatus.Spam) { %><%: T("Spam") %><% } else if (commentEntry.Comment.Status == CommentStatus.Pending) { %><%: T("Pending") %><% } @@ -67,12 +67,12 @@ <%: commentEntry.Comment.CommentText.Length > 23 ? commentEntry.Comment.CommentText.Substring(0, 24) : commentEntry.Comment.CommentText %><%: T(" ...") %> <% } %> - <%=Html.DateTime(commentEntry.Comment.CommentDateUtc.GetValueOrDefault()) %> + <%: Html.DateTime(commentEntry.Comment.CommentDateUtc.GetValueOrDefault()) %> <%: Html.ActionLink(commentEntry.CommentedOn, "Details", new { id = commentEntry.Comment.CommentedOn }) %>
    • - " title="<%: T("Edit")%>"><%: T("Edit")%> + " title="<%: T("Edit")%>"><%: T("Edit")%>
    • <%-- a form in a form doesn't quite work <% using (Html.BeginFormAntiForgeryPost(Url.Action("Delete", new {id = commentEntry.Comment.Id, redirectToAction = "Details"}), FormMethod.Post, new { @class = "inline" })) { %> diff --git a/src/Orchard.Web/Modules/Orchard.Comments/Views/DisplayTemplates/Parts/Comments.CountAdmin.ascx b/src/Orchard.Web/Modules/Orchard.Comments/Views/DisplayTemplates/Parts/Comments.CountAdmin.ascx index 5ef625dcb..9460a4782 100644 --- a/src/Orchard.Web/Modules/Orchard.Comments/Views/DisplayTemplates/Parts/Comments.CountAdmin.ascx +++ b/src/Orchard.Web/Modules/Orchard.Comments/Views/DisplayTemplates/Parts/Comments.CountAdmin.ascx @@ -1,4 +1,4 @@ <%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %> <%@ Import Namespace="Orchard.Comments.Extensions"%> <%@ Import Namespace="Orchard.Comments.ViewModels"%> -<%=Html.CommentSummaryLinks(T, Model.Item, Model.CommentCount, Model.PendingCount)%> +<%: Html.CommentSummaryLinks(T, Model.Item, Model.CommentCount, Model.PendingCount)%> diff --git a/src/Orchard.Web/Modules/Orchard.Comments/Views/DisplayTemplates/Parts/Comments.HasComments.ascx b/src/Orchard.Web/Modules/Orchard.Comments/Views/DisplayTemplates/Parts/Comments.HasComments.ascx index f991fc8f5..8a50ccd48 100644 --- a/src/Orchard.Web/Modules/Orchard.Comments/Views/DisplayTemplates/Parts/Comments.HasComments.ascx +++ b/src/Orchard.Web/Modules/Orchard.Comments/Views/DisplayTemplates/Parts/Comments.HasComments.ascx @@ -16,7 +16,7 @@ if (Model.CommentsActive == false) { } else if(!Request.IsAuthenticated && !AuthorizedFor(Permissions.AddComment)) { %>

      <%: T("Add a Comment") %>

      -

      <%=T("You must {0} to comment.", Html.ActionLink(T("log on").ToString(), "LogOn", new { Controller = "Account", Area = "Orchard.Users", ReturnUrl = string.Format("{0}#addacomment", Context.Request.RawUrl) }))%>

      <% +

      <%: T("You must {0} to comment.", Html.ActionLink(T("log on").ToString(), "LogOn", new { Controller = "Account", Area = "Orchard.Users", ReturnUrl = string.Format("{0}#addacomment", Context.Request.RawUrl) }))%>

      <% } else { %> <% using (Html.BeginForm("Create", "Comment", new { area = "Orchard.Comments" }, FormMethod.Post, new { @class = "comment" })) { %> @@ -46,7 +46,7 @@ else { %> }%>
      - +
      diff --git a/src/Orchard.Web/Modules/Orchard.Comments/Views/EditorTemplates/Parts/Comments.HasComments.ascx b/src/Orchard.Web/Modules/Orchard.Comments/Views/EditorTemplates/Parts/Comments.HasComments.ascx index 366aece1a..3480a651f 100644 --- a/src/Orchard.Web/Modules/Orchard.Comments/Views/EditorTemplates/Parts/Comments.HasComments.ascx +++ b/src/Orchard.Web/Modules/Orchard.Comments/Views/EditorTemplates/Parts/Comments.HasComments.ascx @@ -4,14 +4,14 @@ <%@ Import Namespace="Orchard.Comments.Models" %>
      <%-- todo: (heskew) pull the legend and put the link to the comments elsewhere? --%> - <%: T("Comments")%><% if (Model.Comments.Count > 0) { %> – <%=Html.CommentSummaryLinks(T, Model.ContentItem, Model.Comments.Count, Model.PendingComments.Count)%><% } %> + <%: T("Comments")%><% if (Model.Comments.Count > 0) { %> – <%: Html.CommentSummaryLinks(T, Model.ContentItem, Model.Comments.Count, Model.PendingComments.Count)%><% } %> <%-- todo: (heskew) can get into a weird state if this is disabled but comments are active so, yeah, comment settings on a content item need to be hashed out <%: Html.EditorFor(m => m.CommentsShown) %> - + --%> <%: Html.EditorFor(m => m.CommentsActive) %> - <%=T("Enable to show the comment form. Disabling still allows the existing comments to be shown but does not allow the conversation to continue.")%> + <%: T("Allow new comments") %> + <%: T("Enable to show the comment form. Disabling still allows the existing comments to be shown but does not allow the conversation to continue.")%>
      \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Comments/Views/ListOfComments.ascx b/src/Orchard.Web/Modules/Orchard.Comments/Views/ListOfComments.ascx index 789fc37d7..807ca2925 100644 --- a/src/Orchard.Web/Modules/Orchard.Comments/Views/ListOfComments.ascx +++ b/src/Orchard.Web/Modules/Orchard.Comments/Views/ListOfComments.ascx @@ -4,9 +4,9 @@ foreach (var comment in Model) { %>
    • - <%=Html.LinkOrDefault(Html.Encode(comment.Record.UserName), Html.Encode(comment.Record.SiteName), new { rel = "nofollow" })%> + <%: Html.LinkOrDefault(comment.Record.UserName, comment.Record.SiteName, new { rel = "nofollow" })%> <%-- todo: (heskew) need comment permalink --%> - said <%=Html.Link(Html.DateTimeRelative(comment.Record.CommentDateUtc.GetValueOrDefault(), T).Text, "#")%> + said <%: Html.Link(Html.DateTimeRelative(comment.Record.CommentDateUtc.GetValueOrDefault(), T).ToString(), "#")%>
      <%-- todo: (heskew) comment text needs processing depending on comment markup style --%> diff --git a/src/Orchard.Web/Modules/Orchard.DevTools/Views/Content/Details.aspx b/src/Orchard.Web/Modules/Orchard.DevTools/Views/Content/Details.aspx index 9d2e87d1d..1a0afea24 100644 --- a/src/Orchard.Web/Modules/Orchard.DevTools/Views/Content/Details.aspx +++ b/src/Orchard.Web/Modules/Orchard.DevTools/Views/Content/Details.aspx @@ -12,9 +12,9 @@ <%: T("ContentType:")%> <%=Model.Item.ContentItem.ContentType %>
      <%: T("DisplayText:")%> - <%=Html.ItemDisplayText(Model.Item) %>
      + <%: Html.ItemDisplayText(Model.Item) %>
      <%: T("Links:")%> - <%=Html.ItemDisplayLink(T("view").ToString(), Model.Item) %> <%=Html.ItemEditLink(T("edit").ToString(), Model.Item) %> + <%: Html.ItemDisplayLink(T("view").ToString(), Model.Item) %> <%: Html.ItemEditLink(T("edit").ToString(), Model.Item) %>

      <%: T("Content Item Parts")%>

        @@ -79,7 +79,7 @@ Zone:<%: display.ZoneName ?? "(null)" %> Position:<%: display.Position ?? "(null)" %>
        - <%=Html.DisplayFor(x => display.Model, display.TemplateName, display.Prefix)%> + <%: Html.DisplayFor(x => display.Model, display.TemplateName, display.Prefix)%>
        <% diff --git a/src/Orchard.Web/Modules/Orchard.DevTools/Views/Content/Index.aspx b/src/Orchard.Web/Modules/Orchard.DevTools/Views/Content/Index.aspx index 7fce3220f..bf06d24a7 100644 --- a/src/Orchard.Web/Modules/Orchard.DevTools/Views/Content/Index.aspx +++ b/src/Orchard.Web/Modules/Orchard.DevTools/Views/Content/Index.aspx @@ -12,8 +12,8 @@ <%foreach(var item in Model.Items.OrderBy(x=>x.Id)){%>
      • <%: Html.ActionLink(T("{0}: {1}", item.Id, item.ContentType).ToString(), "details", "content", new{item.Id},new{}) %> - <%=Html.ItemDisplayLink(T("view").ToString(), item) %> - <%=Html.ItemEditLink(T("edit").ToString(), item) %> + <%: Html.ItemDisplayLink(T("view").ToString(), item) %> + <%: Html.ItemEditLink(T("edit").ToString(), item) %>
      • <%}%>
      \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.DevTools/Views/Metadata/Index.aspx b/src/Orchard.Web/Modules/Orchard.DevTools/Views/Metadata/Index.aspx index 7c119bf89..b4859c8f3 100644 --- a/src/Orchard.Web/Modules/Orchard.DevTools/Views/Metadata/Index.aspx +++ b/src/Orchard.Web/Modules/Orchard.DevTools/Views/Metadata/Index.aspx @@ -40,5 +40,5 @@ Exported as xml <% using (Html.BeginFormAntiForgeryPost()) { %> <%:Html.TextAreaFor(m=>m.ExportText, new{style="width:100%;height:640px;"}) %>
      -" /> +" /> <%} %> diff --git a/src/Orchard.Web/Modules/Orchard.Media/Views/Admin/Add.aspx b/src/Orchard.Web/Modules/Orchard.Media/Views/Admin/Add.aspx index 483046d6e..5acd5bee4 100644 --- a/src/Orchard.Web/Modules/Orchard.Media/Views/Admin/Add.aspx +++ b/src/Orchard.Web/Modules/Orchard.Media/Views/Admin/Add.aspx @@ -18,7 +18,7 @@ <% using (Html.BeginForm("Add", "Admin", FormMethod.Post, new { enctype = "multipart/form-data" })) { %> <%: Html.ValidationSummary() %>
      - + " size="64"/> <%: T("After your files have been uploaded, you can edit the titles and descriptions.")%> diff --git a/src/Orchard.Web/Modules/Orchard.Media/Views/Admin/EditMedia.aspx b/src/Orchard.Web/Modules/Orchard.Media/Views/Admin/EditMedia.aspx index ac6692b75..beabd31c2 100644 --- a/src/Orchard.Web/Modules/Orchard.Media/Views/Admin/EditMedia.aspx +++ b/src/Orchard.Web/Modules/Orchard.Media/Views/Admin/EditMedia.aspx @@ -24,11 +24,11 @@ Html.RegisterStyle("admin.css"); %>
      <%-- todo: make these real (including markup) --%>
      - + - + - +
      @@ -61,9 +61,9 @@ Html.RegisterStyle("admin.css"); %>
      " class="previewImage" alt="<%: Model.Caption %>" />
        <%-- todo: make these real (including markup) -
      • -
      • -
      • +
      • +
      • +
      • ", ResolveUrl("~/Media/" + Model.RelativePath + "/" + Model.Name), 500, 375, Model.Caption) %>" /> diff --git a/src/Orchard.Web/Modules/Orchard.MetaData/Views/Admin/ContentTypeList.ascx b/src/Orchard.Web/Modules/Orchard.MetaData/Views/Admin/ContentTypeList.ascx index d07a494d9..cefdbbfca 100644 --- a/src/Orchard.Web/Modules/Orchard.MetaData/Views/Admin/ContentTypeList.ascx +++ b/src/Orchard.Web/Modules/Orchard.MetaData/Views/Admin/ContentTypeList.ascx @@ -25,7 +25,7 @@ %> - <%= Html.ActionLink(string.IsNullOrWhiteSpace(item.Name) ? "unkwn" : item.Name, "ContentTypeList", new {id=item.Name})%> + <%: Html.ActionLink(string.IsNullOrWhiteSpace(item.Name) ? "unkwn" : item.Name, "ContentTypeList", new {id=item.Name})%> @@ -60,7 +60,7 @@ using (Html.BeginFormAntiForgeryPost(Url.Action("Save",new {id=Model.SelectedCon " type="checkbox" /><%}%> - <%= Html.Encode(item.Name)%> + <%: item.Name%> @@ -68,7 +68,7 @@ using (Html.BeginFormAntiForgeryPost(Url.Action("Save",new {id=Model.SelectedCon

        - " /> + " />

        <% } %>
      diff --git a/src/Orchard.Web/Modules/Orchard.Modules/Views/Admin/Features.ascx b/src/Orchard.Web/Modules/Orchard.Modules/Views/Admin/Features.ascx index 85288f8a5..8a4c0425b 100644 --- a/src/Orchard.Web/Modules/Orchard.Modules/Views/Admin/Features.ascx +++ b/src/Orchard.Web/Modules/Orchard.Modules/Views/Admin/Features.ascx @@ -34,7 +34,7 @@ featureClassName += " first"; if (feature == features.Last()) featureClassName += " last"; %> -
    • "> +
    • ">

      <%:feature.Descriptor.Name %>

      @@ -42,9 +42,9 @@ if (feature.Descriptor.Dependencies != null) { %>

      <%: T("Depends on:")%>

      - <%=Html.UnorderedList( + <%: Html.UnorderedList( feature.Descriptor.Dependencies.OrderBy(s => s), - (s, i) => Html.Link(s, string.Format("#{0}", s.AsFeatureId(n => T(n)))), + (s, i) => Html.Link(s, string.Format("#{0}", s.AsFeatureId(n => T(n)))).ToString(), "", "dependency", "") %> diff --git a/src/Orchard.Web/Modules/Orchard.Modules/Views/Admin/Index.ascx b/src/Orchard.Web/Modules/Orchard.Modules/Views/Admin/Index.ascx index 3ffb531c2..f8ecde915 100644 --- a/src/Orchard.Web/Modules/Orchard.Modules/Views/Admin/Index.ascx +++ b/src/Orchard.Web/Modules/Orchard.Modules/Views/Admin/Index.ascx @@ -15,7 +15,7 @@

      <%: module.Description %>

      <% } %>
        -
      • <%=T("Features: {0}", string.Join(", ", module.Features.Select(f => Html.Link(f.Name, string.Format("{0}#{1}", Url.Action("features", new { area = "Orchard.Modules" }), f.Name.AsFeatureId(n => T(n))) )).OrderBy(s => s).ToArray())) %>
      • +
      • <%: T("Features: {0}", string.Join(", ", module.Features.Select(f => Html.Link(f.Name, string.Format("{0}#{1}", Url.Action("features", new { area = "Orchard.Modules" }), f.Name.AsFeatureId(n => T(n)))).ToString()).OrderBy(s => s).ToArray())) %>
      •  | <%: T("Author: {0}", !string.IsNullOrEmpty(module.Author) ? module.Author : (new []{"Bradley", "Bertrand", "Renaud", "Suha", "Sebastien", "Jon", "Nathan", "Erik"})[(module.DisplayName.Length + (new Random()).Next()) % 7]) %>
      • <%-- very efficient, I know --%>
      •  | <%: T("Website: {0}", !string.IsNullOrEmpty(module.HomePage) ? module.HomePage : T("http://orchardproject.net").ToString())%>
      diff --git a/src/Orchard.Web/Modules/Orchard.MultiTenancy/Views/Admin/DisplayTemplates/ActionsForUninitialized.ascx b/src/Orchard.Web/Modules/Orchard.MultiTenancy/Views/Admin/DisplayTemplates/ActionsForUninitialized.ascx index d918cf219..445be2786 100644 --- a/src/Orchard.Web/Modules/Orchard.MultiTenancy/Views/Admin/DisplayTemplates/ActionsForUninitialized.ascx +++ b/src/Orchard.Web/Modules/Orchard.MultiTenancy/Views/Admin/DisplayTemplates/ActionsForUninitialized.ascx @@ -2,4 +2,4 @@ <%@ Import Namespace="Orchard.MultiTenancy.Extensions"%> <%@ Import Namespace="Orchard.Mvc.Html"%> <%@ Import Namespace="Orchard.Environment.Configuration" %> -<%=Html.Link(T("Set Up").ToString(), Url.Tenant(Model))%> \ No newline at end of file +<%: Html.Link(T("Set Up").ToString(), Url.Tenant(Model))%> diff --git a/src/Orchard.Web/Modules/Orchard.MultiTenancy/Views/Admin/Index.ascx b/src/Orchard.Web/Modules/Orchard.MultiTenancy/Views/Admin/Index.ascx index 944764d80..9856b9d22 100644 --- a/src/Orchard.Web/Modules/Orchard.MultiTenancy/Views/Admin/Index.ascx +++ b/src/Orchard.Web/Modules/Orchard.MultiTenancy/Views/Admin/Index.ascx @@ -11,13 +11,13 @@

      <%: tenant.Name %><% if (!string.IsNullOrEmpty(tenant.RequestUrlHost)) { - %> - <%=Html.Link(Url.Tenant(tenant), Url.Tenant(tenant))%><% + %> - <%: Html.Link(Url.Tenant(tenant), Url.Tenant(tenant))%><% } %>

    • - - + +

      <%: Html.ActionLink(pageEntry.Page.Title, "Edit", new { id = pageEntry.PageId })%>

      • <% @@ -62,7 +62,7 @@ using (Html.BeginFormAntiForgeryPost()) { %>
      • <% if (pageEntry.Page.ScheduledPublishUtc.HasValue && pageEntry.Page.ScheduledPublishUtc.Value > DateTime.UtcNow) { %> " alt="<%: T("Scheduled") %>" title="<%: T("The page is scheduled for publishing") %>" /><%: T("Scheduled")%> - <%=Html.DateTime(pageEntry.Page.ScheduledPublishUtc.Value, T("M/d/yyyy h:mm tt"))%><% + <%: Html.DateTime(pageEntry.Page.ScheduledPublishUtc.Value, T("M/d/yyyy h:mm tt"))%><% } else if (pageEntry.Page.IsPublished) { %> <%: T("Published: {0}", Html.DateTimeRelative(pageEntry.Page.As().VersionPublishedUtc.Value, T)) %><% @@ -76,17 +76,17 @@ using (Html.BeginFormAntiForgeryPost()) { %>
      diff --git a/src/Orchard.Web/Modules/Orchard.Pages/Views/EditorTemplates/Items/Pages.Page.ascx b/src/Orchard.Web/Modules/Orchard.Pages/Views/EditorTemplates/Items/Pages.Page.ascx index 7bb793594..b1f9c64b3 100644 --- a/src/Orchard.Web/Modules/Orchard.Pages/Views/EditorTemplates/Items/Pages.Page.ascx +++ b/src/Orchard.Web/Modules/Orchard.Pages/Views/EditorTemplates/Items/Pages.Page.ascx @@ -13,7 +13,7 @@ "/><% //TODO: (erikpo) In the future, remove the HasPublished check so the user can delete the content item from here if the choose to if (Model.Item.HasDraft && Model.Item.HasPublished) { %> - <%=Html.AntiForgeryTokenValueOrchardLink(T("Discard Draft").ToString(), Url.Action("DiscardDraft", new {Area = "Orchard.Pages", Controller = "Admin", id = Model.Item.Id}), new {@class = "button"})%><% + <%: Html.AntiForgeryTokenValueOrchardLink(T("Discard Draft").ToString(), Url.Action("DiscardDraft", new {Area = "Orchard.Pages", Controller = "Admin", id = Model.Item.Id}), new {@class = "button"})%><% } %>
    • diff --git a/src/Orchard.Web/Modules/Orchard.Pages/Views/Page/Item.ascx b/src/Orchard.Web/Modules/Orchard.Pages/Views/Page/Item.ascx index 2e9c113fc..a85782268 100644 --- a/src/Orchard.Web/Modules/Orchard.Pages/Views/Page/Item.ascx +++ b/src/Orchard.Web/Modules/Orchard.Pages/Views/Page/Item.ascx @@ -1,4 +1,4 @@ <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> <%@ Import Namespace="Orchard.Mvc.Html"%> <%@ Import Namespace="Orchard.Pages.ViewModels"%> -<%=Html.DisplayForItem(m=>m.Page) %> \ No newline at end of file +<%: Html.DisplayForItem(m=>m.Page) %> diff --git a/src/Orchard.Web/Modules/Orchard.Sandbox/Views/DisplayTemplates/Items/Sandbox.Page.ascx b/src/Orchard.Web/Modules/Orchard.Sandbox/Views/DisplayTemplates/Items/Sandbox.Page.ascx index 5e7a09ce1..6683a7fc9 100644 --- a/src/Orchard.Web/Modules/Orchard.Sandbox/Views/DisplayTemplates/Items/Sandbox.Page.ascx +++ b/src/Orchard.Web/Modules/Orchard.Sandbox/Views/DisplayTemplates/Items/Sandbox.Page.ascx @@ -8,7 +8,7 @@
    • <% Html.Zone("metatop"); %>
      - <%=Html.ItemEditLink(T("Edit this page").ToString(), Model.Item) %> + <%: Html.ItemEditLink(T("Edit this page").ToString(), Model.Item) %> <%: Html.ActionLink(T("Return to list").ToString(), "index") %> <% Html.Zone("actions"); %>
      diff --git a/src/Orchard.Web/Modules/Orchard.Sandbox/Views/DisplayTemplates/Parts/Sandbox.Page.Title.ascx b/src/Orchard.Web/Modules/Orchard.Sandbox/Views/DisplayTemplates/Parts/Sandbox.Page.Title.ascx index df84c03ff..87b976b48 100644 --- a/src/Orchard.Web/Modules/Orchard.Sandbox/Views/DisplayTemplates/Parts/Sandbox.Page.Title.ascx +++ b/src/Orchard.Web/Modules/Orchard.Sandbox/Views/DisplayTemplates/Parts/Sandbox.Page.Title.ascx @@ -1,3 +1,3 @@ <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> <%@ Import Namespace="Orchard.ContentManagement"%> -

      <%=Html.ItemDisplayLink(Model) %>

      \ No newline at end of file +

      <%: Html.ItemDisplayLink(Model) %>

      diff --git a/src/Orchard.Web/Modules/Orchard.Sandbox/Views/Page/Index.aspx b/src/Orchard.Web/Modules/Orchard.Sandbox/Views/Page/Index.aspx index afac17ae6..be7c70f58 100644 --- a/src/Orchard.Web/Modules/Orchard.Sandbox/Views/Page/Index.aspx +++ b/src/Orchard.Web/Modules/Orchard.Sandbox/Views/Page/Index.aspx @@ -2,4 +2,4 @@ <%@ Import Namespace="Orchard.Sandbox.ViewModels" %>

      <%: Html.TitleForPage(T("Sandbox Pages").ToString()) %>

      <%: Html.ActionLink(T("Add new page").ToString(), "create") %>

      -<%=Html.UnorderedList(Model.Pages, (sp, i) => Html.DisplayForItem(sp).ToHtmlString(), "pages contentItems") %> \ No newline at end of file +<%: Html.UnorderedList(Model.Pages, (sp, i) => Html.DisplayForItem(sp).ToHtmlString(), "pages contentItems") %> diff --git a/src/Orchard.Web/Modules/Orchard.Sandbox/Views/Page/Show.aspx b/src/Orchard.Web/Modules/Orchard.Sandbox/Views/Page/Show.aspx index 165490752..fadd14b6e 100644 --- a/src/Orchard.Web/Modules/Orchard.Sandbox/Views/Page/Show.aspx +++ b/src/Orchard.Web/Modules/Orchard.Sandbox/Views/Page/Show.aspx @@ -1,3 +1,3 @@ <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %> <%@ Import Namespace="Orchard.Sandbox.ViewModels" %> -<%=Html.DisplayForItem(Model.Page) %> \ No newline at end of file +<%: Html.DisplayForItem(Model.Page) %> diff --git a/src/Orchard.Web/Modules/Orchard.Search/Views/SearchForm.ascx b/src/Orchard.Web/Modules/Orchard.Search/Views/SearchForm.ascx index b1df13ea6..8c66dc2ec 100644 --- a/src/Orchard.Web/Modules/Orchard.Search/Views/SearchForm.ascx +++ b/src/Orchard.Web/Modules/Orchard.Search/Views/SearchForm.ascx @@ -2,7 +2,7 @@ <%@ Import Namespace="Orchard.Search.ViewModels" %><% using(Html.BeginForm("index", "search", new { area = "Orchard.Search" }, FormMethod.Get, new { @class = "search" })) { %>
      - <%=Html.TextBox("q", Model.Query) %> - + <%: Html.TextBox("q", Model.Query) %> +
      <% } %> \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Setup/Views/Setup/Index.ascx b/src/Orchard.Web/Modules/Orchard.Setup/Views/Setup/Index.ascx index f7d57a9a8..7db91a3c0 100644 --- a/src/Orchard.Web/Modules/Orchard.Setup/Views/Setup/Index.ascx +++ b/src/Orchard.Web/Modules/Orchard.Setup/Views/Setup/Index.ascx @@ -1,6 +1,6 @@ <%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %> <%@ Import Namespace="Orchard.Setup.ViewModels"%> -

      <%: Html.TitleForPage(_Encoded("Get Started").ToHtmlString())%>

      +

      <%: Html.TitleForPage(T("Get Started").ToString())%>

      <% using (Html.BeginFormAntiForgeryPost()) { %> <%: Html.ValidationSummary() %> diff --git a/src/Orchard.Web/Modules/Orchard.Tags/Views/Admin/Index.aspx b/src/Orchard.Web/Modules/Orchard.Tags/Views/Admin/Index.aspx index 7ad7657e0..9a8101ce4 100644 --- a/src/Orchard.Web/Modules/Orchard.Tags/Views/Admin/Index.aspx +++ b/src/Orchard.Web/Modules/Orchard.Tags/Views/Admin/Index.aspx @@ -5,9 +5,9 @@ <%: Html.ValidationSummary() %>
      - + <%: Html.SelectOption(Model.BulkAction, TagAdminIndexBulkAction.None, T("Choose action...").ToString())%> + <%: Html.SelectOption(Model.BulkAction, TagAdminIndexBulkAction.Delete, T("Remove").ToString())%> " />
      @@ -33,8 +33,8 @@ %> - - + + <%: Html.ActionLink(Html.Encode(tagEntry.Tag.TagName), "Search", new {id = tagEntry.Tag.Id}) %> diff --git a/src/Orchard.Web/Modules/Orchard.Tags/Views/Admin/Search.aspx b/src/Orchard.Web/Modules/Orchard.Tags/Views/Admin/Search.aspx index a63547db3..f41688f50 100644 --- a/src/Orchard.Web/Modules/Orchard.Tags/Views/Admin/Search.aspx +++ b/src/Orchard.Web/Modules/Orchard.Tags/Views/Admin/Search.aspx @@ -15,8 +15,8 @@ <% foreach (var contentItem in Model.Contents) { %> - <%=Html.ItemDisplayText(contentItem) %> - <%=Html.ItemDisplayLink(contentItem) %> + <%: Html.ItemDisplayText(contentItem) %> + <%: Html.ItemDisplayLink(contentItem) %> <% } %> \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Tags/Views/Home/Index.ascx b/src/Orchard.Web/Modules/Orchard.Tags/Views/Home/Index.ascx index 16a02b48c..c729dd648 100644 --- a/src/Orchard.Web/Modules/Orchard.Tags/Views/Home/Index.ascx +++ b/src/Orchard.Web/Modules/Orchard.Tags/Views/Home/Index.ascx @@ -1,7 +1,7 @@ <%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %> <%@ Import Namespace="Orchard.Tags.ViewModels"%>

      <%: Html.TitleForPage(T("Tags").ToString())%>

      -<%=Html.UnorderedList( +<%: Html.UnorderedList( Model.Tags, (t, i) => Html.ActionLink( Html.Encode(t.TagName), diff --git a/src/Orchard.Web/Modules/Orchard.Tags/Views/Home/Search.ascx b/src/Orchard.Web/Modules/Orchard.Tags/Views/Home/Search.ascx index a68b8050f..69322cdc9 100644 --- a/src/Orchard.Web/Modules/Orchard.Tags/Views/Home/Search.ascx +++ b/src/Orchard.Web/Modules/Orchard.Tags/Views/Home/Search.ascx @@ -1,5 +1,5 @@ <%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %> <%@ Import Namespace="Orchard.Tags.ViewModels"%> <% Html.AddTitleParts(T("Tags").ToString(), T("Contents tagged with {0}", Model.TagName).ToString()); %> -

      <%=T("Contents tagged with {0}", Html.Encode(Model.TagName)) %>

      -<%=Html.UnorderedList(Model.Items, (c, i) => Html.DisplayForItem(c).ToHtmlString(), "taggedPosts contentItems") %> \ No newline at end of file +

      <%: T("Contents tagged with {0}", Html.Encode(Model.TagName)) %>

      +<%: Html.UnorderedList(Model.Items, (c, i) => Html.DisplayForItem(c).ToHtmlString(), "taggedPosts contentItems") %> diff --git a/src/Orchard.Web/Modules/Orchard.Themes/Views/Admin/Index.aspx b/src/Orchard.Web/Modules/Orchard.Themes/Views/Admin/Index.aspx index acf81f455..d380f6256 100644 --- a/src/Orchard.Web/Modules/Orchard.Themes/Views/Admin/Index.aspx +++ b/src/Orchard.Web/Modules/Orchard.Themes/Views/Admin/Index.aspx @@ -9,7 +9,7 @@ } else { %>

      <%: T("Current Theme")%> - <%: Model.CurrentTheme.DisplayName %>

      - <%=Html.Image(Html.ThemePath(Model.CurrentTheme, "/Theme.png"), Html.Encode(Model.CurrentTheme.DisplayName), new { @class = "themePreviewImage" })%> + <%: Html.Image(Html.ThemePath(Model.CurrentTheme, "/Theme.png"), Html.Encode(Model.CurrentTheme.DisplayName), new { @class = "themePreviewImage" })%>
      <%: T("By") %> <%: Model.CurrentTheme.Author %>

      @@ -27,7 +27,7 @@ %>

    • <%: theme.DisplayName %>

      - <%=Html.Image(Html.ThemePath(theme, "/Theme.png"), Html.Encode(theme.DisplayName), null)%> + <%: Html.Image(Html.ThemePath(theme, "/Theme.png"), Html.Encode(theme.DisplayName), null)%> <% using (Html.BeginFormAntiForgeryPost(Url.Action("Activate"), FormMethod.Post, new { @class = "inline" })) { %> <%: Html.Hidden("themeName", theme.ThemeName)%> diff --git a/src/Orchard.Web/Modules/Orchard.Themes/Views/Admin/ThemePreview.ascx b/src/Orchard.Web/Modules/Orchard.Themes/Views/Admin/ThemePreview.ascx index 5fc3ae8e3..dcbe48351 100644 --- a/src/Orchard.Web/Modules/Orchard.Themes/Views/Admin/ThemePreview.ascx +++ b/src/Orchard.Web/Modules/Orchard.Themes/Views/Admin/ThemePreview.ascx @@ -58,9 +58,9 @@ html.dyn #themepreview button.preview { display:none; }
      <% using(Html.BeginFormAntiForgeryPost(Url.Action("Preview", new{Controller="Admin", Area="Orchard.Themes"}), FormMethod.Post, new { @class = "inline" })) { %>
      - <%=T("You are previewing: ")%> + <%: T("You are previewing: ")%> <%: Html.Hidden("ReturnUrl", Context.Request.RawUrl)%> - <%=Html.DropDownList("ThemeName", Model.Themes, new {onChange = "this.form.submit();"})%> + <%: Html.DropDownList("ThemeName", Model.Themes, new {onChange = "this.form.submit();"})%> diff --git a/src/Orchard.Web/Modules/Orchard.Themes/Views/Menu.ascx b/src/Orchard.Web/Modules/Orchard.Themes/Views/Menu.ascx index dc85d61b6..53714c621 100644 --- a/src/Orchard.Web/Modules/Orchard.Themes/Views/Menu.ascx +++ b/src/Orchard.Web/Modules/Orchard.Themes/Views/Menu.ascx @@ -19,7 +19,7 @@ sbClass.Append("current "); var classValue = sbClass.ToString().TrimEnd(); %> - ><%=Html.Link(menuItem.Text, menuItem.Href) %>
    • <% + ><%: Html.Link(menuItem.Text, menuItem.Href) %>
    • <% ++counter; } %>
    diff --git a/src/Orchard.Web/Modules/Orchard.Themes/Views/User.ascx b/src/Orchard.Web/Modules/Orchard.Themes/Views/User.ascx index 47cdceaa0..ef473bf37 100644 --- a/src/Orchard.Web/Modules/Orchard.Themes/Views/User.ascx +++ b/src/Orchard.Web/Modules/Orchard.Themes/Views/User.ascx @@ -2,7 +2,7 @@ <%@ Import Namespace="Orchard.Mvc.ViewModels"%>
    <% if (Request.IsAuthenticated) { %> - <%= T("Welcome, {0}!", Page.User.Identity.Name) %> + <%: T("Welcome, {0}!", Page.User.Identity.Name) %> <%: Html.ActionLink(T("Log Off").ToString(), "LogOff", new { Controller = "Account", Area = "Orchard.Users", ReturnUrl = Context.Request.RawUrl })%>  | <%: Html.ActionLink("Admin", "Index", new {Area = "Dashboard", Controller = "Admin"})%> <% } else { %> diff --git a/src/Orchard.Web/Modules/TinyMce/Views/EditorTemplates/TinyMceTextEditor.ascx b/src/Orchard.Web/Modules/TinyMce/Views/EditorTemplates/TinyMceTextEditor.ascx index ef9fc941a..b3280c449 100644 --- a/src/Orchard.Web/Modules/TinyMce/Views/EditorTemplates/TinyMceTextEditor.ascx +++ b/src/Orchard.Web/Modules/TinyMce/Views/EditorTemplates/TinyMceTextEditor.ascx @@ -1,7 +1,7 @@ <%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %> <%@ Import Namespace="Orchard.Core.Common.ViewModels"%> <% Html.RegisterScript("tiny_mce.js"); %> -<%=Html.TextArea("Text", Model.Text, 25, 80, new { @class = "html" }) %><% +<%: Html.TextArea("Text", Model.Text, 25, 80, new { @class = "html" }) %><% using (this.Capture("end-of-page-scripts")) {%> <% }%> \ No newline at end of file diff --git a/src/Orchard.Web/Themes/Classic/Views/DisplayTemplates/Items/Blogs.Blog.Summary.ascx b/src/Orchard.Web/Themes/Classic/Views/DisplayTemplates/Items/Blogs.Blog.Summary.ascx index 35e33132a..cfa18d826 100644 --- a/src/Orchard.Web/Themes/Classic/Views/DisplayTemplates/Items/Blogs.Blog.Summary.ascx +++ b/src/Orchard.Web/Themes/Classic/Views/DisplayTemplates/Items/Blogs.Blog.Summary.ascx @@ -3,6 +3,6 @@ <%@ Import Namespace="Orchard.Blogs.Extensions"%> <%@ Import Namespace="Orchard.Blogs.Models"%> -

    <%=Html.Link(Html.Encode(Model.Item.Name), Url.Blog(Model.Item.Slug)) %>

    - +

    <%: Html.Link(Model.Item.Name, Url.Blog(Model.Item.Slug)) %>

    +

    <%: Model.Item.Description %>

    diff --git a/src/Orchard.Web/Themes/Classic/Views/DisplayTemplates/Items/Blogs.BlogPost.Summary.ascx b/src/Orchard.Web/Themes/Classic/Views/DisplayTemplates/Items/Blogs.BlogPost.Summary.ascx index 637da3b4b..dc79bf381 100644 --- a/src/Orchard.Web/Themes/Classic/Views/DisplayTemplates/Items/Blogs.BlogPost.Summary.ascx +++ b/src/Orchard.Web/Themes/Classic/Views/DisplayTemplates/Items/Blogs.BlogPost.Summary.ascx @@ -3,8 +3,8 @@ <%@ Import Namespace="Orchard.Blogs.Extensions"%> <%@ Import Namespace="Orchard.Blogs.Models"%> <%Model.Zones.AddRenderPartial("zonetest", "ZoneTest", Model); %> -

    <%=Html.Link(Html.Encode(Model.Item.Title), Url.BlogPost(Model.Item)) %>

    -
    <%=Html.PublishedState(Model.Item, T) %> | <%Html.Zone("meta");%>
    +

    <%: Html.Link(Model.Item.Title, Url.BlogPost(Model.Item)) %>

    +
    <%: Html.PublishedState(Model.Item, T) %> | <%Html.Zone("meta");%>
    <% Html.Zone("primary"); %>
    \ No newline at end of file diff --git a/src/Orchard.Web/Themes/Classic/Views/DisplayTemplates/Items/Blogs.BlogPost.ascx b/src/Orchard.Web/Themes/Classic/Views/DisplayTemplates/Items/Blogs.BlogPost.ascx index 0cf40e77e..e40fb3678 100644 --- a/src/Orchard.Web/Themes/Classic/Views/DisplayTemplates/Items/Blogs.BlogPost.ascx +++ b/src/Orchard.Web/Themes/Classic/Views/DisplayTemplates/Items/Blogs.BlogPost.ascx @@ -7,7 +7,7 @@ What I have in this template is as close as I can get at the moment. --%> <%-- --%> diff --git a/src/Orchard.Web/Themes/Classic/Views/DisplayTemplates/Parts/Blogs.BlogPost.List.ascx b/src/Orchard.Web/Themes/Classic/Views/DisplayTemplates/Parts/Blogs.BlogPost.List.ascx index 09561fa15..d3add1534 100644 --- a/src/Orchard.Web/Themes/Classic/Views/DisplayTemplates/Parts/Blogs.BlogPost.List.ascx +++ b/src/Orchard.Web/Themes/Classic/Views/DisplayTemplates/Parts/Blogs.BlogPost.List.ascx @@ -1,5 +1,5 @@ <%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl>>" %> <%@ Import Namespace="Orchard.Mvc.ViewModels"%> <%@ Import Namespace="Orchard.Blogs.Models"%> -<%=Html.UnorderedList(Model, (bp, i) => Html.DisplayForItem(bp).ToHtmlString(), "blogPosts contentItems") %> +<%: Html.UnorderedList(Model, (bp, i) => Html.DisplayForItem(bp).ToHtmlString(), "blogPosts contentItems") %> <% if (Model.Count() < 1) { %>

    <%: T("There are no posts for this blog.") %>

    <% } %> diff --git a/src/Orchard.Web/Themes/ClassicDark/Views/DisplayTemplates/Items/Blogs.Blog.Summary.ascx b/src/Orchard.Web/Themes/ClassicDark/Views/DisplayTemplates/Items/Blogs.Blog.Summary.ascx index 35e33132a..cfa18d826 100644 --- a/src/Orchard.Web/Themes/ClassicDark/Views/DisplayTemplates/Items/Blogs.Blog.Summary.ascx +++ b/src/Orchard.Web/Themes/ClassicDark/Views/DisplayTemplates/Items/Blogs.Blog.Summary.ascx @@ -3,6 +3,6 @@ <%@ Import Namespace="Orchard.Blogs.Extensions"%> <%@ Import Namespace="Orchard.Blogs.Models"%> -

    <%=Html.Link(Html.Encode(Model.Item.Name), Url.Blog(Model.Item.Slug)) %>

    - +

    <%: Html.Link(Model.Item.Name, Url.Blog(Model.Item.Slug)) %>

    +

    <%: Model.Item.Description %>

    diff --git a/src/Orchard.Web/Themes/ClassicDark/Views/DisplayTemplates/Items/Blogs.BlogPost.Summary.ascx b/src/Orchard.Web/Themes/ClassicDark/Views/DisplayTemplates/Items/Blogs.BlogPost.Summary.ascx index 637da3b4b..dc79bf381 100644 --- a/src/Orchard.Web/Themes/ClassicDark/Views/DisplayTemplates/Items/Blogs.BlogPost.Summary.ascx +++ b/src/Orchard.Web/Themes/ClassicDark/Views/DisplayTemplates/Items/Blogs.BlogPost.Summary.ascx @@ -3,8 +3,8 @@ <%@ Import Namespace="Orchard.Blogs.Extensions"%> <%@ Import Namespace="Orchard.Blogs.Models"%> <%Model.Zones.AddRenderPartial("zonetest", "ZoneTest", Model); %> -

    <%=Html.Link(Html.Encode(Model.Item.Title), Url.BlogPost(Model.Item)) %>

    -
    <%=Html.PublishedState(Model.Item, T) %> | <%Html.Zone("meta");%>
    +

    <%: Html.Link(Model.Item.Title, Url.BlogPost(Model.Item)) %>

    +
    <%: Html.PublishedState(Model.Item, T) %> | <%Html.Zone("meta");%>
    <% Html.Zone("primary"); %>
    \ No newline at end of file diff --git a/src/Orchard.Web/Themes/ClassicDark/Views/DisplayTemplates/Items/Blogs.BlogPost.ascx b/src/Orchard.Web/Themes/ClassicDark/Views/DisplayTemplates/Items/Blogs.BlogPost.ascx index 0cf40e77e..e40fb3678 100644 --- a/src/Orchard.Web/Themes/ClassicDark/Views/DisplayTemplates/Items/Blogs.BlogPost.ascx +++ b/src/Orchard.Web/Themes/ClassicDark/Views/DisplayTemplates/Items/Blogs.BlogPost.ascx @@ -7,7 +7,7 @@ What I have in this template is as close as I can get at the moment. --%> <%-- --%> diff --git a/src/Orchard.Web/Themes/ClassicDark/Views/DisplayTemplates/Parts/Blogs.BlogPost.List.ascx b/src/Orchard.Web/Themes/ClassicDark/Views/DisplayTemplates/Parts/Blogs.BlogPost.List.ascx index 09561fa15..d3add1534 100644 --- a/src/Orchard.Web/Themes/ClassicDark/Views/DisplayTemplates/Parts/Blogs.BlogPost.List.ascx +++ b/src/Orchard.Web/Themes/ClassicDark/Views/DisplayTemplates/Parts/Blogs.BlogPost.List.ascx @@ -1,5 +1,5 @@ <%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl>>" %> <%@ Import Namespace="Orchard.Mvc.ViewModels"%> <%@ Import Namespace="Orchard.Blogs.Models"%> -<%=Html.UnorderedList(Model, (bp, i) => Html.DisplayForItem(bp).ToHtmlString(), "blogPosts contentItems") %> +<%: Html.UnorderedList(Model, (bp, i) => Html.DisplayForItem(bp).ToHtmlString(), "blogPosts contentItems") %> <% if (Model.Count() < 1) { %>

    <%: T("There are no posts for this blog.") %>

    <% } %> diff --git a/src/Orchard.Web/Themes/Contoso/Views/DisplayTemplates/Items/Blogs.BlogPost.ListByArchive.ascx b/src/Orchard.Web/Themes/Contoso/Views/DisplayTemplates/Items/Blogs.BlogPost.ListByArchive.ascx index 2b3320577..5f42b0f35 100644 --- a/src/Orchard.Web/Themes/Contoso/Views/DisplayTemplates/Items/Blogs.BlogPost.ListByArchive.ascx +++ b/src/Orchard.Web/Themes/Contoso/Views/DisplayTemplates/Items/Blogs.BlogPost.ListByArchive.ascx @@ -4,11 +4,11 @@

    <%: Html.TitleForPage(T("Archives").ToString(), Model.ArchiveData.Year.ToString(), Model.ArchiveData.Month > 0 ? new DateTime(Model.ArchiveData.Year, Model.ArchiveData.Month, 1).ToString("MMMM") : null, Model.ArchiveData.Day > 0 ? Model.ArchiveData.Day.ToString() : null)%>

    -<%=T("Archives").ToString() -%> / <%=Html.Link(Model.ArchiveData.Year.ToString(), Url.BlogArchiveYear(Model.Blog.Slug, Model.ArchiveData.Year)) +<%: T("Archives").ToString() +%> / <%: Html.Link(Model.ArchiveData.Year.ToString(), Url.BlogArchiveYear(Model.Blog.Slug, Model.ArchiveData.Year)) %><%=Model.ArchiveData.Month > 0 ? string.Format(" / {0}", Html.Link(Model.ArchiveData.ToDateTime().ToString("MMMM"), Url.BlogArchiveMonth(Model.Blog.Slug, Model.ArchiveData.Year, Model.ArchiveData.Month))) : "" %><%=Model.ArchiveData.Day > 0 ? string.Format(" / {0}", Html.Link(Model.ArchiveData.Day.ToString(), Url.BlogArchiveDay(Model.Blog.Slug, Model.ArchiveData.Year, Model.ArchiveData.Month, Model.ArchiveData.Day))) : "" %>
    -<%=Html.UnorderedList(Model.BlogPosts, (c, i) => Html.DisplayForItem(c).ToHtmlString(), "blogPosts contentItems")%> \ No newline at end of file +<%: Html.UnorderedList(Model.BlogPosts, (c, i) => Html.DisplayForItem(c).ToHtmlString(), "blogPosts contentItems")%> diff --git a/src/Orchard.Web/Themes/Contoso/Views/DisplayTemplates/Parts/Blogs.BlogPost.List.ascx b/src/Orchard.Web/Themes/Contoso/Views/DisplayTemplates/Parts/Blogs.BlogPost.List.ascx index d13c29631..89d7c5ba6 100644 --- a/src/Orchard.Web/Themes/Contoso/Views/DisplayTemplates/Parts/Blogs.BlogPost.List.ascx +++ b/src/Orchard.Web/Themes/Contoso/Views/DisplayTemplates/Parts/Blogs.BlogPost.List.ascx @@ -2,5 +2,5 @@ <%@ Import Namespace="Orchard.Mvc.ViewModels"%> <%@ Import Namespace="Orchard.Blogs.Models"%> -<%=Html.UnorderedList(Model, (bp, i) => Html.DisplayForItem(bp).ToHtmlString(), "blogPosts contentItems") %> +<%: Html.UnorderedList(Model, (bp, i) => Html.DisplayForItem(bp).ToHtmlString(), "blogPosts contentItems") %> <% if (Model.Count() < 1) { %>

    <%: T("There are no posts for this blog.") %>

    <% } %> diff --git a/src/Orchard.Web/Themes/Contoso/Views/DisplayTemplates/Parts/Blogs.BlogPost.Metadata.ascx b/src/Orchard.Web/Themes/Contoso/Views/DisplayTemplates/Parts/Blogs.BlogPost.Metadata.ascx index 03bb4f709..0732e3a41 100644 --- a/src/Orchard.Web/Themes/Contoso/Views/DisplayTemplates/Parts/Blogs.BlogPost.Metadata.ascx +++ b/src/Orchard.Web/Themes/Contoso/Views/DisplayTemplates/Parts/Blogs.BlogPost.Metadata.ascx @@ -1,7 +1,6 @@ <%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %> <%@ Import Namespace="Orchard.Blogs.Extensions"%> <%@ Import Namespace="Orchard.Blogs.Models"%> -<% - if (Model.Creator != null) { - %><%=_Encoded(" | Posted by {0} {1}", Model.Creator.UserName, Html.PublishedWhen(Model)) %><% - } %> +<% if (Model.Creator != null) { %> + <%: T(" | Posted by {0} {1}", Model.Creator.UserName, Html.PublishedWhen(Model)) %> +<% } %> diff --git a/src/Orchard.Web/Themes/Contoso/Views/DisplayTemplates/Parts/Comments.HasComments.ascx b/src/Orchard.Web/Themes/Contoso/Views/DisplayTemplates/Parts/Comments.HasComments.ascx index 37a92c0c5..ad5ee5532 100644 --- a/src/Orchard.Web/Themes/Contoso/Views/DisplayTemplates/Parts/Comments.HasComments.ascx +++ b/src/Orchard.Web/Themes/Contoso/Views/DisplayTemplates/Parts/Comments.HasComments.ascx @@ -16,7 +16,7 @@ if (Model.CommentsActive == false) { } else if(!Request.IsAuthenticated && !AuthorizedFor(Permissions.AddComment)) { %>

    <%: T("Add a Comment") %>

    -

    <%=T("You must {0} to comment.", Html.ActionLink(T("log on").ToString(), "LogOn", new { Controller = "Account", Area = "Orchard.Users", ReturnUrl = string.Format("{0}#addacomment", Context.Request.RawUrl) }))%>

    <% +

    <%: T("You must {0} to comment.", Html.ActionLink(T("log on").ToString(), "LogOn", new { Controller = "Account", Area = "Orchard.Users", ReturnUrl = string.Format("{0}#addacomment", Context.Request.RawUrl) }))%>

    <% } else { %> <% using (Html.BeginForm("Create", "Comment", new { area = "Orchard.Comments" }, FormMethod.Post, new { @class = "comment-form" })) { %> @@ -46,7 +46,7 @@ else { %> }%>
    - +
    diff --git a/src/Orchard.Web/Themes/Contoso/Views/Layout.HomePage.ascx b/src/Orchard.Web/Themes/Contoso/Views/Layout.HomePage.ascx index 831aee24a..7fb52ea30 100644 --- a/src/Orchard.Web/Themes/Contoso/Views/Layout.HomePage.ascx +++ b/src/Orchard.Web/Themes/Contoso/Views/Layout.HomePage.ascx @@ -23,7 +23,7 @@
    <%-- Init jQuery Slider --%> - +