2009-12-02 00:50:38 +00:00
|
|
|
using Orchard.Data;
|
2009-12-21 20:29:53 +00:00
|
|
|
using Orchard.ContentManagement.Handlers;
|
2009-12-02 00:50:38 +00:00
|
|
|
|
|
|
|
namespace Orchard.Comments.Models {
|
2009-12-08 10:34:03 +00:00
|
|
|
public class CommentSettingsHandler : ContentHandler {
|
2009-12-02 00:50:38 +00:00
|
|
|
private readonly IRepository<CommentSettingsRecord> _commentSettingsRepository;
|
|
|
|
|
2009-12-08 10:34:03 +00:00
|
|
|
public CommentSettingsHandler(IRepository<CommentSettingsRecord> repository) {
|
2009-12-02 00:50:38 +00:00
|
|
|
_commentSettingsRepository = repository;
|
2010-01-27 02:30:04 +00:00
|
|
|
|
2009-12-02 00:50:38 +00:00
|
|
|
Filters.Add(new ActivatingFilter<CommentSettings>("site"));
|
2010-01-24 07:46:16 +00:00
|
|
|
Filters.Add(StorageFilter.For(_commentSettingsRepository));
|
2009-12-21 08:24:39 +00:00
|
|
|
Filters.Add(new TemplateFilterForRecord<CommentSettingsRecord>("CommentSettings", "Parts/Comments.SiteSettings"));
|
2009-12-02 00:50:38 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|