mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Updated UnorderedList to return IHtmlString and changed the relevant <%= blocks to <%:
--HG-- branch : dev
This commit is contained in:
@@ -23,13 +23,13 @@
|
||||
<li class="previous">
|
||||
<h4><%=year %> <span>(<%=yearMonths.Sum(ym => ym.Value) %>)</span></h4><%
|
||||
} %>
|
||||
<%=Html.UnorderedList(yearMonths, (t, i) => Html.Link(string.Format("{0:MMMM} ({1})", t.Key.ToDateTime(), t.Value), Url.BlogArchiveMonth(Model.Blog.Slug, t.Key.Year, t.Key.Month)), "archiveMonthList") %>
|
||||
<%: Html.UnorderedList(yearMonths, (t, i) => Html.Link(string.Format("{0:MMMM} ({1})", t.Key.ToDateTime(), t.Value), Url.BlogArchiveMonth(Model.Blog.Slug, t.Key.Year, t.Key.Month)), "archiveMonthList") %>
|
||||
</li><%
|
||||
} %>
|
||||
</ul><%
|
||||
}
|
||||
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)), "archiveMonthList") %><%
|
||||
}
|
||||
}
|
||||
else { %>
|
||||
|
@@ -1,3 +1,3 @@
|
||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BlogViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Blogs.ViewModels"%>
|
||||
<%=Html.DisplayForItem(m => m.Blog) %>
|
||||
<%: Html.DisplayForItem(m => m.Blog) %>
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<BlogsViewModel>" %>
|
||||
<%@ 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 { %>
|
||||
<p><%: T("No blogs found.") %></p><%
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<BlogForAdminViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Blogs.ViewModels"%>
|
||||
<% Html.AddTitleParts(T("Manage Blog").ToString()); %>
|
||||
<%=Html.DisplayForItem(m => m.Blog) %>
|
||||
<%: Html.DisplayForItem(m => m.Blog) %>
|
@@ -5,7 +5,7 @@
|
||||
<%-- todo: Add helper text here when ready. <p><%: T("Possible text about setting up and managing a blog goes here.") %></p> --%><%
|
||||
if (Model.Entries.Count() > 0) { %>
|
||||
<div class="actions"><a class="add button primaryAction" href="<%=Url.BlogCreate() %>"><%: T("New Blog") %></a></div>
|
||||
<%=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;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BlogPostViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Blogs.ViewModels"%>
|
||||
<% Html.AddTitleParts(Model.Blog.Name); %>
|
||||
<%=Html.DisplayForItem(m => m.BlogPost) %>
|
||||
<%: Html.DisplayForItem(m => m.BlogPost) %>
|
||||
|
@@ -11,4 +11,4 @@
|
||||
%>
|
||||
</div>
|
||||
|
||||
<%=Html.UnorderedList(Model.BlogPosts, (c, i) => Html.DisplayForItem(c).ToHtmlString(), "blogPosts contentItems")%>
|
||||
<%: Html.UnorderedList(Model.BlogPosts, (c, i) => Html.DisplayForItem(c).ToHtmlString(), "blogPosts contentItems")%>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<IEnumerable<ContentItemViewModel<BlogPost>>>" %>
|
||||
<%@ 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) { %><div class="info message"><%: T("There are no posts for this blog.") %></div><% } %>
|
||||
|
Reference in New Issue
Block a user