porting 7.6-rc1 into 8

This commit is contained in:
Stephan
2017-05-12 14:49:44 +02:00
parent ade6c2f057
commit 8561d85f7a
1148 changed files with 41983 additions and 17045 deletions

View File

@@ -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;
}
}
}