diff --git a/cypress/e2e/collection-page.cy.ts b/cypress/e2e/collection-page.cy.ts index fae53da0414..4843272b6a1 100644 --- a/cypress/e2e/collection-page.cy.ts +++ b/cypress/e2e/collection-page.cy.ts @@ -1,9 +1,11 @@ import { testA11y } from 'cypress/support/utils'; +const COLLECTION_PAGE = '/collections/'.concat(Cypress.expose('DSPACE_TEST_COLLECTION')); + describe('Collection Page', () => { it('should pass accessibility tests', () => { - cy.visit('/collections/'.concat(Cypress.expose('DSPACE_TEST_COLLECTION'))); + cy.visit(COLLECTION_PAGE); // tag must be loaded cy.get('ds-collection-page').should('be.visible'); @@ -12,3 +14,46 @@ describe('Collection Page', () => { testA11y('ds-collection-page'); }); }); + +describe('Collection Page -> Collection-edit menu', () => { + beforeEach(() => { + cy.visit(COLLECTION_PAGE); + // Open login menu in header & verify tag is visible + cy.get('[data-test="login-menu"]').click(); + cy.get('.form-login').should('be.visible'); + + // Login, and the tag should no longer exist + cy.env(['DSPACE_TEST_ADMIN_USER', 'DSPACE_TEST_ADMIN_PASSWORD']).then(({ DSPACE_TEST_ADMIN_USER, DSPACE_TEST_ADMIN_PASSWORD }) => { + cy.loginViaForm(DSPACE_TEST_ADMIN_USER, DSPACE_TEST_ADMIN_PASSWORD); + }); + cy.get('ds-log-in').should('not.exist'); + }); + + it('Edit menu should exist for admins.', () => { + // tag must be loaded + cy.get('ds-dso-edit-menu').should('be.visible'); + }); +}); + +describe('Collection Page -> Submit-item button', () => { + beforeEach(() => { + cy.visit(COLLECTION_PAGE); + // Open login menu in header & verify tag is visible + cy.get('[data-test="login-menu"]').click(); + cy.get('.form-login').should('be.visible'); + + // Login, and the tag should no longer exist + cy.env(['DSPACE_TEST_SUBMIT_USER', 'DSPACE_TEST_SUBMIT_USER_PASSWORD']).then(({ DSPACE_TEST_SUBMIT_USER, DSPACE_TEST_SUBMIT_USER_PASSWORD }) => { + cy.loginViaForm(DSPACE_TEST_SUBMIT_USER, DSPACE_TEST_SUBMIT_USER_PASSWORD); + }); + cy.get('ds-log-in').should('not.exist'); + }); + + it('Submit item button should exist for submitters on collection pages.', () => { + // Open the Options menu and verify the Submit item entry is available + //cy.get('ds-dso-edit-menu a[aria-label="Options"]').click(); + cy.get(`ds-dso-edit-menu a[href="/submit?collection=${Cypress.expose('DSPACE_TEST_COLLECTION')}"]`) + .should('be.visible') + .and('contain', 'Submit item'); + }); +}); diff --git a/cypress/e2e/community-page.cy.ts b/cypress/e2e/community-page.cy.ts index 8ccc97d63cb..be5474d52c5 100644 --- a/cypress/e2e/community-page.cy.ts +++ b/cypress/e2e/community-page.cy.ts @@ -1,9 +1,12 @@ import { testA11y } from 'cypress/support/utils'; +const COMMUNITY_PAGE = '/communities/'.concat(Cypress.expose('DSPACE_TEST_COMMUNITY')); + + describe('Community Page', () => { it('should pass accessibility tests', () => { - cy.visit('/communities/'.concat(Cypress.expose('DSPACE_TEST_COMMUNITY'))); + cy.visit(COMMUNITY_PAGE); // tag must be loaded cy.get('ds-community-page').should('be.visible'); @@ -12,3 +15,35 @@ describe('Community Page', () => { testA11y('ds-community-page'); }); }); + + +describe('Community Page -> Community-edit menu', () => { + beforeEach(() => { + cy.visit(COMMUNITY_PAGE); + // Open login menu in header & verify tag is visible + cy.get('[data-test="login-menu"]').click(); + cy.get('.form-login').should('be.visible'); + + // Login, and the tag should no longer exist + cy.env(['DSPACE_TEST_ADMIN_USER', 'DSPACE_TEST_ADMIN_PASSWORD']).then(({ DSPACE_TEST_ADMIN_USER, DSPACE_TEST_ADMIN_PASSWORD }) => { + cy.loginViaForm(DSPACE_TEST_ADMIN_USER, DSPACE_TEST_ADMIN_PASSWORD); + }); + cy.get('ds-log-in').should('not.exist'); + }); + + it('Edit menu should exist for admins.', () => { + // tag must be loaded + cy.get('ds-dso-edit-menu').should('be.visible'); + }); + + it('Options menu should include Add-Community and Add Collections Buttons.', () => { + // Open the Options menu and verify the Add Community and Add Collection entries are available + cy.get('ds-dso-edit-menu button[aria-label="Options"]').click(); + cy.get('[data-test="link-menu-item.community.add.sub-community"]') + .should('be.visible') + .and('contain', 'Add Community'); + cy.get('[data-test="link-menu-item.community.add.sub-collection"]') + .should('be.visible') + .and('contain', 'Add Collection'); + }); +}); diff --git a/src/app/app.menus.ts b/src/app/app.menus.ts index 73190c57caf..1fc4c5aebde 100644 --- a/src/app/app.menus.ts +++ b/src/app/app.menus.ts @@ -9,6 +9,7 @@ import { buildMenuStructure } from './shared/menu/menu.structure'; import { MenuID } from './shared/menu/menu-id.model'; import { MenuRoute } from './shared/menu/menu-route.model'; import { AccessControlMenuProvider } from './shared/menu/providers/access-control.menu'; +import { AddSubComColMenuProvider } from './shared/menu/providers/add-sub-com-col.menu'; import { AdminSearchMenuProvider } from './shared/menu/providers/admin-search.menu'; import { AuditLogsMenuProvider } from './shared/menu/providers/audit-item.menu'; import { AuditOverviewMenuProvider } from './shared/menu/providers/audit-overview.menu'; @@ -36,6 +37,7 @@ import { NotificationsMenuProvider } from './shared/menu/providers/notifications import { ProcessesMenuProvider } from './shared/menu/providers/processes.menu'; import { RegistriesMenuProvider } from './shared/menu/providers/registries.menu'; import { StatisticsMenuProvider } from './shared/menu/providers/statistics.menu'; +import { SubmitNewItemMenuProvider } from './shared/menu/providers/submit-new-item.menu'; import { SystemWideAlertMenuProvider } from './shared/menu/providers/system-wide-alert.menu'; import { WithdrawnReinstateItemMenuProvider } from './shared/menu/providers/withdrawn-reinstate-item.menu'; import { WorkflowMenuProvider } from './shared/menu/providers/workflow.menu'; @@ -83,6 +85,9 @@ export const MENUS = buildMenuStructure({ EditUserAgreementMenuProvider, ], [MenuID.DSO_EDIT]: [ + SubmitNewItemMenuProvider.onRoute( + MenuRoute.COLLECTION_PAGE, + ), DsoOptionMenuProvider.withSubs([ EditItemMenuProvider.onRoute( MenuRoute.ITEM_PAGE, @@ -96,6 +101,9 @@ export const MENUS = buildMenuStructure({ MenuRoute.COLLECTION_PAGE, MenuRoute.ITEM_PAGE, ), + AddSubComColMenuProvider.onRoute( + MenuRoute.COMMUNITY_PAGE, + ), WithdrawnReinstateItemMenuProvider.onRoute( MenuRoute.ITEM_PAGE, ), diff --git a/src/app/shared/dso-page/dso-edit-menu/dso-edit-menu-section/dso-edit-menu-section.component.html b/src/app/shared/dso-page/dso-edit-menu/dso-edit-menu-section/dso-edit-menu-section.component.html index b2c8ca84ce9..3171b1cca0f 100644 --- a/src/app/shared/dso-page/dso-edit-menu/dso-edit-menu-section/dso-edit-menu-section.component.html +++ b/src/app/shared/dso-page/dso-edit-menu/dso-edit-menu-section/dso-edit-menu-section.component.html @@ -3,15 +3,15 @@ [ngbTooltip]="itemModel.text | translate"> @if (!section.model.disabled) { + [routerLink]="itemModel.link" [queryParams]="itemModel.queryParams"> - {{itemModel.text | translate}} + {{itemModel.text | translate}} } @if (section.model.disabled) { } @@ -23,7 +23,7 @@ } diff --git a/src/app/shared/dso-page/dso-edit-menu/dso-edit-menu-section/dso-edit-menu-section.component.scss b/src/app/shared/dso-page/dso-edit-menu/dso-edit-menu-section/dso-edit-menu-section.component.scss index cf0e81c5538..aed87c714b7 100644 --- a/src/app/shared/dso-page/dso-edit-menu/dso-edit-menu-section/dso-edit-menu-section.component.scss +++ b/src/app/shared/dso-page/dso-edit-menu/dso-edit-menu-section/dso-edit-menu-section.component.scss @@ -1,3 +1,6 @@ .btn-dark { background-color: var(--ds-admin-sidebar-bg); } +.dso-button-menu { + width: max-content; +} diff --git a/src/app/shared/dso-page/dso-edit-menu/dso-edit-menu-section/dso-edit-menu-section.component.spec.ts b/src/app/shared/dso-page/dso-edit-menu/dso-edit-menu-section/dso-edit-menu-section.component.spec.ts index 7baf6cba144..8be371b7894 100644 --- a/src/app/shared/dso-page/dso-edit-menu/dso-edit-menu-section/dso-edit-menu-section.component.spec.ts +++ b/src/app/shared/dso-page/dso-edit-menu/dso-edit-menu-section/dso-edit-menu-section.component.spec.ts @@ -9,13 +9,16 @@ import { ActivatedRoute, Router, } from '@angular/router'; +import { WidthCategory } from '@dspace/core/shared/host-window-type'; import { ActivatedRouteStub } from '@dspace/core/testing/active-router.stub'; import { CSSVariableServiceStub } from '@dspace/core/testing/css-variable-service.stub'; +import { HostWindowServiceStub } from '@dspace/core/testing/host-window-service.stub'; import { RouterStub } from '@dspace/core/testing/router.stub'; import { TranslateModule } from '@ngx-translate/core'; import { of } from 'rxjs'; import { MenuItemType } from 'src/app/shared/menu/menu-item-type.model'; +import { HostWindowService } from '../../../host-window.service'; import { MenuService } from '../../../menu/menu.service'; import { OnClickMenuItemModel } from '../../../menu/menu-item/models/onclick.model'; import { MenuServiceStub } from '../../../menu/menu-service.stub'; @@ -38,6 +41,7 @@ function initAsync(menuService: MenuServiceStub) { { provide: Router, useValue: new RouterStub() }, { provide: ActivatedRoute, useValue: new ActivatedRouteStub() }, { provide: ThemeService, useValue: getMockThemeService() }, + { provide: HostWindowService, useValue: new HostWindowServiceStub(WidthCategory.MD) }, ], }).compileComponents(); })); diff --git a/src/app/shared/dso-page/dso-edit-menu/dso-edit-menu-section/dso-edit-menu-section.component.ts b/src/app/shared/dso-page/dso-edit-menu/dso-edit-menu-section/dso-edit-menu-section.component.ts index ffcd12ddb0c..2f57a17b5ba 100644 --- a/src/app/shared/dso-page/dso-edit-menu/dso-edit-menu-section/dso-edit-menu-section.component.ts +++ b/src/app/shared/dso-page/dso-edit-menu/dso-edit-menu-section/dso-edit-menu-section.component.ts @@ -1,15 +1,20 @@ + +import { AsyncPipe } from '@angular/common'; import { Component, Injector, OnInit, } from '@angular/core'; import { RouterLink } from '@angular/router'; +import { WidthCategory } from '@dspace/core/shared/host-window-type'; import { isNotEmpty } from '@dspace/shared/utils/empty.util'; import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap'; import { TranslateModule } from '@ngx-translate/core'; +import { Observable } from 'rxjs'; import { AbstractMenuSectionComponent } from 'src/app/shared/menu/menu-section/abstract-menu-section.component'; import { BtnDisabledDirective } from '../../../btn-disabled.directive'; +import { HostWindowService } from '../../../host-window.service'; import { MenuService } from '../../../menu/menu.service'; import { MenuID } from '../../../menu/menu-id.model'; import { rendersSectionForMenu } from '../../../menu/menu-section.decorator'; @@ -23,6 +28,7 @@ import { ThemeService } from '../../../theme-support/theme.service'; templateUrl: './dso-edit-menu-section.component.html', styleUrls: ['./dso-edit-menu-section.component.scss'], imports: [ + AsyncPipe, BtnDisabledDirective, NgbTooltip, RouterLink, @@ -35,17 +41,22 @@ export class DsoEditMenuSectionComponent extends AbstractMenuSectionComponent im menuID: MenuID = MenuID.DSO_EDIT; hasLink: boolean; canActivate: boolean; + public isMobile$: Observable; + + maxMobileWidth = WidthCategory.SM; constructor( protected menuService: MenuService, protected injector: Injector, protected themeService: ThemeService, + protected windowService: HostWindowService, ) { super( menuService, injector, themeService, ); + this.isMobile$ = this.windowService.isUpTo(this.maxMobileWidth); } ngOnInit(): void { diff --git a/src/app/shared/menu/menu-provider.model.ts b/src/app/shared/menu/menu-provider.model.ts index 80ca6c15a4e..8dab52fbd86 100644 --- a/src/app/shared/menu/menu-provider.model.ts +++ b/src/app/shared/menu/menu-provider.model.ts @@ -31,6 +31,7 @@ export interface PartialMenuSection { shouldPersistOnRouteChange?: boolean; icon?: string; alwaysRenderExpandable?: boolean; + renderIconOnly?: boolean; } /** diff --git a/src/app/shared/menu/menu-provider.service.spec.ts b/src/app/shared/menu/menu-provider.service.spec.ts index 5f68e76c224..0ed93da48b8 100644 --- a/src/app/shared/menu/menu-provider.service.spec.ts +++ b/src/app/shared/menu/menu-provider.service.spec.ts @@ -32,6 +32,7 @@ describe('MenuProviderService', () => { public alwaysRenderExpandable: boolean, public sections: PartialMenuSection[], public renderBrowserOnly: boolean = false, + public renderIconOnly: boolean = false, ) { super(); } @@ -104,6 +105,7 @@ describe('MenuProviderService', () => { active: false, shouldPersistOnRouteChange: sectionToAdd.shouldPersistOnRouteChange ?? provider.shouldPersistOnRouteChange, alwaysRenderExpandable: sectionToAdd.alwaysRenderExpandable ?? provider.alwaysRenderExpandable, + renderIconOnly: sectionToAdd.renderIconOnly ?? false, }; } diff --git a/src/app/shared/menu/menu-provider.service.ts b/src/app/shared/menu/menu-provider.service.ts index 1d2b393b69f..0efeae37a62 100644 --- a/src/app/shared/menu/menu-provider.service.ts +++ b/src/app/shared/menu/menu-provider.service.ts @@ -210,6 +210,7 @@ export class MenuProviderService { active: section.active ?? false, shouldPersistOnRouteChange: section.shouldPersistOnRouteChange ?? provider.shouldPersistOnRouteChange, alwaysRenderExpandable: section.alwaysRenderExpandable ?? provider.alwaysRenderExpandable, + renderIconOnly: section.renderIconOnly ?? false, }); } diff --git a/src/app/shared/menu/menu-section.model.ts b/src/app/shared/menu/menu-section.model.ts index 8462e27fd8c..84b978ec304 100644 --- a/src/app/shared/menu/menu-section.model.ts +++ b/src/app/shared/menu/menu-section.model.ts @@ -69,4 +69,9 @@ export interface MenuSection { * This section will not be rendered when it has no visible children */ alwaysRenderExpandable?: boolean; + + /** + * Whether only to render the icon of the menu section not the text. + */ + renderIconOnly?: boolean; } diff --git a/src/app/shared/menu/providers/add-sub-com-col.menu.spec.ts b/src/app/shared/menu/providers/add-sub-com-col.menu.spec.ts new file mode 100644 index 00000000000..65a991690ad --- /dev/null +++ b/src/app/shared/menu/providers/add-sub-com-col.menu.spec.ts @@ -0,0 +1,79 @@ +import { TestBed } from '@angular/core/testing'; +import { AuthorizationDataService } from '@dspace/core/data/feature-authorization/authorization-data.service'; +import { Community } from '@dspace/core/shared/community.model'; +import { COMMUNITY } from '@dspace/core/shared/community.resource-type'; +import { of } from 'rxjs'; + +import { MenuItemType } from '../menu-item-type.model'; +import { PartialMenuSection } from '../menu-provider.model'; +import { AddSubComColMenuProvider } from './add-sub-com-col.menu'; + +describe('AddSubComColMenuProvider', () => { + + const expectedSections: PartialMenuSection[] = [ + { + visible: true, + model: { + type: MenuItemType.LINK, + text: 'community.add.sub-community', + link: '/communities/create', + queryParams: { + parent: 'test-uuid', + }, + }, + icon: 'plus', + }, + { + visible: true, + model: { + type: MenuItemType.LINK, + text: 'community.add.sub-collection', + link: '/collections/create', + queryParams: { + parent: 'test-uuid', + }, + }, + icon: 'plus', + }, + ]; + + let provider: AddSubComColMenuProvider; + + const dso: Community = Object.assign(new Community(), { + type: COMMUNITY.value, + uuid: 'test-uuid', + _links: { self: { href: 'self-link' } }, + }); + + + let authorizationService; + + beforeEach(() => { + + authorizationService = jasmine.createSpyObj('authorizationService', { + 'isAuthorized': of(true), + }); + + TestBed.configureTestingModule({ + providers: [ + AddSubComColMenuProvider, + { provide: AuthorizationDataService, useValue: authorizationService }, + ], + }); + provider = TestBed.inject(AddSubComColMenuProvider); + }); + + it('should be created', () => { + expect(provider).toBeTruthy(); + }); + + describe('getSectionsForContext', () => { + it('should return the expected sections', (done) => { + provider.getSectionsForContext(dso).subscribe((sections) => { + expect(sections).toEqual(expectedSections); + done(); + }); + }); + }); + +}); diff --git a/src/app/shared/menu/providers/add-sub-com-col.menu.ts b/src/app/shared/menu/providers/add-sub-com-col.menu.ts new file mode 100644 index 00000000000..5bb964c12c6 --- /dev/null +++ b/src/app/shared/menu/providers/add-sub-com-col.menu.ts @@ -0,0 +1,68 @@ +/** + * The contents of this file are subject to the license and copyright + * detailed in the LICENSE and NOTICE files at the root of the source + * tree and available online at + * + * http://www.dspace.org/license/ + */ +import { Injectable } from '@angular/core'; +import { AuthorizationDataService } from '@dspace/core/data/feature-authorization/authorization-data.service'; +import { FeatureID } from '@dspace/core/data/feature-authorization/feature-id'; +import { DSpaceObject } from '@dspace/core/shared/dspace-object.model'; +import { + combineLatest, + Observable, +} from 'rxjs'; +import { map } from 'rxjs/operators'; + +import { LinkMenuItemModel } from '../menu-item/models/link.model'; +import { MenuItemType } from '../menu-item-type.model'; +import { PartialMenuSection } from '../menu-provider.model'; +import { DSpaceObjectPageMenuProvider } from './helper-providers/dso.menu'; + +/** + * Menu provider to create the "Add sub Community" and "Add sub collection" option in the DSO edit menu + */ +@Injectable() +export class AddSubComColMenuProvider extends DSpaceObjectPageMenuProvider { + constructor( + protected authorizationDataService: AuthorizationDataService, + ) { + super(); + } + + public getSectionsForContext(dso: DSpaceObject): Observable { + return combineLatest([ + this.authorizationDataService.isAuthorized(FeatureID.IsCommunityAdmin), + ]).pipe( + map(([isCommunityAdmin]) => { + return [ + { + visible: isCommunityAdmin, + model: { + type: MenuItemType.LINK, + text: 'community.add.sub-community', + link: '/communities/create', + queryParams: { + parent: dso.uuid, + }, + } as LinkMenuItemModel, + icon: 'plus', + }, + { + visible: isCommunityAdmin, + model: { + type: MenuItemType.LINK, + text: 'community.add.sub-collection', + link: '/collections/create', + queryParams: { + parent: dso.uuid, + }, + } as LinkMenuItemModel, + icon: 'plus', + }, + ] as PartialMenuSection[]; + }), + ); + } +} diff --git a/src/app/shared/menu/providers/submit-new-item.menu.spec.ts b/src/app/shared/menu/providers/submit-new-item.menu.spec.ts new file mode 100644 index 00000000000..e18580bb66a --- /dev/null +++ b/src/app/shared/menu/providers/submit-new-item.menu.spec.ts @@ -0,0 +1,73 @@ +import { TestBed } from '@angular/core/testing'; +import { APP_CONFIG } from '@dspace/config/app-config.interface'; +import { AuthorizationDataService } from '@dspace/core/data/feature-authorization/authorization-data.service'; +import { Collection } from '@dspace/core/shared/collection.model'; +import { COLLECTION } from '@dspace/core/shared/collection.resource-type'; +import { + Observable, + of, +} from 'rxjs'; + +import { environment } from '../../../../environments/environment'; +import { MenuItemType } from '../menu-item-type.model'; +import { PartialMenuSection } from '../menu-provider.model'; +import { SubmitNewItemMenuProvider } from './submit-new-item.menu'; + +describe('SubmitNewItemMenuProvider', () => { + + const expectedSections: PartialMenuSection[] = [ + { + visible: true, + model: { + type: MenuItemType.LINK, + text: 'collection.submit.item', + link: '/submit', + queryParams: { + collection: 'test-uuid', + }, + }, + icon: 'plus', + renderIconOnly: false, + }, + ]; + + let provider: SubmitNewItemMenuProvider; + + const dso: Collection = Object.assign(new Collection(), { + type: COLLECTION.value, + uuid: 'test-uuid', + _links: { self: { href: 'self-link' } }, + }); + + + let authorizationService: { isAuthorized: Observable ; }; + + beforeEach(() => { + + authorizationService = jasmine.createSpyObj('authorizationService', { + 'isAuthorized': of(true), + }); + + TestBed.configureTestingModule({ + providers: [ + SubmitNewItemMenuProvider, + { provide: AuthorizationDataService, useValue: authorizationService }, + { provide: APP_CONFIG, useValue: environment }, + ], + }); + provider = TestBed.inject(SubmitNewItemMenuProvider); + }); + + it('should be created', () => { + expect(provider).toBeTruthy(); + }); + + describe('getSectionsForContext', () => { + it('should return the expected sections', (done) => { + provider.getSectionsForContext(dso).subscribe((sections) => { + expect(sections).toEqual(expectedSections); + done(); + }); + }); + }); +}); diff --git a/src/app/shared/menu/providers/submit-new-item.menu.ts b/src/app/shared/menu/providers/submit-new-item.menu.ts new file mode 100644 index 00000000000..36c64c5e548 --- /dev/null +++ b/src/app/shared/menu/providers/submit-new-item.menu.ts @@ -0,0 +1,57 @@ +/** + * The contents of this file are subject to the license and copyright + * detailed in the LICENSE and NOTICE files at the root of the source + * tree and available online at + * + * http://www.dspace.org/license/ + */ +import { Injectable } from '@angular/core'; +import { AuthorizationDataService } from '@dspace/core/data/feature-authorization/authorization-data.service'; +import { FeatureID } from '@dspace/core/data/feature-authorization/feature-id'; +import { DSpaceObject } from '@dspace/core/shared/dspace-object.model'; +import { + combineLatest, + Observable, +} from 'rxjs'; +import { map } from 'rxjs/operators'; + +import { LinkMenuItemModel } from '../menu-item/models/link.model'; +import { MenuItemType } from '../menu-item-type.model'; +import { PartialMenuSection } from '../menu-provider.model'; +import { DSpaceObjectPageMenuProvider } from './helper-providers/dso.menu'; + +/** + * Menu provider to create the "Submit item" option in the DSO edit menu + */ +@Injectable() +export class SubmitNewItemMenuProvider extends DSpaceObjectPageMenuProvider { + constructor( + protected authorizationDataService: AuthorizationDataService, + ) { + super(); + } + + public getSectionsForContext(dso: DSpaceObject): Observable { + return combineLatest([ + this.authorizationDataService.isAuthorized(FeatureID.CanSubmit, dso.self), + ]).pipe( + map(([canSubmitItem]) => { + return [ + { + visible: canSubmitItem, + model: { + type: MenuItemType.LINK, + text: 'collection.submit.item', + link: '/submit', + queryParams: { + collection: dso.uuid, + }, + } as LinkMenuItemModel, + icon: 'plus', + renderIconOnly: false, + }, + ] as PartialMenuSection[]; + }), + ); + } +} diff --git a/src/assets/i18n/en.json5 b/src/assets/i18n/en.json5 index 6551143ff13..2fc04173977 100644 --- a/src/assets/i18n/en.json5 +++ b/src/assets/i18n/en.json5 @@ -7913,4 +7913,12 @@ "bitstream.related.isReplacedBy": "Is replaced by", "bitstream.related.deleted": "deleted", + + "community.add.sub-community": "Add Community", + + "community.add.sub-collection": "Add Collection", + + "collection.submit.item": "Submit item", + + "collection.page.submit-button": "Submit item", }