2016-09-01 19:06:08 +02:00
|
|
|
|
using Umbraco.Core.IO;
|
2017-05-30 18:13:11 +02:00
|
|
|
|
using Umbraco.Web.Composing;
|
2017-05-12 14:49:44 +02:00
|
|
|
|
using Umbraco.Web.Models.Trees;
|
2017-09-12 16:22:16 +02:00
|
|
|
|
using Umbraco.Web.Mvc;
|
|
|
|
|
|
using Umbraco.Web.WebApi.Filters;
|
|
|
|
|
|
using Constants = Umbraco.Core.Constants;
|
2016-03-30 16:07:45 +02:00
|
|
|
|
|
|
|
|
|
|
namespace Umbraco.Web.Trees
|
|
|
|
|
|
{
|
2017-07-20 11:21:28 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Tree for displaying partial view macros in the developer app
|
|
|
|
|
|
/// </summary>
|
2019-01-22 09:31:47 +01:00
|
|
|
|
[Tree(Constants.Applications.Settings, Constants.Trees.PartialViewMacros, SortOrder = 8, TreeGroup = Constants.Trees.Groups.Templating)]
|
2017-09-12 16:22:16 +02:00
|
|
|
|
[UmbracoTreeAuthorize(Constants.Trees.PartialViewMacros)]
|
|
|
|
|
|
[PluginController("UmbracoTrees")]
|
2019-01-22 09:31:47 +01:00
|
|
|
|
[CoreTree]
|
2017-07-20 11:21:28 +02:00
|
|
|
|
public class PartialViewMacrosTreeController : PartialViewsTreeController
|
|
|
|
|
|
{
|
|
|
|
|
|
protected override IFileSystem FileSystem => Current.FileSystems.MacroPartialsFileSystem;
|
2016-03-30 16:07:45 +02:00
|
|
|
|
|
2017-09-12 16:22:16 +02:00
|
|
|
|
private static readonly string[] ExtensionsStatic = {"cshtml"};
|
2017-05-12 14:49:44 +02:00
|
|
|
|
|
2017-07-20 11:21:28 +02:00
|
|
|
|
protected override string[] Extensions => ExtensionsStatic;
|
2017-05-12 14:49:44 +02:00
|
|
|
|
|
2017-07-20 11:21:28 +02:00
|
|
|
|
protected override string FileIcon => "icon-article";
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|