String message = URLEncoder.encode("Do you really want to delete the group " + URLEncoder.encode(this.groupName, URIEncoding), URIEncoding);
String encodedGroupName = URLEncoder.encode(URLEncoder.encode(this.groupName, URIEncoding), URIEncoding);
InfoGlueGroup group = GroupControllerProxy.getController().getGroup(this.groupName);
if(group.getAutorizationModule().getSupportDelete())
buttons.add(new ImageButton("Confirm.action?header=tool.managementtool.deleteGroup.header&yesDestination=" + yesDestination + "&noDestination=" + noDestination + "&message=tool.managementtool.deleteGroup.text&extraParameters=" + encodedGroupName, getLocalizedString(getSession().getLocale(), "images.managementtool.buttons.deleteGroup"), "tool.managementtool.deleteGroup.header"));
List contentTypeDefinitionVOList = GroupPropertiesController.getController().getContentTypeDefinitionVOList(this.groupName);
if(contentTypeDefinitionVOList.size() > 0)
buttons.add(new ImageButton("ViewGroupProperties.action?groupName=" + encodedGroupName, getLocalizedString(getSession().getLocale(), "images.managementtool.buttons.viewGroupProperties"), "View Group Properties"));
if(this.getInfoGluePrincipal().getIsAdministrator())
buttons.add(new ImageButton("AuthorizationSwitchManagement!inputGroup.action?groupName=" + encodedGroupName, getLocalizedString(getSession().getLocale(), "images.managementtool.buttons.transferGroupAccessRights"), "Transfer Groups Access Rights"));
boolean hasAccessToManageAllAccessRights = this.hasAccessTo("Group.ManageAllAccessRights", true);
boolean hasAccessToManageAccessRights = this.hasAccessTo("Group.ManageAccessRights", "" + this.groupName);
if(hasAccessToManageAllAccessRights || hasAccessToManageAccessRights)
buttons.add(new ImageButton("ViewAccessRights.action?interceptionPointCategory=Group&extraParameters=" + encodedGroupName + "&returnAddress=ViewGroup.action?groupName=" + encodedGroupName + "&colorScheme=ManagementTool", getLocalizedString(getSession().getLocale(), "images.managementtool.buttons.accessRights"), "Group Access Rights"));
return buttons;
}