public static ResponseCollection Comment( this ResponseCollection res, Context context, SiteSettings ss, Column column, Comments comments, int deleteCommentId) { comments .Where(o => context.Forms.Exists("Comment" + o.CommentId)) .ForEach(comment => res.ReplaceAll( Selector(comment.CommentId), new HtmlBuilder().Comment( context: context, ss: ss, column: column, comment: comment, readOnly: false))); if (deleteCommentId != 0) { res .Remove(Selector(deleteCommentId)) .Focus("#Comments"); } return(res); }
public static ResponseCollection Comment( this ResponseCollection res, SiteSettings ss, Column column, Comments comments, int deleteCommentId) { comments .Where(o => Forms.Exists("Comment" + o.CommentId)) .ForEach(comment => res.ReplaceAll( Selector(comment.CommentId), new HtmlBuilder().Comment( ss: ss, column: column, comment: comment, verType: Versions.VerTypes.Latest))); if (deleteCommentId != 0) { res .Remove(Selector(deleteCommentId)) .Focus("#Comments"); } return(res); }
public static ResponseCollection RemoveComment( this ResponseCollection res, int commentId, bool _using) { return(_using ? res .Remove("#Comment" + commentId) .Focus("#Comments") : res); }