# Conflicts: # src/Umbraco.Core/Services/MediaService.cs # src/Umbraco.Web/Trees/PartialViewMacrosTree.cs # src/Umbraco.Web/Trees/PartialViewsTree.cs Fix some menu tree header won't be translated. This may be caused by the explicit definition of tree node name. Add missing translation item for en.xml and zh.xml
37 lines
1.1 KiB
C#
37 lines
1.1 KiB
C#
using Umbraco.Core;
|
|
using Umbraco.Core.IO;
|
|
using Umbraco.Web.Models.Trees;
|
|
|
|
namespace Umbraco.Web.Trees
|
|
{
|
|
/// <summary>
|
|
/// Tree for displaying partial view macros in the developer app
|
|
/// </summary>
|
|
[Tree(Constants.Applications.Developer, "partialViewMacros", "", sortOrder: 6)]
|
|
public class PartialViewMacrosTreeController : FileSystemTreeController
|
|
{
|
|
protected override IFileSystem2 FileSystem
|
|
{
|
|
get { return FileSystemProviderManager.Current.MacroPartialsFileSystem; }
|
|
}
|
|
|
|
private static readonly string[] ExtensionsStatic = { "cshtml" };
|
|
|
|
protected override string[] Extensions
|
|
{
|
|
get { return ExtensionsStatic; }
|
|
}
|
|
|
|
protected override string FileIcon
|
|
{
|
|
get { return "icon-article"; }
|
|
}
|
|
|
|
protected override void OnRenderFolderNode(ref TreeNode treeNode)
|
|
{
|
|
//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);";
|
|
}
|
|
}
|
|
}
|