mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-01-22 21:02:08 +08:00
* 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
37 lines
937 B
C#
37 lines
937 B
C#
using System.Collections.Generic;
|
|
using Orchard.Comments.Models;
|
|
using Orchard.Mvc.ViewModels;
|
|
|
|
namespace Orchard.Comments.ViewModels {
|
|
public class CommentsIndexViewModel : AdminViewModel {
|
|
public IList<CommentEntry> Comments { get; set; }
|
|
public CommentIndexOptions Options { get; set; }
|
|
}
|
|
|
|
public class CommentEntry {
|
|
public CommentRecord Comment { get; set; }
|
|
public string CommentedOn { get; set; }
|
|
public bool IsChecked { get; set; }
|
|
}
|
|
|
|
public class CommentIndexOptions {
|
|
public CommentIndexFilter Filter { get; set; }
|
|
public CommentIndexBulkAction BulkAction { get; set; }
|
|
}
|
|
|
|
public enum CommentIndexBulkAction {
|
|
None,
|
|
Pend,
|
|
Approve,
|
|
MarkAsSpam,
|
|
Delete
|
|
}
|
|
|
|
public enum CommentIndexFilter {
|
|
All,
|
|
Pending,
|
|
Approved,
|
|
Spam,
|
|
}
|
|
}
|