public static string PublishedPost(this IUrlResolver resolver, PostDisplay post) { // TODO: _resolver.UrlFor<BlogController>() + "/" + ...; return ("~/blog/" + post.Published.Year + "/" + post.Published.Month + "/" + post.Published.Day + "/" + post.Slug).ToFullUrl(); }
public static string GetCommentsText(this IFohjinPage viewPage, PostDisplay post) { var commentCount = (post.Comments == null) ? 0 : post.Comments.Count(); return "<a href=\"{0}#comments\">{1}</a>" .ToFormat( viewPage.UrlTo().PublishedPost(post), (commentCount == 1) ? "{0} comment".ToFormat(commentCount) : "{0} comments".ToFormat(commentCount)); }
public CommentFormDisplay(Comment comment, PostDisplay postDisplay) { Post = postDisplay; DisplayName = comment.User.DisplayName; Email = comment.User.Email; OptionalUrl = comment.User.Url; Subscribed = comment.UserSubscribed; Remember = comment.User.Remember; Body = comment.Body; Question = new CaptchaGeneator() .ConfigureToUse(CaptchaOpperator.Add) .ConfigureToUse(CaptchaOpperator.Subtract) .ToString(); Answer = ""; OptionalTwitterUserName = comment.User.TwitterUserName; }
public BlogPostLinkDisplay(Post post) { Post = new PostDisplay(post); }
public BlogPostLinkDisplay(Post post) { Post = new PostDisplay(post); }