mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-14 10:54:50 +08:00
Some work with page titles in blogs
--HG-- extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4044247
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<CreateBlogViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Mvc.Html"%>
|
||||
<%@ Import Namespace="Orchard.Blogs.ViewModels"%>
|
||||
<% Html.Title("Add Blog"); %>
|
||||
<h2>Add Blog</h2>
|
||||
<% using (Html.BeginFormAntiForgeryPost()) { %>
|
||||
<%=Html.ValidationSummary() %>
|
||||
|
@@ -1,6 +1,7 @@
|
||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BlogEditViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Mvc.Html"%>
|
||||
<%@ Import Namespace="Orchard.Blogs.ViewModels"%>
|
||||
<% Html.Title("Edit Blog"); %>
|
||||
<h2>Edit Blog</h2>
|
||||
<% using (Html.BeginFormAntiForgeryPost()) { %>
|
||||
<%=Html.ValidationSummary() %>
|
||||
|
@@ -1,4 +1,5 @@
|
||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BlogForAdminViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Mvc.Html"%>
|
||||
<%@ Import Namespace="Orchard.Blogs.ViewModels"%>
|
||||
<% Html.Title("Manage Blog"); %>
|
||||
<%=Html.DisplayForItem(m => m.Blog) %>
|
@@ -1,6 +1,7 @@
|
||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BlogsViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Mvc.Html"%>
|
||||
<%@ Import Namespace="Orchard.Blogs.ViewModels"%>
|
||||
<% Html.Title("Blogs"); %>
|
||||
<h1>Blogs</h1>
|
||||
<p>All of the blogs.</p><%
|
||||
if (Model.Blogs.Count() > 0) { %>
|
||||
|
@@ -3,6 +3,7 @@
|
||||
<%@ Import Namespace="Orchard.Blogs.Models"%>
|
||||
<%@ Import Namespace="Orchard.Blogs.ViewModels"%>
|
||||
<%@ Import Namespace="Orchard.Mvc.Html"%>
|
||||
<% Html.Title("Manage Blogs"); %>
|
||||
<h2>Manage Blogs</h2>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p><%
|
||||
if (Model.Blogs.Count() > 0) { %>
|
||||
|
@@ -1,6 +1,7 @@
|
||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<CreateBlogPostViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Mvc.Html"%>
|
||||
<%@ Import Namespace="Orchard.Blogs.ViewModels"%>
|
||||
<% Html.Title("Add Post"); %>
|
||||
<h2>Add Post</h2>
|
||||
<% using (Html.BeginFormAntiForgeryPost()) { %>
|
||||
<%=Html.ValidationSummary() %>
|
||||
|
@@ -1,6 +1,7 @@
|
||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BlogPostEditViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Mvc.Html"%>
|
||||
<%@ Import Namespace="Orchard.Blogs.ViewModels"%>
|
||||
<% Html.Title("Edit Post"); %>
|
||||
<h2>Edit Post</h2>
|
||||
<% using (Html.BeginFormAntiForgeryPost()) { %>
|
||||
<%=Html.ValidationSummary() %>
|
||||
|
@@ -1,4 +1,5 @@
|
||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BlogPostViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Mvc.Html"%>
|
||||
<%@ Import Namespace="Orchard.Blogs.ViewModels"%>
|
||||
<% Html.Title(Model.Blog.Name); %>
|
||||
<%=Html.DisplayForItem(m=>m.BlogPost) %>
|
@@ -3,7 +3,7 @@
|
||||
<%@ Import Namespace="Orchard.Blogs.Extensions"%>
|
||||
<%@ Import Namespace="Orchard.Blogs.Models"%>
|
||||
<%@ Import Namespace="Orchard.Models.ViewModels"%>
|
||||
<% Html.AddTitleParts(Model.Item.Name); %>
|
||||
<% Html.Title(Model.Item.Name); %>
|
||||
<div class="manage"><a href="<%=Url.BlogEdit(Model.Item.Slug) %>" class="ibutton edit">edit</a></div>
|
||||
<h1><%=Html.Encode(Model.Item.Name) %></h1>
|
||||
<div><%=Html.Encode(Model.Item.Description) %></div>
|
||||
|
@@ -3,6 +3,7 @@
|
||||
<%@ Import Namespace="Orchard.Models.ViewModels"%>
|
||||
<%@ Import Namespace="Orchard.Blogs.Extensions"%>
|
||||
<%@ Import Namespace="Orchard.Blogs.Models"%>
|
||||
<% Html.Title(Model.Item.Name); %>
|
||||
<%-- todo: (heskew) get what actions we can out of the h2 :| --%>
|
||||
<h2 class="withActions">
|
||||
<a href="<%=Url.BlogForAdmin(Model.Item.Slug) %>"><%=Html.Encode(Model.Item.Name) %></a>
|
||||
|
@@ -3,6 +3,7 @@
|
||||
<%@ Import Namespace="Orchard.Models.ViewModels"%>
|
||||
<%@ Import Namespace="Orchard.Blogs.Extensions"%>
|
||||
<%@ Import Namespace="Orchard.Blogs.Models"%>
|
||||
<% Html.Title(Model.Item.Title); %>
|
||||
<div class="manage"><a href="<%=Url.BlogPostEdit(Model.Item.Blog.Slug, Model.Item.Slug) %>" class="ibutton edit">edit</a></div>
|
||||
<h1><%=Html.Encode(Model.Item.Title)%></h1>
|
||||
<div class="metadata">
|
||||
|
@@ -2,5 +2,6 @@
|
||||
<%@ Import Namespace="Orchard.Models.ViewModels"%>
|
||||
<%@ Import Namespace="Orchard.Mvc.Html"%>
|
||||
<%@ Import Namespace="Orchard.Blogs.Models"%>
|
||||
<% Html.Title(Model.Item.Name); %>
|
||||
<%=Html.EditorZone("primary") %>
|
||||
<%=Html.EditorZonesAny() %>
|
@@ -2,6 +2,7 @@
|
||||
<%@ Import Namespace="Orchard.Models.ViewModels"%>
|
||||
<%@ Import Namespace="Orchard.Mvc.Html"%>
|
||||
<%@ Import Namespace="Orchard.Blogs.Models"%>
|
||||
<% Html.Title(Model.Item.Title); %>
|
||||
<div class="sections">
|
||||
<div class="primary">
|
||||
<%=Html.EditorZone("primary") %>
|
||||
|
@@ -15,7 +15,8 @@ namespace Orchard.UI.PageTitle {
|
||||
public void AddTitleParts(params string[] titleParts) {
|
||||
if (titleParts != null)
|
||||
foreach (string titlePart in titleParts)
|
||||
_titleParts.Add(titlePart);
|
||||
if (!string.IsNullOrEmpty(titlePart))
|
||||
_titleParts.Add(titlePart);
|
||||
}
|
||||
|
||||
public string GenerateTitle() {
|
||||
|
Reference in New Issue
Block a user