Files
Orchard/src/Orchard.Web/Packages/Orchard.DevTools/Models/DebugLinkHandler.cs
loudej 2b2380c8cc Adding a mini-addon to devtools to show the contenttype, id, and link to the dev-details page for the item.
--HG--
extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4041465
2009-11-19 23:58:59 +00:00

24 lines
786 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Orchard.Models;
using Orchard.Models.Driver;
using Orchard.UI.Models;
namespace Orchard.DevTools.Models {
public class ShowDebugLink {
public ContentItem ContentItem { get; set; }
}
public class DebugLinkHandler : ContentHandler {
protected override void GetDisplays(GetDisplaysContext context) {
context.Displays.Add(new ModelTemplate { Model = new ShowDebugLink { ContentItem = context.ContentItem } });
}
protected override void GetEditors(GetEditorsContext context) {
context.Editors.Add(new ModelTemplate { Model = new ShowDebugLink { ContentItem = context.ContentItem } });
}
}
}