mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Starting to get a UI around content type management
- added a DisplayName to the ContentTypeDefinition - added a CreateRouteValues rvd to go along with the existing display and edit - set default display, edit and create route values for ContentItemMetadata (* should get fallback route values in a different manner. probably not good to refer to an area, even by string, in core from the fwk) - starting to shape up the content type list into a more consistent UI - added create type action, view, etc. for creating new content types - supporting service has a few default parts hard-coded for now --HG-- branch : dev
This commit is contained in:
@@ -40,6 +40,9 @@ namespace Orchard.Blogs.Drivers {
|
||||
}
|
||||
|
||||
public override RouteValueDictionary GetDisplayRouteValues(BlogPost post) {
|
||||
if (post.Blog == null)
|
||||
return new RouteValueDictionary();
|
||||
|
||||
return new RouteValueDictionary {
|
||||
{"Area", "Orchard.Blogs"},
|
||||
{"Controller", "BlogPost"},
|
||||
@@ -50,6 +53,9 @@ namespace Orchard.Blogs.Drivers {
|
||||
}
|
||||
|
||||
public override RouteValueDictionary GetEditorRouteValues(BlogPost post) {
|
||||
if (post.Blog == null)
|
||||
return new RouteValueDictionary();
|
||||
|
||||
return new RouteValueDictionary {
|
||||
{"Area", "Orchard.Blogs"},
|
||||
{"Controller", "BlogPostAdmin"},
|
||||
@@ -59,6 +65,18 @@ namespace Orchard.Blogs.Drivers {
|
||||
};
|
||||
}
|
||||
|
||||
public override RouteValueDictionary GetCreateRouteValues(BlogPost post) {
|
||||
if (post.Blog == null)
|
||||
return new RouteValueDictionary();
|
||||
|
||||
return new RouteValueDictionary {
|
||||
{"Area", "Orchard.Blogs"},
|
||||
{"Controller", "BlogPostAdmin"},
|
||||
{"Action", "Create"},
|
||||
{"blogSlug", post.Blog.Slug},
|
||||
};
|
||||
}
|
||||
|
||||
protected override DriverResult Display(BlogPost post, string displayType) {
|
||||
return Combined(
|
||||
ContentItemTemplate("Items/Blogs.BlogPost").LongestMatch(displayType, "Summary", "SummaryAdmin"),
|
||||
|
Reference in New Issue
Block a user