Skip to content

Commit

Permalink
Merge pull request #5379 from jay-hodgson/SWC-6824
Browse files Browse the repository at this point in the history
  • Loading branch information
jay-hodgson authored May 8, 2024
2 parents 67034f0 + 2f11294 commit 54bb40b
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,7 @@ private void reconfigureActions() {
configureChangeStorageLocation();
configureCreateOrUpdateDoi();
configureEditProjectMetadataAction();
configureProjectHelpAction();
configureEditFileMetadataAction();
configureTableCommands();
configureProjectLevelTableCommands();
Expand Down Expand Up @@ -1549,6 +1550,15 @@ private void configureEditProjectMetadataAction() {
}
}

private void configureProjectHelpAction() {
boolean isProject = entityBundle.getEntity() instanceof Project;
actionMenu.setActionVisible(Action.PROJECT_HELP, isProject);
actionMenu.setActionHref(
Action.PROJECT_HELP,
"https://sagebionetworks.jira.com/servicedesk/customer/portal/9"
);
}

private void configureEditFileMetadataAction() {
if (entityBundle.getEntity() instanceof FileEntity) {
actionMenu.setActionVisible(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,5 @@ public enum Action {
DOWNLOAD_FILE,
ADD_TO_DOWNLOAD_CART,
SHOW_PROGRAMMATIC_OPTIONS,
PROJECT_HELP,
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ private static Map<Action, ActionConfiguration> createMap() {
Action.EDIT_PROJECT_METADATA,
"Edit Project Metadata"
),
ActionConfiguration.create(Action.PROJECT_HELP, "Project Support"),
ActionConfiguration.create(
Action.SHOW_PROJECT_STATS,
"Show Project Statistics"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,11 @@ public static EntityActionMenuLayout getLayout(EntityType entityType) {
layout.setPrimaryMenuText(
EntityTypeUtils.getDisplayName(entityType) + TOOLS_SUFFIX
);
layout.setButtonActions(
Arrays.asList(
ActionViewProps.create(Action.PROJECT_HELP, "helpChatBubble")
)
);
layout.setPrimaryMenuActions(
Arrays.asList(
Arrays.asList(
Expand Down
3 changes: 2 additions & 1 deletion src/main/webapp/sass/_core.scss
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,8 @@ a:focus {
}
button.toolsMenuButton,
.dropdown.open,
.MuiButton-root {
.MuiButton-root,
.MuiIconButton-root {
@include transparent-button();
}
}
Expand Down

0 comments on commit 54bb40b

Please sign in to comment.