Initial check in of some code that shows a list of blogs, a blog details page and can create a blog.

--HG--
extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4041601
This commit is contained in:
ErikPorter
2009-11-20 23:31:49 +00:00
parent 30800e7a02
commit 9ff20d7945
21 changed files with 318 additions and 20 deletions

View File

@@ -0,0 +1,9 @@
using Orchard.Models;
namespace Orchard.Blogs.Models {
public class Blog : ContentPartForRecord<BlogRecord> {
public string Name { get { return Record.Name; } }
public string Slug { get { return Record.Slug; } }
public bool Enabled { get { return Record.Enabled; } }
}
}

View File

@@ -0,0 +1,11 @@
using Orchard.Data;
using Orchard.Models.Driver;
namespace Orchard.Blogs.Models {
public class BlogHandler : ContentHandler {
public BlogHandler(IRepository<BlogRecord> repository) {
Filters.Add(new ActivatingFilter<Blog>("blog"));
Filters.Add(new StorageFilterForRecord<BlogRecord>(repository));
}
}
}

View File

@@ -0,0 +1,7 @@
using Orchard.Models;
namespace Orchard.Blogs.Models {
public class BlogPost : ContentPartForRecord<BlogPostRecord> {
}
}

View File

@@ -0,0 +1,11 @@
using Orchard.Data;
using Orchard.Models.Driver;
namespace Orchard.Blogs.Models {
public class BlogPostHandler : ContentHandler {
public BlogPostHandler(IRepository<BlogPostRecord> repository) {
Filters.Add(new ActivatingFilter<BlogPost>("blogpost"));
Filters.Add(new StorageFilterForRecord<BlogPostRecord>(repository));
}
}
}

View File

@@ -0,0 +1,8 @@
using Orchard.Models.Records;
namespace Orchard.Blogs.Models {
public class BlogPostRecord : ContentPartRecord {
public virtual BlogRecord Blog { get; set; }
public virtual string Slug { get; set; }
}
}

View File

@@ -0,0 +1,11 @@
using System.Collections.Generic;
using Orchard.Models.Records;
namespace Orchard.Blogs.Models {
public class BlogRecord : ContentPartRecord {
public virtual IEnumerable<BlogPostRecord> Posts { get; set; }
public virtual string Name { get; set; }
public virtual string Slug { get; set; }
public virtual bool Enabled { get; set; }
}
}