2016-09-01 19:06:08 +02:00
|
|
|
|
using Umbraco.Core.IO;
|
2016-03-30 16:07:45 +02:00
|
|
|
|
using Umbraco.Core;
|
2017-05-12 14:49:44 +02:00
|
|
|
|
using Umbraco.Web.Models.Trees;
|
2016-03-30 16:07:45 +02:00
|
|
|
|
|
|
|
|
|
|
namespace Umbraco.Web.Trees
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Tree for displaying partial view macros in the developer app
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Tree(Constants.Applications.Developer, Constants.Trees.PartialViewMacros, "Partial View Macro Files", sortOrder: 6)]
|
|
|
|
|
|
public class PartialViewMacrosTreeController : PartialViewsTreeController
|
|
|
|
|
|
{
|
2017-05-12 14:49:44 +02:00
|
|
|
|
protected override IFileSystem FileSystem => Current.FileSystems.MacroPartialsFileSystem;
|
2016-03-30 16:07:45 +02:00
|
|
|
|
|
2017-05-12 14:49:44 +02:00
|
|
|
|
private static readonly string[] ExtensionsStatic = { "cshtml" };
|
|
|
|
|
|
|
|
|
|
|
|
protected override string[] Extensions => ExtensionsStatic;
|
|
|
|
|
|
|
|
|
|
|
|
protected override string FileIcon => "icon-article";
|
|
|
|
|
|
|
|
|
|
|
|
protected override void OnRenderFolderNode(ref TreeNode treeNode)
|
2016-03-30 16:07:45 +02:00
|
|
|
|
{
|
2017-05-12 14:49:44 +02:00
|
|
|
|
//TODO: This isn't the best way to ensure a noop process for clicking a node but it works for now.
|
|
|
|
|
|
treeNode.AdditionalData["jsClickCallback"] = "javascript:void(0);";
|
2016-03-30 16:07:45 +02:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|