mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Getting the blogs admin UI back up and running
--HG-- branch : dev
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using JetBrains.Annotations;
|
||||
@@ -8,7 +7,6 @@ using Orchard.Blogs.Models;
|
||||
using Orchard.Blogs.Services;
|
||||
using Orchard.Blogs.ViewModels;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Core.Common.Models;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Mvc.Results;
|
||||
using Orchard.Settings;
|
||||
|
@@ -2,7 +2,6 @@ using JetBrains.Annotations;
|
||||
using Orchard.Blogs.Drivers;
|
||||
using Orchard.Blogs.Models;
|
||||
using Orchard.ContentManagement.Handlers;
|
||||
using Orchard.Core.Common.Models;
|
||||
using Orchard.Core.Routable.Models;
|
||||
using Orchard.Data;
|
||||
|
||||
@@ -11,7 +10,6 @@ namespace Orchard.Blogs.Handlers {
|
||||
public class BlogHandler : ContentHandler {
|
||||
public BlogHandler(IRepository<BlogRecord> repository) {
|
||||
Filters.Add(new ActivatingFilter<Blog>(BlogDriver.ContentType.Name));
|
||||
Filters.Add(new ActivatingFilter<CommonAspect>(BlogDriver.ContentType.Name));
|
||||
Filters.Add(new ActivatingFilter<IsRoutable>(BlogDriver.ContentType.Name));
|
||||
Filters.Add(StorageFilter.For(repository));
|
||||
}
|
||||
|
@@ -12,6 +12,11 @@ namespace Orchard.ContentManagement.Drivers {
|
||||
public string TemplateName { get; set; }
|
||||
|
||||
public override void Apply(BuildDisplayModelContext context) {
|
||||
//todo: (heskew)evaluate - for lack of having access to the full context in a driver to conditionally return results (e.g. BlogDriver item display is otherwise being overriden by the ContentPartDriver)
|
||||
if (!string.IsNullOrWhiteSpace(context.ViewModel.TemplateName)
|
||||
&& context.ViewModel.GetType() != typeof(ContentItemViewModel<TContent>))
|
||||
return;
|
||||
|
||||
context.ViewModel.TemplateName = TemplateName;
|
||||
if (context.ViewModel.GetType() != typeof(ContentItemViewModel<TContent>)) {
|
||||
context.ViewModel.Adaptor = (html, viewModel) => {
|
||||
|
Reference in New Issue
Block a user