porting 7.6-rc1 into 8
This commit is contained in:
@@ -46,7 +46,9 @@ namespace Umbraco.Web.Trees
|
||||
template.Name,
|
||||
template.IsMasterTemplate ? "icon-newspaper" : "icon-newspaper-alt",
|
||||
template.IsMasterTemplate,
|
||||
GetEditorPath(template, queryStrings))));
|
||||
GetEditorPath(template, queryStrings),
|
||||
Udi.Create(UmbracoObjectTypesExtensions.GetUdiType(Constants.ObjectTypes.TemplateTypeGuid), template.Key)
|
||||
)));
|
||||
|
||||
return nodes;
|
||||
}
|
||||
@@ -61,14 +63,12 @@ namespace Umbraco.Web.Trees
|
||||
{
|
||||
var menu = new MenuItemCollection();
|
||||
|
||||
//Create the normal create action
|
||||
var item = menu.Items.Add<ActionNew>(Services.TextService.Localize("actions", ActionNew.Instance.Alias));
|
||||
item.NavigateToRoute(string.Format("{0}/templates/edit/{1}?create=true", queryStrings.GetValue<string>("application"), id));
|
||||
|
||||
if (id == Constants.System.Root.ToInvariantString())
|
||||
{
|
||||
//Create the normal create action
|
||||
menu.Items.Add<ActionNew>(Services.TextService.Localize("actions", ActionNew.Instance.Alias))
|
||||
//Since we haven't implemented anything for templates in angular, this needs to be converted to
|
||||
//use the legacy format
|
||||
.ConvertLegacyMenuItem(null, "inittemplates", queryStrings.GetValue<string>("application"));
|
||||
|
||||
//refresh action
|
||||
menu.Items.Add<RefreshNode, ActionRefresh>(Services.TextService.Localize("actions", ActionRefresh.Instance.Alias), true);
|
||||
|
||||
@@ -79,12 +79,6 @@ namespace Umbraco.Web.Trees
|
||||
if (template == null) return new MenuItemCollection();
|
||||
var entity = FromTemplate(template);
|
||||
|
||||
//Create the create action for creating sub layouts
|
||||
menu.Items.Add<ActionNew>(Services.TextService.Localize("actions", ActionNew.Instance.Alias))
|
||||
//Since we haven't implemented anything for templates in angular, this needs to be converted to
|
||||
//use the legacy format
|
||||
.ConvertLegacyMenuItem(entity, "templates", queryStrings.GetValue<string>("application"));
|
||||
|
||||
//don't allow delete if it has child layouts
|
||||
if (template.IsMasterTemplate == false)
|
||||
{
|
||||
@@ -125,8 +119,7 @@ namespace Umbraco.Web.Trees
|
||||
return Services.FileService.DetermineTemplateRenderingEngine(template) == RenderingEngine.WebForms
|
||||
? "/" + queryStrings.GetValue<string>("application") + "/framed/" +
|
||||
Uri.EscapeDataString("settings/editTemplate.aspx?templateID=" + template.Id)
|
||||
: "/" + queryStrings.GetValue<string>("application") + "/framed/" +
|
||||
Uri.EscapeDataString("settings/Views/EditView.aspx?treeType=" + Constants.Trees.Templates + "&templateID=" + template.Id);
|
||||
: null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user