mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Blogs UI work (small CSS/markup changes and tmp masters for the public views)
--HG-- extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4042280
This commit is contained in:
@@ -74,7 +74,7 @@ namespace Orchard.Blogs.Controllers {
|
||||
var session = _sessionLocator.For(typeof(BlogPostRecord));
|
||||
session.Flush();
|
||||
|
||||
return Redirect(Url.BlogPostEdit(blogSlug, blogPost.As<RoutableAspect>().Slug));
|
||||
return Redirect(Url.BlogPost(blogSlug, blogPost.As<RoutableAspect>().Slug));
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,6 +1,10 @@
|
||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Blog>" %>
|
||||
<%@ Import Namespace="Orchard.Blogs.Extensions"%>
|
||||
<%@ Import Namespace="Orchard.Blogs.Models"%>
|
||||
<h3><a href="<%=Url.BlogEdit(Model.Slug) %>"><%=Html.Encode(Model.Name) %></a> <span>(<a href="<%=Url.Blog(Model.Slug) %>">view</a>)</span> <span>(<a href="<%=Url.BlogPostCreate(Model.Slug) %>">post</a>)</span></h3>
|
||||
<h3>
|
||||
<a href="<%=Url.BlogEdit(Model.Slug) %>"><%=Html.Encode(Model.Name) %></a>
|
||||
<span>(<a href="<%=Url.Blog(Model.Slug) %>">view</a>)</span>
|
||||
<span>(<a href="<%=Url.BlogPostCreate(Model.Slug) %>">create post</a>)</span>
|
||||
</h3>
|
||||
<p>[list of authors] [modify blog access]</p>
|
||||
<p><%=Model.Description %></p>
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<BlogViewModel>" %>
|
||||
<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<BlogViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Core.Common.Models"%>
|
||||
<%@ Import Namespace="Orchard.Models"%>
|
||||
<%@ Import Namespace="Orchard.Blogs.Extensions"%>
|
||||
@@ -6,17 +6,16 @@
|
||||
<%@ Import Namespace="Orchard.Blogs.Models"%>
|
||||
<%@ Import Namespace="Orchard.Mvc.Html"%>
|
||||
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
|
||||
<% Html.Include("Header"); %>
|
||||
<div class="yui-g">
|
||||
<h2>Blog</h2>
|
||||
<div><%=Html.Encode(Model.Blog.Name) %></div><%
|
||||
//TODO: (erikpo) Move this into a helper
|
||||
if (Model.Posts.Count() > 0) { %>
|
||||
<ul><%
|
||||
foreach (BlogPost post in Model.Posts) { %>
|
||||
<li><a href="<%=Url.BlogPost(Model.Blog.Slug, post.As<RoutableAspect>().Slug) %>"><%=Html.Encode(post.As<RoutableAspect>().Title) %></a></li><%
|
||||
} %>
|
||||
</ul><%
|
||||
<%-- todo: (heskew) make master-less when we get into theming --%>
|
||||
<asp:Content ContentPlaceHolderID="MainContent" runat="server">
|
||||
<h2>Blog</h2>
|
||||
<div><%=Html.Encode(Model.Blog.Name) %></div><%
|
||||
//TODO: (erikpo) Move this into a helper
|
||||
if (Model.Posts.Count() > 0) { %>
|
||||
<ul><%
|
||||
foreach (BlogPost post in Model.Posts) { %>
|
||||
<li><a href="<%=Url.BlogPost(Model.Blog.Slug, post.As<RoutableAspect>().Slug) %>"><%=Html.Encode(post.As<RoutableAspect>().Title) %></a></li><%
|
||||
} %>
|
||||
</div>
|
||||
<% Html.Include("Footer"); %>
|
||||
</ul><%
|
||||
} %>
|
||||
</asp:Content>
|
@@ -13,6 +13,8 @@
|
||||
<span><%=Html.TextBoxFor(m => m.Slug, new { id = "permalink", @class = "text" })%> <span> « How to write a permalink. » </span></span>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<label for="body">Excerpt:</label>
|
||||
<span>[still needed]</span>
|
||||
<label for="body">Body:</label>
|
||||
<span><%=Html.TextAreaFor(m => m.Body, new { id = "body", @class = "html" })%></span>
|
||||
</fieldset>
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<BlogPostViewModel>" %>
|
||||
<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<BlogPostViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Core.Common.Models"%>
|
||||
<%@ Import Namespace="Orchard.Models"%>
|
||||
<%@ Import Namespace="Orchard.Blogs.Extensions"%>
|
||||
@@ -6,10 +6,9 @@
|
||||
<%@ Import Namespace="Orchard.Blogs.Models"%>
|
||||
<%@ Import Namespace="Orchard.Mvc.Html"%>
|
||||
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
|
||||
<% Html.Include("Header"); %>
|
||||
<div class="yui-g">
|
||||
<h2><%=Html.Encode(Model.Post.Title) %></h2>
|
||||
<div>Posted by <%=Html.Encode(Model.Post.Creator.UserName) %> on {M d yyyy h:mm tt}</div>
|
||||
<%=Model.Post.Body %>
|
||||
</div>
|
||||
<% Html.Include("Footer"); %>
|
||||
<%-- todo: (heskew) make master-less when we get into theming --%>
|
||||
<asp:Content ContentPlaceHolderID="MainContent" runat="server">
|
||||
<h2><%=Html.Encode(Model.Post.Title) %></h2>
|
||||
<div>Posted by <%=Html.Encode(Model.Post.Creator.UserName) %> on {M d yyyy h:mm tt}</div>
|
||||
<%=Model.Post.Body %>
|
||||
</asp:Content>
|
Reference in New Issue
Block a user