Adding a themed blog post permalink page to the Orange theme as part of getting an idea/example of the current state of theming

--HG--
extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4045344
This commit is contained in:
skewed
2010-01-13 18:24:46 +00:00
parent f4e1f829c7
commit 4736fa5e6f
3 changed files with 25 additions and 2 deletions

View File

@@ -177,6 +177,7 @@
<Content Include="Themes\Green\Views\footer.ascx" />
<Content Include="Themes\Green\Views\layout.ascx" />
<Content Include="Themes\Green\Views\menu.ascx" />
<Content Include="Themes\Orange\Views\Orchard.Blogs\BlogPost\Item.ascx" />
<Content Include="Themes\TheAdmin\Views\menu.ascx" />
<Content Include="Themes\TheAdmin\Views\user.ascx" />
<Content Include="Themes\TheAdmin\Views\header.ascx" />

View File

@@ -9,8 +9,8 @@ if (Model.CommentsActive == false) { %>
<% using(Html.BeginForm("Create", "Admin", new { area = "Orchard.Comments" }, FormMethod.Post, new { @class = "comment" })) { %>
<%=Html.ValidationSummary() %>
<fieldset class="who">
<%= Html.Hidden("CommentedOn", Model.ContentItem.Id) %>
<%= Html.Hidden("ReturnUrl", Context.Request.Url) %>
<%=Html.Hidden("CommentedOn", Model.ContentItem.Id) %>
<%=Html.Hidden("ReturnUrl", Context.Request.Url) %>
<div>
<label for="Name"><%=_Encoded("Name") %></label>
<input id="Name" class="text" name="Name" type="text" />

View File

@@ -0,0 +1,22 @@
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<BlogPostViewModel>" %>
<%@ Import Namespace="Orchard.Core.Common.ViewModels"%>
<%@ Import Namespace="Orchard.Core.Common.Models"%>
<%@ Import Namespace="Orchard.ContentManagement"%>
<%@ Import Namespace="Orchard.Comments.Models"%>
<%@ Import Namespace="Orchard.Blogs.Extensions"%>
<%@ Import Namespace="Orchard.Blogs.ViewModels"%>
<%
Html.AddTitleParts(Model.Blog.Name);
var blogPost = Model.BlogPost.Item;
var bodyViewModelModel = new BodyDisplayViewModel { BodyAspect = blogPost.ContentItem.As<BodyAspect>() };
var hasComments = blogPost.ContentItem.As<HasComments>(); %>
<div class="manage"><a href="<%=Url.BlogPostEdit(blogPost.Blog.Slug, blogPost.Slug) %>" class="ibutton edit"><%=_Encoded("edit") %></a></div>
<h1><%=Html.TitleForPage(blogPost.Title)%></h1>
<div class="metadata">
<% if (blogPost.Creator != null) {
%><div class="posted"><%=_Encoded("Posted by {0} {1}", blogPost.Creator.UserName, Html.PublishedWhen(blogPost))%></div><%
} %>
<%=Html.Link(T(hasComments.CommentCount == 1 ? "{0} comment" : "{0} comments", hasComments.CommentCount).ToString(), "#comments")%>
</div>
<%=Html.DisplayFor(m => bodyViewModelModel, "Parts/Common.Body")%>
<%=Html.DisplayFor(m => hasComments, "Parts/Comments.HasComments", "") %>