Gets tree syncing working, updates the GetApplicationTrees to still return a single Root since we require this everywhere for JS, fixes full screen section and makes users a full screen section (and reduces unecessary code), removes code to avoid breaking changes from v7
This commit is contained in:
@@ -33,39 +33,14 @@ namespace Umbraco.Web.Trees
|
||||
|
||||
protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings)
|
||||
{
|
||||
var nodes = new TreeNodeCollection();
|
||||
return nodes;
|
||||
//full screen app without tree nodes
|
||||
return TreeNodeCollection.Empty;
|
||||
}
|
||||
|
||||
protected override MenuItemCollection GetMenuForNode(string id, FormDataCollection queryStrings)
|
||||
{
|
||||
var menu = new MenuItemCollection();
|
||||
|
||||
if (id == Constants.System.Root.ToInvariantString())
|
||||
{
|
||||
//Create User
|
||||
var createMenuItem = menu.Items.CreateMenuItem<ActionNew>(Services.TextService.Localize("actions/create"));
|
||||
createMenuItem.Icon = "add";
|
||||
createMenuItem.NavigateToRoute("users/users/overview?subview=users&create=true");
|
||||
menu.Items.Add(createMenuItem);
|
||||
|
||||
//This is the same setting used in the global JS for 'showUserInvite'
|
||||
if (EmailSender.CanSendRequiredEmail)
|
||||
{
|
||||
//Invite User (Action import closest type of action to an invite user)
|
||||
var inviteMenuItem = menu.Items.CreateMenuItem<ActionImport>(Services.TextService.Localize("user/invite"));
|
||||
inviteMenuItem.Icon = "message-unopened";
|
||||
inviteMenuItem.NavigateToRoute("users/users/overview?subview=users&invite=true");
|
||||
|
||||
menu.Items.Add(inviteMenuItem);
|
||||
}
|
||||
|
||||
return menu;
|
||||
}
|
||||
|
||||
//There is no context menu options for editing a specific user
|
||||
//Also we no longer list each user in the tree & in theory never hit this
|
||||
return menu;
|
||||
//doesn't have a menu, this is a full screen app without tree nodes
|
||||
return MenuItemCollection.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user