mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
More <%= to <%: cleanup.
--HG-- branch : dev
This commit is contained in:
@@ -4,8 +4,8 @@
|
||||
<h1><%: Html.TitleForPage(T("Manage Blogs").ToString()) %></h1>
|
||||
<%-- 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) => {
|
||||
<div class="actions"><a class="add button primaryAction" href="<%: Url.BlogCreate() %>"><%: T("New Blog") %></a></div>
|
||||
<%: 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;
|
||||
|
@@ -4,7 +4,7 @@
|
||||
<h1 class="page-title"><%: 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)%></h1>
|
||||
|
||||
<div class="archive-trail">
|
||||
<%=T("Archives").ToString()
|
||||
<%: 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))) : ""
|
||||
|
@@ -2,7 +2,7 @@
|
||||
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
|
||||
<%@ Import Namespace="Orchard.Blogs.Extensions"%>
|
||||
<%@ Import Namespace="Orchard.Blogs.Models"%>
|
||||
<h1><a href="<%=Url.BlogForAdmin(Model.Item.Slug) %>"><%: Html.TitleForPage(Model.Item.Name) %></a>
|
||||
<h1><a href="<%: Url.BlogForAdmin(Model.Item.Slug) %>"><%: Html.TitleForPage(Model.Item.Name) %></a>
|
||||
|
||||
</h1>
|
||||
<% Html.Zone("manage"); %><%--
|
||||
@@ -18,6 +18,6 @@
|
||||
</fieldset>
|
||||
</div>
|
||||
</form>--%>
|
||||
<div class="actions"><a href="<%=Url.BlogPostCreate(Model.Item) %>" class="add button primaryAction"><%: T("New Post")%></a></div>
|
||||
<div class="actions"><a href="<%: Url.BlogPostCreate(Model.Item) %>" class="add button primaryAction"><%: T("New Post")%></a></div>
|
||||
<% Html.Zone("primary");
|
||||
Html.ZonesAny(); %>
|
@@ -4,10 +4,10 @@
|
||||
<%@ Import Namespace="Orchard.Blogs.Models"%>
|
||||
<div class="summary">
|
||||
<div class="related">
|
||||
<a href="<%=Url.Blog(Model.Item.Slug) %>" title="<%: T("View") %>"><%: T("View") %></a><%: T(" | ")%>
|
||||
<a href="<%=Url.BlogForAdmin(Model.Item.Slug) %>" title="<%: T("Edit Posts") %>"><%: T("Edit Posts")%></a><%: T(" | ")%>
|
||||
<a href="<%=Url.BlogPostCreate(Model.Item) %>" title="<%: T("New Post") %>"><%: T("New Post") %></a><%: T(" | ")%>
|
||||
<a href="<%=Url.BlogEdit(Model.Item.Slug) %>" title="<%: T("Settings") %>"><%: T("Settings") %></a><%: T(" | ")%>
|
||||
<a href="<%: Url.Blog(Model.Item.Slug) %>" title="<%: T("View") %>"><%: T("View") %></a><%: T(" | ")%>
|
||||
<a href="<%: Url.BlogForAdmin(Model.Item.Slug) %>" title="<%: T("Edit Posts") %>"><%: T("Edit Posts")%></a><%: T(" | ")%>
|
||||
<a href="<%: Url.BlogPostCreate(Model.Item) %>" title="<%: T("New Post") %>"><%: T("New Post") %></a><%: T(" | ")%>
|
||||
<a href="<%: Url.BlogEdit(Model.Item.Slug) %>" title="<%: T("Settings") %>"><%: T("Settings") %></a><%: T(" | ")%>
|
||||
<%-- todo: (heskew) this is waaaaa too verbose. need template helpers for all ibuttons --%>
|
||||
<% using (Html.BeginFormAntiForgeryPost(Url.BlogDelete(Model.Item.Slug), FormMethod.Post, new { @class = "inline link" })) { %>
|
||||
<button type="submit" class="linkButton" title="<%: T("Remove") %>"><%: T("Remove") %></button><%
|
||||
|
@@ -3,5 +3,5 @@
|
||||
<%@ Import Namespace="Orchard.Blogs.Extensions"%>
|
||||
<%@ Import Namespace="Orchard.Blogs.Models"%>
|
||||
<h2><%: Html.Link(Model.Item.Title, Url.BlogPost(Model.Item)) %></h2>
|
||||
<div class="meta"><%=Html.PublishedState(Model.Item, T) %> | <%Html.Zone("meta");%></div>
|
||||
<div class="meta"><%: Html.PublishedState(Model.Item, T) %> | <%Html.Zone("meta");%></div>
|
||||
<div class="content"><% Html.Zone("primary", ":manage :metadata");%></div>
|
||||
|
@@ -18,7 +18,7 @@
|
||||
</li>
|
||||
<li><%
|
||||
if (Model.Item.HasDraft) { %>
|
||||
<img class="icon" src="<%=ResolveUrl("~/Modules/Orchard.Blogs/Content/Admin/images/draft.gif") %>" alt="<%: T("Draft") %>" title="<%: T("The post has a draft") %>" /><%=Html.PublishedState(Model.Item, T) %><%
|
||||
<img class="icon" src="<%=ResolveUrl("~/Modules/Orchard.Blogs/Content/Admin/images/draft.gif") %>" alt="<%: T("Draft") %>" title="<%: T("The post has a draft") %>" /><%: Html.PublishedState(Model.Item, T) %><%
|
||||
}
|
||||
else { %>
|
||||
<%: T("No draft")%><%
|
||||
@@ -27,7 +27,7 @@
|
||||
<li><%
|
||||
if (Model.Item.ScheduledPublishUtc.HasValue && Model.Item.ScheduledPublishUtc.Value > DateTime.UtcNow) { %>
|
||||
<img class="icon" src="<%=ResolveUrl("~/Modules/Orchard.Blogs/Content/Admin/images/scheduled.gif") %>" alt="<%: T("Scheduled") %>" title="<%: T("The post is scheduled for publishing") %>" /><%: T("Scheduled")%>
|
||||
<%=Html.DateTime(Model.Item.ScheduledPublishUtc.Value, "M/d/yyyy h:mm tt")%><%
|
||||
<%: Html.DateTime(Model.Item.ScheduledPublishUtc.Value, "M/d/yyyy h:mm tt")%><%
|
||||
}
|
||||
else if (Model.Item.IsPublished) { %>
|
||||
<%: T("Published: {0}", Html.DateTimeRelative(Model.Item.As<ICommonAspect>().VersionPublishedUtc.Value, T)) %><%
|
||||
@@ -41,17 +41,17 @@
|
||||
</div>
|
||||
<div class="related"><%
|
||||
if (Model.Item.HasPublished){ %>
|
||||
<a href="<%=Url.BlogPost(Model.Item) %>" title="<%: T("View Post")%>"><%: T("View")%></a><%: T(" | ")%><%
|
||||
<a href="<%: Url.BlogPost(Model.Item) %>" title="<%: T("View Post")%>"><%: T("View")%></a><%: T(" | ")%><%
|
||||
if (Model.Item.HasDraft) { %>
|
||||
<a href="<%=Html.AntiForgeryTokenGetUrl(Url.BlogPostPublish(Model.Item)) %>" title="<%: T("Publish Draft")%>"><%: T("Publish Draft")%></a><%: T(" | ")%><%
|
||||
<a href="<%: Html.AntiForgeryTokenGetUrl(Url.BlogPostPublish(Model.Item)) %>" title="<%: T("Publish Draft")%>"><%: T("Publish Draft")%></a><%: T(" | ")%><%
|
||||
} %>
|
||||
<a href="<%=Html.AntiForgeryTokenGetUrl(Url.BlogPostUnpublish(Model.Item)) %>" title="<%: T("Unpublish Post")%>"><%: T("Unpublish")%></a><%: T(" | ")%><%
|
||||
<a href="<%: Html.AntiForgeryTokenGetUrl(Url.BlogPostUnpublish(Model.Item)) %>" title="<%: T("Unpublish Post")%>"><%: T("Unpublish")%></a><%: T(" | ")%><%
|
||||
}
|
||||
else { %>
|
||||
<a href="<%=Html.AntiForgeryTokenGetUrl(Url.BlogPostPublish(Model.Item)) %>" title="<%: T("Publish Post")%>"><%: T("Publish")%></a><%: T(" | ")%><%
|
||||
<a href="<%: Html.AntiForgeryTokenGetUrl(Url.BlogPostPublish(Model.Item)) %>" title="<%: T("Publish Post")%>"><%: T("Publish")%></a><%: T(" | ")%><%
|
||||
} %>
|
||||
<a href="<%=Url.BlogPostEdit(Model.Item) %>" title="<%: T("Edit Post")%>"><%: T("Edit")%></a><%: T(" | ")%>
|
||||
<a href="<%=Html.AntiForgeryTokenGetUrl(Url.BlogPostDelete(Model.Item)) %>" title="<%: T("Remove Post")%>"><%: T("Remove")%></a>
|
||||
<a href="<%: Url.BlogPostEdit(Model.Item) %>" title="<%: T("Edit Post")%>"><%: T("Edit")%></a><%: T(" | ")%>
|
||||
<a href="<%: Html.AntiForgeryTokenGetUrl(Url.BlogPostDelete(Model.Item)) %>" title="<%: T("Remove Post")%>"><%: T("Remove")%></a>
|
||||
<br /><%Html.Zone("meta");%>
|
||||
</div>
|
||||
<div style="clear:both;"></div>
|
||||
|
@@ -5,6 +5,6 @@
|
||||
Html.RegisterStyle("admin.css");
|
||||
if (AuthorizedFor(Permissions.ManageBlogs)) { %>
|
||||
<div class="folderProperties">
|
||||
<p><a href="<%=Url.BlogEdit(Model.Slug) %>" class="edit"><%: T("Edit") %></a></p>
|
||||
<p><a href="<%: Url.BlogEdit(Model.Slug) %>" class="edit"><%: T("Edit") %></a></p>
|
||||
</div><%
|
||||
} %>
|
@@ -13,7 +13,7 @@
|
||||
<input class="button primaryAction" type="submit" name="submit.Save" value="<%: T("Save") %>"/><%
|
||||
//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"})%><%
|
||||
} %>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user