|
10 | 10 | using umbraco.cms.businesslogic.template;
|
11 | 11 | using Umbraco.Web.Models.Trees;
|
12 | 12 |
|
13 |
| -namespace Umbraco.Web.Trees |
14 |
| -{ |
15 |
| - [UmbracoApplicationAuthorize(Constants.Applications.Settings)] |
16 |
| - [Tree(Constants.Applications.Settings, Constants.Trees.Templates, "Templates")] |
17 |
| - [PluginController("UmbracoTrees")] |
18 |
| - [CoreTree] |
19 |
| - public class TemplateTreeController : TreeController |
20 |
| - { |
21 |
| - protected override Models.Trees.MenuItemCollection GetMenuForNode(string id, System.Net.Http.Formatting.FormDataCollection queryStrings) |
22 |
| - { |
23 |
| - return new Models.Trees.MenuItemCollection(); |
24 |
| - } |
25 |
| - |
26 |
| - protected override Models.Trees.TreeNodeCollection GetTreeNodes(string id, System.Net.Http.Formatting.FormDataCollection queryStrings) |
27 |
| - { |
28 |
| - IEnumerable<Umbraco.Core.Models.EntityBase.IUmbracoEntity> templates; |
29 |
| - var nodes = new TreeNodeCollection(); |
30 |
| - |
31 |
| - |
32 |
| - if (id == "-1") |
33 |
| - templates = Services.EntityService.GetRootEntities(Core.Models.UmbracoObjectTypes.Template); |
34 |
| - else |
35 |
| - templates = Services.EntityService.GetChildren(int.Parse(id), Core.Models.UmbracoObjectTypes.Template); |
36 |
| - |
37 |
| - foreach (var t in templates) |
38 |
| - { |
39 |
| - var node = CreateTreeNode(t.Id.ToString(), t.ParentId.ToString(), queryStrings, t.Name); |
40 |
| - node.Icon = "icon-newspaper-alt"; |
41 |
| - node.HasChildren = Services.EntityService.GetChildren(t.Id, Core.Models.UmbracoObjectTypes.Template).Any(); |
42 |
| - |
43 |
| - if (node.HasChildren) |
44 |
| - node.Icon = "icon-newspaper"; |
45 |
| - |
46 |
| - nodes.Add(node); |
47 |
| - } |
48 |
| - |
49 |
| - return nodes; |
50 |
| - } |
51 |
| - } |
52 |
| -} |
| 13 | +//namespace Umbraco.Web.Trees |
| 14 | +//{ |
| 15 | +// [UmbracoApplicationAuthorize(Constants.Applications.Settings)] |
| 16 | +// [Tree(Constants.Applications.Settings, Constants.Trees.Templates, "Templates")] |
| 17 | +// [PluginController("UmbracoTrees")] |
| 18 | +// [CoreTree] |
| 19 | +// public class TemplateTreeController : TreeController |
| 20 | +// { |
| 21 | +// protected override Models.Trees.MenuItemCollection GetMenuForNode(string id, System.Net.Http.Formatting.FormDataCollection queryStrings) |
| 22 | +// { |
| 23 | +// return new Models.Trees.MenuItemCollection(); |
| 24 | +// } |
| 25 | + |
| 26 | +// protected override Models.Trees.TreeNodeCollection GetTreeNodes(string id, System.Net.Http.Formatting.FormDataCollection queryStrings) |
| 27 | +// { |
| 28 | +// IEnumerable<Umbraco.Core.Models.EntityBase.IUmbracoEntity> templates; |
| 29 | +// var nodes = new TreeNodeCollection(); |
| 30 | + |
| 31 | + |
| 32 | +// if (id == "-1") |
| 33 | +// templates = Services.EntityService.GetRootEntities(Core.Models.UmbracoObjectTypes.Template); |
| 34 | +// else |
| 35 | +// templates = Services.EntityService.GetChildren(int.Parse(id), Core.Models.UmbracoObjectTypes.Template); |
| 36 | + |
| 37 | +// foreach (var t in templates) |
| 38 | +// { |
| 39 | +// var node = CreateTreeNode(t.Id.ToString(), t.ParentId.ToString(), queryStrings, t.Name); |
| 40 | +// node.Icon = "icon-newspaper-alt"; |
| 41 | +// node.HasChildren = Services.EntityService.GetChildren(t.Id, Core.Models.UmbracoObjectTypes.Template).Any(); |
| 42 | + |
| 43 | +// if (node.HasChildren) |
| 44 | +// node.Icon = "icon-newspaper"; |
| 45 | + |
| 46 | +// nodes.Add(node); |
| 47 | +// } |
| 48 | + |
| 49 | +// return nodes; |
| 50 | +// } |
| 51 | +// } |
| 52 | +//} |
0 commit comments