Ejemplo n.º 1
0
 public CommentFormDisplay(User user, Comment comment, PostDisplay post)
 {
     Post = post;
     User = user;
     Body = comment.Body;
     UserSubscribed = comment.UserSubscribed;
 }
Ejemplo n.º 2
0
 public CommentFormDisplay(User user, Comment comment, PostDisplay post)
 {
     Post           = post;
     User           = user;
     Body           = comment.Body;
     UserSubscribed = comment.UserSubscribed;
 }
Ejemplo n.º 3
0
 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 IAltOxitePage 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));
 }