Files
Orchard/src/Orchard.Web/Packages/Orchard.Comments/Models/HasComments.cs
rpaquay 308f4f089b Make "Comment" a content type and enable comment count at blog container level
* Fix bug where closing comments multiple times would result in inconsistent database.
* Rename a few classes/fields in Comments module to follow coding convention (Record suffix, Utc suffix for dates)
* Move classes to their own file
* Create a HasCommentContainer handler to enable displaying comment counts (approved/pending) for container (i.e. blog)

--HG--
extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4045899
2010-01-23 23:21:08 +00:00

26 lines
809 B
C#

using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using Orchard.ContentManagement;
namespace Orchard.Comments.Models {
public class HasComments : ContentPart<HasCommentsRecord> {
public HasComments() {
Comments = new List<Comment>();
PendingComments = new List<Comment>();
}
public IList<Comment> Comments { get; set; }
public IList<Comment> PendingComments { get; set; }
public bool CommentsShown {
get { return Record.CommentsShown; }
set { Record.CommentsShown = value; }
}
public bool CommentsActive {
get { return Record.CommentsActive; }
set { Record.CommentsActive = value; }
}
}
}