From 2b17bb8f1e5ebdb1c1bcb49beffcab7ff265133f Mon Sep 17 00:00:00 2001 From: Kristof De Langhe Date: Thu, 7 Apr 2022 11:29:22 +0200 Subject: [PATCH 01/33] 89676: Themeable browse-by-page decorator & search-results component --- .../browse-by-switcher/browse-by-decorator.ts | 27 ++++++-- .../browse-by-switcher.component.ts | 6 +- .../themed-search-results.component.ts | 64 +++++++++++++++++++ src/app/shared/search/search.component.html | 4 +- src/app/shared/search/search.module.ts | 4 +- 5 files changed, 93 insertions(+), 12 deletions(-) create mode 100644 src/app/shared/search/search-results/themed-search-results.component.ts diff --git a/src/app/browse-by/browse-by-switcher/browse-by-decorator.ts b/src/app/browse-by/browse-by-switcher/browse-by-decorator.ts index 1ebaa7face..ceb4c6a6c6 100644 --- a/src/app/browse-by/browse-by-switcher/browse-by-decorator.ts +++ b/src/app/browse-by/browse-by-switcher/browse-by-decorator.ts @@ -1,6 +1,10 @@ import { hasNoValue } from '../../shared/empty.util'; import { InjectionToken } from '@angular/core'; import { GenericConstructor } from '../../core/shared/generic-constructor'; +import { + DEFAULT_THEME, + resolveTheme +} from '../../shared/object-collection/shared/listable-object/listable-object.decorator'; export enum BrowseByDataType { Title = 'title', @@ -10,7 +14,7 @@ export enum BrowseByDataType { export const DEFAULT_BROWSE_BY_TYPE = BrowseByDataType.Metadata; -export const BROWSE_BY_COMPONENT_FACTORY = new InjectionToken<(browseByType) => GenericConstructor>('getComponentByBrowseByType', { +export const BROWSE_BY_COMPONENT_FACTORY = new InjectionToken<(browseByType, theme) => GenericConstructor>('getComponentByBrowseByType', { providedIn: 'root', factory: () => getComponentByBrowseByType }); @@ -20,13 +24,17 @@ const map = new Map(); /** * Decorator used for rendering Browse-By pages by type * @param browseByType The type of page + * @param theme The optional theme for the component */ -export function rendersBrowseBy(browseByType: BrowseByDataType) { +export function rendersBrowseBy(browseByType: BrowseByDataType, theme = DEFAULT_THEME) { return function decorator(component: any) { if (hasNoValue(map.get(browseByType))) { - map.set(browseByType, component); + map.set(browseByType, new Map()); + } + if (hasNoValue(map.get(browseByType).get(theme))) { + map.get(browseByType).set(theme, component); } else { - throw new Error(`There can't be more than one component to render Browse-By of type "${browseByType}"`); + throw new Error(`There can't be more than one component to render Browse-By of type "${browseByType}" and theme "${theme}"`); } }; } @@ -34,11 +42,16 @@ export function rendersBrowseBy(browseByType: BrowseByDataType) { /** * Get the component used for rendering a Browse-By page by type * @param browseByType The type of page + * @param theme the theme to match */ -export function getComponentByBrowseByType(browseByType) { - const comp = map.get(browseByType); +export function getComponentByBrowseByType(browseByType, theme) { + let themeMap = map.get(browseByType); + if (hasNoValue(themeMap)) { + themeMap = map.get(DEFAULT_BROWSE_BY_TYPE); + } + const comp = resolveTheme(themeMap, theme); if (hasNoValue(comp)) { - map.get(DEFAULT_BROWSE_BY_TYPE); + return themeMap.get(DEFAULT_THEME); } return comp; } diff --git a/src/app/browse-by/browse-by-switcher/browse-by-switcher.component.ts b/src/app/browse-by/browse-by-switcher/browse-by-switcher.component.ts index cf4c1d9856..0d3a35bebf 100644 --- a/src/app/browse-by/browse-by-switcher/browse-by-switcher.component.ts +++ b/src/app/browse-by/browse-by-switcher/browse-by-switcher.component.ts @@ -5,6 +5,7 @@ import { map } from 'rxjs/operators'; import { BROWSE_BY_COMPONENT_FACTORY } from './browse-by-decorator'; import { GenericConstructor } from '../../core/shared/generic-constructor'; import { BrowseDefinition } from '../../core/shared/browse-definition.model'; +import { ThemeService } from '../../shared/theme-support/theme.service'; @Component({ selector: 'ds-browse-by-switcher', @@ -21,7 +22,8 @@ export class BrowseBySwitcherComponent implements OnInit { browseByComponent: Observable; public constructor(protected route: ActivatedRoute, - @Inject(BROWSE_BY_COMPONENT_FACTORY) private getComponentByBrowseByType: (browseByType) => GenericConstructor) { + protected themeService: ThemeService, + @Inject(BROWSE_BY_COMPONENT_FACTORY) private getComponentByBrowseByType: (browseByType, theme) => GenericConstructor) { } /** @@ -29,7 +31,7 @@ export class BrowseBySwitcherComponent implements OnInit { */ ngOnInit(): void { this.browseByComponent = this.route.data.pipe( - map((data: { browseDefinition: BrowseDefinition }) => this.getComponentByBrowseByType(data.browseDefinition.dataType)) + map((data: { browseDefinition: BrowseDefinition }) => this.getComponentByBrowseByType(data.browseDefinition.dataType, this.themeService.getThemeName())) ); } diff --git a/src/app/shared/search/search-results/themed-search-results.component.ts b/src/app/shared/search/search-results/themed-search-results.component.ts new file mode 100644 index 0000000000..19a8fc55e8 --- /dev/null +++ b/src/app/shared/search/search-results/themed-search-results.component.ts @@ -0,0 +1,64 @@ +import { ThemedComponent } from '../../theme-support/themed.component'; +import { SearchResultsComponent, SelectionConfig } from './search-results.component'; +import { Component, EventEmitter, Input, Output } from '@angular/core'; +import { CollectionElementLinkType } from '../../object-collection/collection-element-link.type'; +import { RemoteData } from '../../../core/data/remote-data'; +import { PaginatedList } from '../../../core/data/paginated-list.model'; +import { SearchResult } from '../models/search-result.model'; +import { DSpaceObject } from '../../../core/shared/dspace-object.model'; +import { PaginatedSearchOptions } from '../models/paginated-search-options.model'; +import { SortOptions } from '../../../core/cache/models/sort-options.model'; +import { ViewMode } from '../../../core/shared/view-mode.model'; +import { Context } from '../../../core/shared/context.model'; +import { ListableObject } from '../../object-collection/shared/listable-object.model'; + +/** + * Themed wrapper for SearchResultsComponent + */ +@Component({ + selector: 'ds-themed-search-results', + styleUrls: [], + templateUrl: '../../theme-support/themed.component.html', +}) +export class ThemedSearchResultsComponent extends ThemedComponent { + protected inAndOutputNames: (keyof SearchResultsComponent & keyof this)[] = ['linkType', 'searchResults', 'searchConfig', 'sortConfig', 'viewMode', 'configuration', 'disableHeader', 'selectable', 'context', 'hidePaginationDetail', 'selectionConfig', 'deselectObject', 'selectObject']; + + @Input() linkType: CollectionElementLinkType; + + @Input() searchResults: RemoteData>>; + + @Input() searchConfig: PaginatedSearchOptions; + + @Input() sortConfig: SortOptions; + + @Input() viewMode: ViewMode; + + @Input() configuration: string; + + @Input() disableHeader = false; + + @Input() selectable = false; + + @Input() context: Context; + + @Input() hidePaginationDetail = false; + + @Input() selectionConfig: SelectionConfig = null; + + @Output() deselectObject: EventEmitter = new EventEmitter(); + + @Output() selectObject: EventEmitter = new EventEmitter(); + + protected getComponentName(): string { + return 'SearchResultsComponent'; + } + + protected importThemedComponent(themeName: string): Promise { + return import(`../../../../themes/${themeName}/app/shared/search/search-results/search-results.component`); + } + + protected importUnthemedComponent(): Promise { + return import('./search-results.component'); + } + +} diff --git a/src/app/shared/search/search.component.html b/src/app/shared/search/search.component.html index 5ca3e925a5..aac77b3570 100644 --- a/src/app/shared/search/search.component.html +++ b/src/app/shared/search/search.component.html @@ -29,7 +29,7 @@ | translate}} - + (selectObject)="selectObject.emit($event)"> diff --git a/src/app/shared/search/search.module.ts b/src/app/shared/search/search.module.ts index 668d260c23..991fad409b 100644 --- a/src/app/shared/search/search.module.ts +++ b/src/app/shared/search/search.module.ts @@ -28,6 +28,7 @@ import { MissingTranslationHelper } from '../translate/missing-translation.helpe import { SharedModule } from '../shared.module'; import { SearchResultsComponent } from './search-results/search-results.component'; import { SearchComponent } from './search.component'; +import { ThemedSearchResultsComponent } from './search-results/themed-search-results.component'; const COMPONENTS = [ SearchComponent, @@ -50,7 +51,8 @@ const COMPONENTS = [ SearchAuthorityFilterComponent, SearchSwitchConfigurationComponent, ConfigurationSearchPageComponent, - ThemedConfigurationSearchPageComponent + ThemedConfigurationSearchPageComponent, + ThemedSearchResultsComponent, ]; const ENTRY_COMPONENTS = [ From 0ed7f2e0aa0d1b43f9ed82f5cadf8cc74c5b7cb6 Mon Sep 17 00:00:00 2001 From: Kristof De Langhe Date: Fri, 8 Apr 2022 11:12:26 +0200 Subject: [PATCH 02/33] 89676: Test fixes --- .../browse-by-switcher.component.spec.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/app/browse-by/browse-by-switcher/browse-by-switcher.component.spec.ts b/src/app/browse-by/browse-by-switcher/browse-by-switcher.component.spec.ts index cb82ddb7c4..c2e1c9cb68 100644 --- a/src/app/browse-by/browse-by-switcher/browse-by-switcher.component.spec.ts +++ b/src/app/browse-by/browse-by-switcher/browse-by-switcher.component.spec.ts @@ -4,7 +4,8 @@ import { NO_ERRORS_SCHEMA } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { BROWSE_BY_COMPONENT_FACTORY, BrowseByDataType } from './browse-by-decorator'; import { BrowseDefinition } from '../../core/shared/browse-definition.model'; -import { BehaviorSubject, of as observableOf } from 'rxjs'; +import { BehaviorSubject } from 'rxjs'; +import { ThemeService } from '../../shared/theme-support/theme.service'; describe('BrowseBySwitcherComponent', () => { let comp: BrowseBySwitcherComponent; @@ -44,11 +45,20 @@ describe('BrowseBySwitcherComponent', () => { data }; + let themeService: ThemeService; + let themeName: string; + beforeEach(waitForAsync(() => { + themeName = 'dspace'; + themeService = jasmine.createSpyObj('themeService', { + getThemeName: themeName, + }); + TestBed.configureTestingModule({ declarations: [BrowseBySwitcherComponent], providers: [ { provide: ActivatedRoute, useValue: activatedRouteStub }, + { provide: ThemeService, useValue: themeService }, { provide: BROWSE_BY_COMPONENT_FACTORY, useValue: jasmine.createSpy('getComponentByBrowseByType').and.returnValue(null) } ], schemas: [NO_ERRORS_SCHEMA] @@ -68,7 +78,7 @@ describe('BrowseBySwitcherComponent', () => { }); it(`should call getComponentByBrowseByType with type "${type.dataType}"`, () => { - expect((comp as any).getComponentByBrowseByType).toHaveBeenCalledWith(type.dataType); + expect((comp as any).getComponentByBrowseByType).toHaveBeenCalledWith(type.dataType, themeName); }); }); }); From 155db64c63363d7e69fd342a0aabf686697a4291 Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Tue, 12 Apr 2022 09:36:18 +0200 Subject: [PATCH 03/33] 86526: Added themable AuthNavMenuComponent --- src/app/header/header.component.html | 2 +- .../themed-auth-nav-menu.component.ts | 25 +++++++++++++++++++ src/app/shared/shared.module.ts | 2 ++ .../dspace/app/header/header.component.html | 2 +- .../dspace/app/navbar/navbar.component.html | 2 +- 5 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 src/app/shared/auth-nav-menu/themed-auth-nav-menu.component.ts diff --git a/src/app/header/header.component.html b/src/app/header/header.component.html index c7b979d266..e5d5f38971 100644 --- a/src/app/header/header.component.html +++ b/src/app/header/header.component.html @@ -8,7 +8,7 @@ From 7480a19a656fa954da162ff665b955bc86acecff Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Thu, 28 Apr 2022 12:18:14 +0200 Subject: [PATCH 04/33] 89720: Added ThemedItemMetadataComponent --- .../edit-item-template-page.component.html | 2 +- .../edit-item-page/edit-item-page.module.ts | 5 ++- .../themed-item-metadata.component.ts | 34 +++++++++++++++++++ 3 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 src/app/item-page/edit-item-page/item-metadata/themed-item-metadata.component.ts diff --git a/src/app/collection-page/edit-item-template-page/edit-item-template-page.component.html b/src/app/collection-page/edit-item-template-page/edit-item-template-page.component.html index f8c5c92e96..aa6b71f588 100644 --- a/src/app/collection-page/edit-item-template-page/edit-item-template-page.component.html +++ b/src/app/collection-page/edit-item-template-page/edit-item-template-page.component.html @@ -3,7 +3,7 @@

{{ 'collection.edit.template.head' | translate:{ collection: collection?.name } }}

- +
diff --git a/src/app/item-page/edit-item-page/edit-item-page.module.ts b/src/app/item-page/edit-item-page/edit-item-page.module.ts index 97901bd7c8..67cf31c6ed 100644 --- a/src/app/item-page/edit-item-page/edit-item-page.module.ts +++ b/src/app/item-page/edit-item-page/edit-item-page.module.ts @@ -15,6 +15,7 @@ import { ItemPrivateComponent } from './item-private/item-private.component'; import { ItemPublicComponent } from './item-public/item-public.component'; import { ItemDeleteComponent } from './item-delete/item-delete.component'; import { ItemMetadataComponent } from './item-metadata/item-metadata.component'; +import { ThemedItemMetadataComponent } from './item-metadata/themed-item-metadata.component'; import { EditInPlaceFieldComponent } from './item-metadata/edit-in-place-field/edit-in-place-field.component'; import { ItemBitstreamsComponent } from './item-bitstreams/item-bitstreams.component'; import { ItemEditBitstreamComponent } from './item-bitstreams/item-edit-bitstream/item-edit-bitstream.component'; @@ -62,6 +63,7 @@ import { ResourcePoliciesModule } from '../../shared/resource-policies/resource- ItemDeleteComponent, ItemStatusComponent, ItemMetadataComponent, + ThemedItemMetadataComponent, ItemRelationshipsComponent, ItemBitstreamsComponent, ItemVersionHistoryComponent, @@ -83,7 +85,8 @@ import { ResourcePoliciesModule } from '../../shared/resource-policies/resource- ObjectValuesPipe ], exports: [ - ItemMetadataComponent + EditInPlaceFieldComponent, + ThemedItemMetadataComponent, ] }) export class EditItemPageModule { diff --git a/src/app/item-page/edit-item-page/item-metadata/themed-item-metadata.component.ts b/src/app/item-page/edit-item-page/item-metadata/themed-item-metadata.component.ts new file mode 100644 index 0000000000..53f0120015 --- /dev/null +++ b/src/app/item-page/edit-item-page/item-metadata/themed-item-metadata.component.ts @@ -0,0 +1,34 @@ +import { Component, Input } from '@angular/core'; +import { Item } from '../../../core/shared/item.model'; +import { UpdateDataService } from '../../../core/data/update-data.service'; +import { ItemMetadataComponent } from './item-metadata.component'; +import { ThemedComponent } from '../../../shared/theme-support/themed.component'; + +@Component({ + selector: 'ds-themed-item-metadata', + styleUrls: [], + templateUrl: './../../../shared/theme-support/themed.component.html', +}) +/** + * Component for displaying an item's metadata edit page + */ +export class ThemedItemMetadataComponent extends ThemedComponent { + + @Input() item: Item; + + @Input() updateService: UpdateDataService; + + protected inAndOutputNames: (keyof ItemMetadataComponent & keyof this)[] = ['item', 'updateService']; + + protected getComponentName(): string { + return 'ItemMetadataComponent'; + } + + protected importThemedComponent(themeName: string): Promise { + return import(`../../../../themes/${themeName}/app/item-page/edit-item-page/item-metadata/item-metadata.component`); + } + + protected importUnthemedComponent(): Promise { + return import(`./item-metadata.component`); + } +} From 2f84d0294be4582fdc5c6db8c0fe059b42eeddfa Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Fri, 29 Apr 2022 10:27:26 +0200 Subject: [PATCH 05/33] 89720: Added ThemedEditItemTemplatePageComponent --- .../collection-page-routing.module.ts | 4 +-- .../collection-page/collection-page.module.ts | 2 ++ ...hemed-edit-item-template-page.component.ts | 25 +++++++++++++++++++ 3 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 src/app/collection-page/edit-item-template-page/themed-edit-item-template-page.component.ts diff --git a/src/app/collection-page/collection-page-routing.module.ts b/src/app/collection-page/collection-page-routing.module.ts index 5879e523af..0574958037 100644 --- a/src/app/collection-page/collection-page-routing.module.ts +++ b/src/app/collection-page/collection-page-routing.module.ts @@ -6,7 +6,7 @@ import { CreateCollectionPageComponent } from './create-collection-page/create-c import { AuthenticatedGuard } from '../core/auth/authenticated.guard'; import { CreateCollectionPageGuard } from './create-collection-page/create-collection-page.guard'; import { DeleteCollectionPageComponent } from './delete-collection-page/delete-collection-page.component'; -import { EditItemTemplatePageComponent } from './edit-item-template-page/edit-item-template-page.component'; +import { ThemedEditItemTemplatePageComponent } from './edit-item-template-page/themed-edit-item-template-page.component'; import { ItemTemplatePageResolver } from './edit-item-template-page/item-template-page.resolver'; import { CollectionBreadcrumbResolver } from '../core/breadcrumbs/collection-breadcrumb.resolver'; import { DSOBreadcrumbsService } from '../core/breadcrumbs/dso-breadcrumbs.service'; @@ -52,7 +52,7 @@ import { ThemedCollectionPageComponent } from './themed-collection-page.componen }, { path: ITEMTEMPLATE_PATH, - component: EditItemTemplatePageComponent, + component: ThemedEditItemTemplatePageComponent, canActivate: [AuthenticatedGuard], resolve: { item: ItemTemplatePageResolver, diff --git a/src/app/collection-page/collection-page.module.ts b/src/app/collection-page/collection-page.module.ts index 3652823200..c35ebf9021 100644 --- a/src/app/collection-page/collection-page.module.ts +++ b/src/app/collection-page/collection-page.module.ts @@ -8,6 +8,7 @@ import { CollectionPageRoutingModule } from './collection-page-routing.module'; import { CreateCollectionPageComponent } from './create-collection-page/create-collection-page.component'; import { DeleteCollectionPageComponent } from './delete-collection-page/delete-collection-page.component'; import { EditItemTemplatePageComponent } from './edit-item-template-page/edit-item-template-page.component'; +import { ThemedEditItemTemplatePageComponent } from './edit-item-template-page/themed-edit-item-template-page.component'; import { EditItemPageModule } from '../item-page/edit-item-page/edit-item-page.module'; import { CollectionItemMapperComponent } from './collection-item-mapper/collection-item-mapper.component'; import { SearchService } from '../core/shared/search/search.service'; @@ -32,6 +33,7 @@ import { ComcolModule } from '../shared/comcol/comcol.module'; CreateCollectionPageComponent, DeleteCollectionPageComponent, EditItemTemplatePageComponent, + ThemedEditItemTemplatePageComponent, CollectionItemMapperComponent ], providers: [ diff --git a/src/app/collection-page/edit-item-template-page/themed-edit-item-template-page.component.ts b/src/app/collection-page/edit-item-template-page/themed-edit-item-template-page.component.ts new file mode 100644 index 0000000000..b53f4e6c45 --- /dev/null +++ b/src/app/collection-page/edit-item-template-page/themed-edit-item-template-page.component.ts @@ -0,0 +1,25 @@ +import { Component } from '@angular/core'; +import { ThemedComponent } from '../../shared/theme-support/themed.component'; +import { EditItemTemplatePageComponent } from './edit-item-template-page.component'; + +@Component({ + selector: 'ds-themed-edit-item-template-page', + styleUrls: [], + templateUrl: '../../shared/theme-support/themed.component.html', +}) +/** + * Component for editing the item template of a collection + */ +export class ThemedEditItemTemplatePageComponent extends ThemedComponent { + protected getComponentName(): string { + return 'EditItemTemplatePageComponent'; + } + + protected importThemedComponent(themeName: string): Promise { + return import(`../../../themes/${themeName}/app/collection-page/edit-item-template-page/edit-item-template-page.component`); + } + + protected importUnthemedComponent(): Promise { + return import('./edit-item-template-page.component'); + } +} From b9b5b50999a3e3173a97709e403c4773839116a5 Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Tue, 3 May 2022 08:56:37 +0200 Subject: [PATCH 06/33] 89741: Added ThemedExpandableNavbarSectionComponent --- ...med-expandable-navbar-section.component.ts | 29 +++++++++++++++++++ src/app/navbar/navbar.module.ts | 11 +++---- 2 files changed, 35 insertions(+), 5 deletions(-) create mode 100644 src/app/navbar/expandable-navbar-section/themed-expandable-navbar-section.component.ts diff --git a/src/app/navbar/expandable-navbar-section/themed-expandable-navbar-section.component.ts b/src/app/navbar/expandable-navbar-section/themed-expandable-navbar-section.component.ts new file mode 100644 index 0000000000..744eeb5a02 --- /dev/null +++ b/src/app/navbar/expandable-navbar-section/themed-expandable-navbar-section.component.ts @@ -0,0 +1,29 @@ +import { Component } from '@angular/core'; +import { ThemedComponent } from '../../shared/theme-support/themed.component'; +import { ExpandableNavbarSectionComponent } from './expandable-navbar-section.component'; +import { rendersSectionForMenu } from '../../shared/menu/menu-section.decorator'; +import { MenuID } from '../../shared/menu/initial-menus-state'; + +/** + * Themed wrapper for ExpandableNavbarSectionComponent + */ +@Component({ + /* tslint:disable:component-selector */ + selector: 'li[ds-themed-expandable-navbar-section]', + styleUrls: [], + templateUrl: '../../shared/theme-support/themed.component.html', +}) +@rendersSectionForMenu(MenuID.PUBLIC, true) +export class ThemedExpandableNavbarSectionComponent extends ThemedComponent { + protected getComponentName(): string { + return 'ExpandableNavbarSectionComponent'; + } + + protected importThemedComponent(themeName: string): Promise { + return import(`../../../themes/${themeName}/app/navbar/expandable-navbar-section/expandable-navbar-section.component`); + } + + protected importUnthemedComponent(): Promise { + return import(`./expandable-navbar-section.component`); + } +} diff --git a/src/app/navbar/navbar.module.ts b/src/app/navbar/navbar.module.ts index c84e732fd5..95641de41b 100644 --- a/src/app/navbar/navbar.module.ts +++ b/src/app/navbar/navbar.module.ts @@ -7,6 +7,7 @@ import { CoreModule } from '../core/core.module'; import { NavbarEffects } from './navbar.effects'; import { NavbarSectionComponent } from './navbar-section/navbar-section.component'; import { ExpandableNavbarSectionComponent } from './expandable-navbar-section/expandable-navbar-section.component'; +import { ThemedExpandableNavbarSectionComponent } from './expandable-navbar-section/themed-expandable-navbar-section.component'; import { NavbarComponent } from './navbar.component'; import { MenuModule } from '../shared/menu/menu.module'; import { SharedModule } from '../shared/shared.module'; @@ -20,7 +21,7 @@ const effects = [ const ENTRY_COMPONENTS = [ // put only entry components that use custom decorator NavbarSectionComponent, - ExpandableNavbarSectionComponent, + ThemedExpandableNavbarSectionComponent, ]; @NgModule({ @@ -36,19 +37,19 @@ const ENTRY_COMPONENTS = [ NavbarComponent, ThemedNavbarComponent, NavbarSectionComponent, - ExpandableNavbarSectionComponent + ExpandableNavbarSectionComponent, + ThemedExpandableNavbarSectionComponent, ], providers: [ ], entryComponents: [ - NavbarSectionComponent, - ExpandableNavbarSectionComponent + ...ENTRY_COMPONENTS, ], exports: [ ThemedNavbarComponent, NavbarSectionComponent, - ExpandableNavbarSectionComponent + ThemedExpandableNavbarSectionComponent, ] }) From 870a36180c4836108c23f790e5e49c04460a99b4 Mon Sep 17 00:00:00 2001 From: Yana De Pauw Date: Mon, 25 Apr 2022 17:26:12 +0200 Subject: [PATCH 07/33] 89984: Add ThemedLoadingComponent --- .../epeople-registry.component.html | 2 +- .../eperson-form/eperson-form.component.html | 4 +-- .../groups-registry.component.html | 2 +- .../edit-bitstream-page.component.html | 4 +-- .../browse-by-metadata-page.component.html | 2 +- .../collection-page.component.html | 8 ++--- .../collection-source.component.html | 2 +- .../edit-item-template-page.component.html | 2 +- .../community-list.component.html | 6 ++-- .../community-page.component.html | 2 +- ...ty-page-sub-collection-list.component.html | 2 +- ...ity-page-sub-community-list.component.html | 2 +- .../top-level-community-list.component.html | 2 +- .../item-bitstreams.component.html | 2 +- ...rag-and-drop-bitstream-list.component.html | 2 +- .../edit-relationship-list.component.html | 2 +- .../item-relationships.component.html | 2 +- .../full/full-item-page.component.html | 2 +- .../media-viewer/media-viewer.component.html | 4 +-- .../media-viewer.component.spec.ts | 2 +- .../file-section/file-section.component.html | 2 +- .../file-section.component.spec.ts | 2 +- .../item-page/simple/item-page.component.html | 2 +- .../simple/item-page.component.spec.ts | 2 +- ...etadata-representation-list.component.html | 2 +- .../related-items.component.html | 2 +- .../detail/process-detail.component.html | 2 +- .../deny-request-copy.component.html | 2 +- .../grant-deny-request-copy.component.html | 2 +- .../grant-request-copy.component.html | 2 +- src/app/root/root.component.html | 4 +-- .../user-menu/user-menu.component.html | 2 +- .../shared/browse-by/browse-by.component.html | 2 +- .../browse-by/browse-by.component.spec.ts | 2 +- .../collection-dropdown.component.html | 4 +-- .../comcol-role/comcol-role.component.html | 2 +- .../dso-selector/dso-selector.component.html | 2 +- .../entity-dropdown.component.html | 4 +-- ...sting-metadata-list-element.component.html | 2 +- ...sting-relation-list-element.component.html | 2 +- .../dynamic-relation-group.component.html | 2 +- ...namic-lookup-relation-modal.component.html | 2 +- ...elation-external-source-tab.component.html | 4 +-- ...tion-external-source-tab.component.spec.ts | 4 +-- .../loading/themed-loading.component.ts | 31 +++++++++++++++++++ src/app/shared/log-in/log-in.component.html | 2 +- .../object-detail.component.html | 2 +- .../object-grid/object-grid.component.html | 2 +- ...-search-result-list-element.component.html | 4 +-- ...-search-result-list-element.component.html | 4 +-- .../collection-select.component.html | 2 +- .../item-select/item-select.component.html | 2 +- .../search-results.component.html | 2 +- src/app/shared/shared.module.ts | 2 ++ .../vocabulary-treeview.component.html | 2 +- .../statistics-page.component.html | 2 +- .../form/submission-form.component.html | 2 +- ...-import-external-collection.component.html | 2 +- .../submission-import-external.component.html | 4 +-- ...mission-section-cc-licenses.component.html | 4 +-- .../sections/form/section-form.component.html | 2 +- src/app/thumbnail/thumbnail.component.html | 4 +-- src/app/thumbnail/thumbnail.component.spec.ts | 2 +- 63 files changed, 112 insertions(+), 79 deletions(-) create mode 100644 src/app/shared/loading/themed-loading.component.ts diff --git a/src/app/access-control/epeople-registry/epeople-registry.component.html b/src/app/access-control/epeople-registry/epeople-registry.component.html index 7ef02a76cf..2d87f21d26 100644 --- a/src/app/access-control/epeople-registry/epeople-registry.component.html +++ b/src/app/access-control/epeople-registry/epeople-registry.component.html @@ -45,7 +45,7 @@
- + - +
{{messagePrefix + '.groupsEPersonIsMemberOf' | translate}}
- + - +
- + diff --git a/src/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.html b/src/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.html index 2321da0204..c0741891eb 100644 --- a/src/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.html +++ b/src/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.html @@ -35,7 +35,7 @@ (prev)="goPrev()" (next)="goNext()"> - + diff --git a/src/app/collection-page/collection-page.component.html b/src/app/collection-page/collection-page.component.html index 9d598a3b69..4f5422e300 100644 --- a/src/app/collection-page/collection-page.component.html +++ b/src/app/collection-page/collection-page.component.html @@ -57,8 +57,8 @@ - + @@ -75,7 +75,7 @@ - + diff --git a/src/app/collection-page/edit-collection-page/collection-source/collection-source.component.html b/src/app/collection-page/edit-collection-page/collection-source/collection-source.component.html index b67ee9a1bd..847ccefdda 100644 --- a/src/app/collection-page/edit-collection-page/collection-source/collection-source.component.html +++ b/src/app/collection-page/edit-collection-page/collection-source/collection-source.component.html @@ -25,7 +25,7 @@ - +

{{ 'collection.edit.tabs.source.form.head' | translate }}

diff --git a/src/app/collection-page/edit-item-template-page/edit-item-template-page.component.html b/src/app/collection-page/edit-item-template-page/edit-item-template-page.component.html index f8c5c92e96..37258cd057 100644 --- a/src/app/collection-page/edit-item-template-page/edit-item-template-page.component.html +++ b/src/app/collection-page/edit-item-template-page/edit-item-template-page.component.html @@ -6,7 +6,7 @@ - +
diff --git a/src/app/community-list-page/community-list/community-list.component.html b/src/app/community-list-page/community-list/community-list.component.html index f441dfa36e..5d53633c4e 100644 --- a/src/app/community-list-page/community-list/community-list.component.html +++ b/src/app/community-list-page/community-list/community-list.component.html @@ -1,4 +1,4 @@ - + {{ 'communityList.showMore' | translate }} - +
@@ -57,7 +57,7 @@ - +
diff --git a/src/app/community-page/community-page.component.html b/src/app/community-page/community-page.component.html index cf7282eb4b..95755fdaf1 100644 --- a/src/app/community-page/community-page.component.html +++ b/src/app/community-page/community-page.component.html @@ -41,5 +41,5 @@ - + diff --git a/src/app/community-page/sub-collection-list/community-page-sub-collection-list.component.html b/src/app/community-page/sub-collection-list/community-page-sub-collection-list.component.html index 9928ebd18a..69f16ee3ac 100644 --- a/src/app/community-page/sub-collection-list/community-page-sub-collection-list.component.html +++ b/src/app/community-page/sub-collection-list/community-page-sub-collection-list.component.html @@ -9,5 +9,5 @@ - +
diff --git a/src/app/community-page/sub-community-list/community-page-sub-community-list.component.html b/src/app/community-page/sub-community-list/community-page-sub-community-list.component.html index 2d14dce60a..be2788a9f4 100644 --- a/src/app/community-page/sub-community-list/community-page-sub-community-list.component.html +++ b/src/app/community-page/sub-community-list/community-page-sub-community-list.component.html @@ -9,5 +9,5 @@ - + diff --git a/src/app/home-page/top-level-community-list/top-level-community-list.component.html b/src/app/home-page/top-level-community-list/top-level-community-list.component.html index dbea87a175..788db6ea4f 100644 --- a/src/app/home-page/top-level-community-list/top-level-community-list.component.html +++ b/src/app/home-page/top-level-community-list/top-level-community-list.component.html @@ -10,4 +10,4 @@ - + diff --git a/src/app/item-page/edit-item-page/item-bitstreams/item-bitstreams.component.html b/src/app/item-page/edit-item-page/item-bitstreams/item-bitstreams.component.html index 315498378a..0d6a609e74 100644 --- a/src/app/item-page/edit-item-page/item-bitstreams/item-bitstreams.component.html +++ b/src/app/item-page/edit-item-page/item-bitstreams/item-bitstreams.component.html @@ -44,7 +44,7 @@ class="alert alert-info w-100 d-inline-block mt-4" role="alert"> {{'item.edit.bitstreams.empty' | translate}} - +
diff --git a/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/paginated-drag-and-drop-bitstream-list/paginated-drag-and-drop-bitstream-list.component.html b/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/paginated-drag-and-drop-bitstream-list/paginated-drag-and-drop-bitstream-list.component.html index f7904f6cc8..f54aa73597 100644 --- a/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/paginated-drag-and-drop-bitstream-list/paginated-drag-and-drop-bitstream-list.component.html +++ b/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/paginated-drag-and-drop-bitstream-list/paginated-drag-and-drop-bitstream-list.component.html @@ -29,5 +29,5 @@
- + diff --git a/src/app/item-page/edit-item-page/item-relationships/edit-relationship-list/edit-relationship-list.component.html b/src/app/item-page/edit-item-page/item-relationships/edit-relationship-list/edit-relationship-list.component.html index 86ab93662e..7cdc903f24 100644 --- a/src/app/item-page/edit-item-page/item-relationships/edit-relationship-list/edit-relationship-list.component.html +++ b/src/app/item-page/edit-item-page/item-relationships/edit-relationship-list/edit-relationship-list.component.html @@ -31,5 +31,5 @@
{{"item.edit.relationships.no-relationships" | translate}}
- + diff --git a/src/app/item-page/edit-item-page/item-relationships/item-relationships.component.html b/src/app/item-page/edit-item-page/item-relationships/item-relationships.component.html index 4a53445a6d..f19ab21871 100644 --- a/src/app/item-page/edit-item-page/item-relationships/item-relationships.component.html +++ b/src/app/item-page/edit-item-page/item-relationships/item-relationships.component.html @@ -32,7 +32,7 @@ >
- +
diff --git a/src/app/item-page/full/full-item-page.component.html b/src/app/item-page/full/full-item-page.component.html index d2655c4ad0..ea97a3957c 100644 --- a/src/app/item-page/full/full-item-page.component.html +++ b/src/app/item-page/full/full-item-page.component.html @@ -37,5 +37,5 @@
- + diff --git a/src/app/item-page/media-viewer/media-viewer.component.html b/src/app/item-page/media-viewer/media-viewer.component.html index b79b91629f..4259af5250 100644 --- a/src/app/item-page/media-viewer/media-viewer.component.html +++ b/src/app/item-page/media-viewer/media-viewer.component.html @@ -1,9 +1,9 @@ - + >
diff --git a/src/app/item-page/media-viewer/media-viewer.component.spec.ts b/src/app/item-page/media-viewer/media-viewer.component.spec.ts index cfd72bf416..39a35ebe61 100644 --- a/src/app/item-page/media-viewer/media-viewer.component.spec.ts +++ b/src/app/item-page/media-viewer/media-viewer.component.spec.ts @@ -110,7 +110,7 @@ describe('MediaViewerComponent', () => { }); it('should display a loading component', () => { - const loading = fixture.debugElement.query(By.css('ds-loading')); + const loading = fixture.debugElement.query(By.css('ds-themed-loading')); expect(loading.nativeElement).toBeDefined(); }); }); diff --git a/src/app/item-page/simple/field-components/file-section/file-section.component.html b/src/app/item-page/simple/field-components/file-section/file-section.component.html index 3d093f83c9..5fa5e5096f 100644 --- a/src/app/item-page/simple/field-components/file-section/file-section.component.html +++ b/src/app/item-page/simple/field-components/file-section/file-section.component.html @@ -6,7 +6,7 @@ ({{(file?.sizeBytes) | dsFileSize }}) - + diff --git a/src/app/item-page/simple/field-components/file-section/file-section.component.spec.ts b/src/app/item-page/simple/field-components/file-section/file-section.component.spec.ts index fdd6d14e7d..2d185aef9c 100644 --- a/src/app/item-page/simple/field-components/file-section/file-section.component.spec.ts +++ b/src/app/item-page/simple/field-components/file-section/file-section.component.spec.ts @@ -86,7 +86,7 @@ describe('FileSectionComponent', () => { }); it('should display a loading component', () => { - const loading = fixture.debugElement.query(By.css('ds-loading')); + const loading = fixture.debugElement.query(By.css('ds-themed-loading')); expect(loading.nativeElement).toBeDefined(); }); }); diff --git a/src/app/item-page/simple/item-page.component.html b/src/app/item-page/simple/item-page.component.html index 74b61fd976..d91f4b501d 100644 --- a/src/app/item-page/simple/item-page.component.html +++ b/src/app/item-page/simple/item-page.component.html @@ -9,5 +9,5 @@
- + diff --git a/src/app/item-page/simple/item-page.component.spec.ts b/src/app/item-page/simple/item-page.component.spec.ts index ff5a1e38d5..0b0f1e1724 100644 --- a/src/app/item-page/simple/item-page.component.spec.ts +++ b/src/app/item-page/simple/item-page.component.spec.ts @@ -85,7 +85,7 @@ describe('ItemPageComponent', () => { }); it('should display a loading component', () => { - const loading = fixture.debugElement.query(By.css('ds-loading')); + const loading = fixture.debugElement.query(By.css('ds-themed-loading')); expect(loading.nativeElement).toBeDefined(); }); }); diff --git a/src/app/item-page/simple/metadata-representation-list/metadata-representation-list.component.html b/src/app/item-page/simple/metadata-representation-list/metadata-representation-list.component.html index d1281f450a..e1559cb129 100644 --- a/src/app/item-page/simple/metadata-representation-list/metadata-representation-list.component.html +++ b/src/app/item-page/simple/metadata-representation-list/metadata-representation-list.component.html @@ -4,7 +4,7 @@ - + - + diff --git a/src/app/request-copy/grant-request-copy/grant-request-copy.component.html b/src/app/request-copy/grant-request-copy/grant-request-copy.component.html index d2c2cfc3c8..5cb4dbac36 100644 --- a/src/app/request-copy/grant-request-copy/grant-request-copy.component.html +++ b/src/app/request-copy/grant-request-copy/grant-request-copy.component.html @@ -13,5 +13,5 @@ - + diff --git a/src/app/root/root.component.html b/src/app/root/root.component.html index 898074352c..d0465af69f 100644 --- a/src/app/root/root.component.html +++ b/src/app/root/root.component.html @@ -13,7 +13,7 @@
- +
@@ -25,6 +25,6 @@
- +
diff --git a/src/app/shared/auth-nav-menu/user-menu/user-menu.component.html b/src/app/shared/auth-nav-menu/user-menu/user-menu.component.html index ac55a211e9..736d39d318 100644 --- a/src/app/shared/auth-nav-menu/user-menu/user-menu.component.html +++ b/src/app/shared/auth-nav-menu/user-menu/user-menu.component.html @@ -1,4 +1,4 @@ - +
{{(user$ | async)?.name}} ({{(user$ | async)?.email}}) {{'nav.profile' | translate}} diff --git a/src/app/shared/browse-by/browse-by.component.html b/src/app/shared/browse-by/browse-by.component.html index 6d1422293d..645a987abe 100644 --- a/src/app/shared/browse-by/browse-by.component.html +++ b/src/app/shared/browse-by/browse-by.component.html @@ -34,7 +34,7 @@
- + diff --git a/src/app/shared/comcol/comcol-forms/edit-comcol-page/comcol-role/comcol-role.component.html b/src/app/shared/comcol/comcol-forms/edit-comcol-page/comcol-role/comcol-role.component.html index b0a319b4ff..440785b89b 100644 --- a/src/app/shared/comcol/comcol-forms/edit-comcol-page/comcol-role/comcol-role.component.html +++ b/src/app/shared/comcol/comcol-forms/edit-comcol-page/comcol-role/comcol-role.component.html @@ -13,7 +13,7 @@
- +
{{'comcol-role.edit.no-group' | translate}}
diff --git a/src/app/shared/dso-selector/dso-selector/dso-selector.component.html b/src/app/shared/dso-selector/dso-selector/dso-selector.component.html index 4b46d3bc3f..d4283246d8 100644 --- a/src/app/shared/dso-selector/dso-selector/dso-selector.component.html +++ b/src/app/shared/dso-selector/dso-selector/dso-selector.component.html @@ -31,7 +31,7 @@
diff --git a/src/app/shared/entity-dropdown/entity-dropdown.component.html b/src/app/shared/entity-dropdown/entity-dropdown.component.html index 59c242ef97..a4d539625f 100644 --- a/src/app/shared/entity-dropdown/entity-dropdown.component.html +++ b/src/app/shared/entity-dropdown/entity-dropdown.component.html @@ -21,8 +21,8 @@ diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/existing-metadata-list-element/existing-metadata-list-element.component.html b/src/app/shared/form/builder/ds-dynamic-form-ui/existing-metadata-list-element/existing-metadata-list-element.component.html index 07ea131a00..62d34a8625 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/existing-metadata-list-element/existing-metadata-list-element.component.html +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/existing-metadata-list-element/existing-metadata-list-element.component.html @@ -1,7 +1,7 @@
- + diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/existing-relation-list-element/existing-relation-list-element.component.html b/src/app/shared/form/builder/ds-dynamic-form-ui/existing-relation-list-element/existing-relation-list-element.component.html index 15087d2553..ff91b18e1c 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/existing-relation-list-element/existing-relation-list-element.component.html +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/existing-relation-list-element/existing-relation-list-element.component.html @@ -1,7 +1,7 @@
- + diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.component.html b/src/app/shared/form/builder/ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.component.html index 84bc0f4ffe..05f443aad5 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.component.html +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.component.html @@ -57,7 +57,7 @@
- +
- + diff --git a/src/app/shared/object-list/my-dspace-result-list-element/workflow-item-search-result/workflow-item-search-result-list-element.component.html b/src/app/shared/object-list/my-dspace-result-list-element/workflow-item-search-result/workflow-item-search-result-list-element.component.html index 74fc5fd06d..f26de733b2 100644 --- a/src/app/shared/object-list/my-dspace-result-list-element/workflow-item-search-result/workflow-item-search-result-list-element.component.html +++ b/src/app/shared/object-list/my-dspace-result-list-element/workflow-item-search-result/workflow-item-search-result-list-element.component.html @@ -6,6 +6,6 @@ - + [showMessage]="false"> diff --git a/src/app/shared/object-list/my-dspace-result-list-element/workspace-item-search-result/workspace-item-search-result-list-element.component.html b/src/app/shared/object-list/my-dspace-result-list-element/workspace-item-search-result/workspace-item-search-result-list-element.component.html index 41d95b87af..2f0b04ef12 100644 --- a/src/app/shared/object-list/my-dspace-result-list-element/workspace-item-search-result/workspace-item-search-result-list-element.component.html +++ b/src/app/shared/object-list/my-dspace-result-list-element/workspace-item-search-result/workspace-item-search-result-list-element.component.html @@ -6,6 +6,6 @@ - + [showMessage]="false"> diff --git a/src/app/shared/object-select/collection-select/collection-select.component.html b/src/app/shared/object-select/collection-select/collection-select.component.html index 27ebcd9643..8ed41c5226 100644 --- a/src/app/shared/object-select/collection-select/collection-select.component.html +++ b/src/app/shared/object-select/collection-select/collection-select.component.html @@ -28,7 +28,7 @@ {{'collection.select.empty' | translate}}
- +
- + diff --git a/src/app/shared/shared.module.ts b/src/app/shared/shared.module.ts index 715ee66a99..f9391afdb4 100644 --- a/src/app/shared/shared.module.ts +++ b/src/app/shared/shared.module.ts @@ -177,6 +177,7 @@ import { ScopeSelectorModalComponent } from './search-form/scope-selector-modal/ import { BitstreamRequestACopyPageComponent } from './bitstream-request-a-copy-page/bitstream-request-a-copy-page.component'; import { DsSelectComponent } from './ds-select/ds-select.component'; import { LogInOidcComponent } from './log-in/methods/oidc/log-in-oidc.component'; +import { ThemedLoadingComponent } from './loading/themed-loading.component'; const MODULES = [ // Do NOT include UniversalModule, HttpModule, or JsonpModule here @@ -234,6 +235,7 @@ const COMPONENTS = [ FileSectionComponent, LangSwitchComponent, LoadingComponent, + ThemedLoadingComponent, LogInComponent, LogOutComponent, NumberPickerComponent, diff --git a/src/app/shared/vocabulary-treeview/vocabulary-treeview.component.html b/src/app/shared/vocabulary-treeview/vocabulary-treeview.component.html index 3f57e6a4c3..39c62d6e53 100644 --- a/src/app/shared/vocabulary-treeview/vocabulary-treeview.component.html +++ b/src/app/shared/vocabulary-treeview/vocabulary-treeview.component.html @@ -23,7 +23,7 @@
- +

{{'vocabulary-treeview.search.no-result' | translate}}

diff --git a/src/app/statistics-page/statistics-page/statistics-page.component.html b/src/app/statistics-page/statistics-page/statistics-page.component.html index 5cf1e9c8b5..c6938c7582 100644 --- a/src/app/statistics-page/statistics-page/statistics-page.component.html +++ b/src/app/statistics-page/statistics-page/statistics-page.component.html @@ -11,7 +11,7 @@ - + diff --git a/src/app/submission/form/submission-form.component.html b/src/app/submission/form/submission-form.component.html index c86d4e0195..a80fe35f4e 100644 --- a/src/app/submission/form/submission-form.component.html +++ b/src/app/submission/form/submission-form.component.html @@ -22,7 +22,7 @@
- +
- \ No newline at end of file + diff --git a/src/app/shared/menu/menu-section.decorator.ts b/src/app/shared/menu/menu-section.decorator.ts index 9374ab3c0d..18eedd1cf4 100644 --- a/src/app/shared/menu/menu-section.decorator.ts +++ b/src/app/shared/menu/menu-section.decorator.ts @@ -1,6 +1,6 @@ import { DEFAULT_THEME } from '../object-collection/shared/listable-object/listable-object.decorator'; import { MenuID } from './initial-menus-state'; -import { hasNoValue, hasValue } from '../empty.util'; +import { hasValue } from '../empty.util'; const menuComponentMap = new Map(); diff --git a/src/app/shared/theme-support/themed.component.ts b/src/app/shared/theme-support/themed.component.ts index 2ff0713f46..79ed914c5d 100644 --- a/src/app/shared/theme-support/themed.component.ts +++ b/src/app/shared/theme-support/themed.component.ts @@ -70,6 +70,7 @@ export abstract class ThemedComponent implements OnInit, OnDestroy, OnChanges this.lazyLoadSub = this.resolveThemedComponent(this.themeService.getThemeName()).pipe( switchMap((themedFile: any) => { + console.log(themedFile); if (hasValue(themedFile) && hasValue(themedFile[this.getComponentName()])) { // if the file is not null, and exports a component with the specified name, // return that component diff --git a/src/themes/custom/app/shared/loading/loading.component.html b/src/themes/custom/app/shared/loading/loading.component.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/shared/loading/loading.component.scss b/src/themes/custom/app/shared/loading/loading.component.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/shared/loading/loading.component.ts b/src/themes/custom/app/shared/loading/loading.component.ts new file mode 100644 index 0000000000..43249a4624 --- /dev/null +++ b/src/themes/custom/app/shared/loading/loading.component.ts @@ -0,0 +1,13 @@ +import { Component } from '@angular/core'; +import { LoadingComponent as BaseComponent } from '../../../../../app/shared/loading/loading.component'; + +@Component({ + selector: 'ds-loading', + styleUrls: ['../../../../../app/shared/loading/loading.component.scss'], + // styleUrls: ['./loading.component.scss'], + templateUrl: '../../../../app/shared/loading/loading.component.html' + // templateUrl: './loading.component.html' +}) +export class LoadingComponent extends BaseComponent { + +} diff --git a/src/themes/custom/theme.module.ts b/src/themes/custom/theme.module.ts index e2e97b9087..67ad6028ce 100644 --- a/src/themes/custom/theme.module.ts +++ b/src/themes/custom/theme.module.ts @@ -84,6 +84,7 @@ import { SearchModule } from '../../app/shared/search/search.module'; import { ResourcePoliciesModule } from '../../app/shared/resource-policies/resource-policies.module'; import { ComcolModule } from '../../app/shared/comcol/comcol.module'; import { FeedbackComponent } from './app/info/feedback/feedback.component'; +import { LoadingComponent } from './app/shared/loading/loading.component'; const DECLARATIONS = [ FileSectionComponent, @@ -126,7 +127,8 @@ const DECLARATIONS = [ NavbarComponent, HeaderNavbarWrapperComponent, BreadcrumbsComponent, - FeedbackComponent + FeedbackComponent, + LoadingComponent ]; @NgModule({ From 166a163c24fd0e6b05aa6a49fc8474c10c9a1600 Mon Sep 17 00:00:00 2001 From: Yana De Pauw Date: Wed, 11 May 2022 12:34:44 +0200 Subject: [PATCH 16/33] Fix custom loading components template url --- src/themes/custom/app/shared/loading/loading.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/themes/custom/app/shared/loading/loading.component.ts b/src/themes/custom/app/shared/loading/loading.component.ts index 43249a4624..fb1a291dc0 100644 --- a/src/themes/custom/app/shared/loading/loading.component.ts +++ b/src/themes/custom/app/shared/loading/loading.component.ts @@ -5,7 +5,7 @@ import { LoadingComponent as BaseComponent } from '../../../../../app/shared/loa selector: 'ds-loading', styleUrls: ['../../../../../app/shared/loading/loading.component.scss'], // styleUrls: ['./loading.component.scss'], - templateUrl: '../../../../app/shared/loading/loading.component.html' + templateUrl: '../../../../../app/shared/loading/loading.component.html' // templateUrl: './loading.component.html' }) export class LoadingComponent extends BaseComponent { From 67ffa89c472bc7f86283fd8e0bcd735f481d4bc6 Mon Sep 17 00:00:00 2001 From: Yana De Pauw Date: Wed, 11 May 2022 13:30:11 +0200 Subject: [PATCH 17/33] Remove console.log --- src/app/shared/theme-support/themed.component.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/app/shared/theme-support/themed.component.ts b/src/app/shared/theme-support/themed.component.ts index 79ed914c5d..2ff0713f46 100644 --- a/src/app/shared/theme-support/themed.component.ts +++ b/src/app/shared/theme-support/themed.component.ts @@ -70,7 +70,6 @@ export abstract class ThemedComponent implements OnInit, OnDestroy, OnChanges this.lazyLoadSub = this.resolveThemedComponent(this.themeService.getThemeName()).pipe( switchMap((themedFile: any) => { - console.log(themedFile); if (hasValue(themedFile) && hasValue(themedFile[this.getComponentName()])) { // if the file is not null, and exports a component with the specified name, // return that component From 5b4ecb9fc23633aad3224a9002cb56d85fc028c8 Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Wed, 11 May 2022 13:46:03 +0200 Subject: [PATCH 18/33] 89720: Themed ItemMetadataComponent --- .../item-metadata/item-metadata.component.html | 0 .../item-metadata/item-metadata.component.scss | 0 .../item-metadata/item-metadata.component.ts | 17 +++++++++++++++++ src/themes/custom/theme.module.ts | 4 +++- 4 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 src/themes/custom/app/item-page/edit-item-page/item-metadata/item-metadata.component.html create mode 100644 src/themes/custom/app/item-page/edit-item-page/item-metadata/item-metadata.component.scss create mode 100644 src/themes/custom/app/item-page/edit-item-page/item-metadata/item-metadata.component.ts diff --git a/src/themes/custom/app/item-page/edit-item-page/item-metadata/item-metadata.component.html b/src/themes/custom/app/item-page/edit-item-page/item-metadata/item-metadata.component.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/item-page/edit-item-page/item-metadata/item-metadata.component.scss b/src/themes/custom/app/item-page/edit-item-page/item-metadata/item-metadata.component.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/item-page/edit-item-page/item-metadata/item-metadata.component.ts b/src/themes/custom/app/item-page/edit-item-page/item-metadata/item-metadata.component.ts new file mode 100644 index 0000000000..d6d7c4b8fb --- /dev/null +++ b/src/themes/custom/app/item-page/edit-item-page/item-metadata/item-metadata.component.ts @@ -0,0 +1,17 @@ +import { Component } from '@angular/core'; +import { + ItemMetadataComponent as BaseComponent +} from '../../../../../../app/item-page/edit-item-page/item-metadata/item-metadata.component'; + +@Component({ + selector: 'ds-item-metadata', + // styleUrls: ['./item-metadata.component.scss'], + styleUrls: ['../../../../../../app/item-page/edit-item-page/item-metadata/item-metadata.component.scss'], + // templateUrl: './item-metadata.component.html', + templateUrl: '../../../../../../app/item-page/edit-item-page/item-metadata/item-metadata.component.html', +}) +/** + * Component for displaying an item's metadata edit page + */ +export class ItemMetadataComponent extends BaseComponent { +} diff --git a/src/themes/custom/theme.module.ts b/src/themes/custom/theme.module.ts index e2e97b9087..ce259b5841 100644 --- a/src/themes/custom/theme.module.ts +++ b/src/themes/custom/theme.module.ts @@ -84,6 +84,7 @@ import { SearchModule } from '../../app/shared/search/search.module'; import { ResourcePoliciesModule } from '../../app/shared/resource-policies/resource-policies.module'; import { ComcolModule } from '../../app/shared/comcol/comcol.module'; import { FeedbackComponent } from './app/info/feedback/feedback.component'; +import { ItemMetadataComponent } from './app/item-page/edit-item-page/item-metadata/item-metadata.component'; const DECLARATIONS = [ FileSectionComponent, @@ -126,7 +127,8 @@ const DECLARATIONS = [ NavbarComponent, HeaderNavbarWrapperComponent, BreadcrumbsComponent, - FeedbackComponent + FeedbackComponent, + ItemMetadataComponent, ]; @NgModule({ From a89375f67babaad5db95d9e661c8a89210940806 Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Wed, 11 May 2022 14:28:16 +0200 Subject: [PATCH 19/33] 89720: Themed EditItemTemplatePageComponent --- .../edit-item-template-page.component.html | 0 .../edit-item-template-page.component.scss | 0 .../edit-item-template-page.component.ts | 16 ++++++++++++++++ src/themes/custom/theme.module.ts | 4 ++++ 4 files changed, 20 insertions(+) create mode 100644 src/themes/custom/app/collection-page/edit-item-template-page/edit-item-template-page.component.html create mode 100644 src/themes/custom/app/collection-page/edit-item-template-page/edit-item-template-page.component.scss create mode 100644 src/themes/custom/app/collection-page/edit-item-template-page/edit-item-template-page.component.ts diff --git a/src/themes/custom/app/collection-page/edit-item-template-page/edit-item-template-page.component.html b/src/themes/custom/app/collection-page/edit-item-template-page/edit-item-template-page.component.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/collection-page/edit-item-template-page/edit-item-template-page.component.scss b/src/themes/custom/app/collection-page/edit-item-template-page/edit-item-template-page.component.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/collection-page/edit-item-template-page/edit-item-template-page.component.ts b/src/themes/custom/app/collection-page/edit-item-template-page/edit-item-template-page.component.ts new file mode 100644 index 0000000000..ad9f515dcf --- /dev/null +++ b/src/themes/custom/app/collection-page/edit-item-template-page/edit-item-template-page.component.ts @@ -0,0 +1,16 @@ +import { Component } from '@angular/core'; +import { + EditItemTemplatePageComponent as BaseComponent +} from '../../../../../app/collection-page/edit-item-template-page/edit-item-template-page.component'; + +@Component({ + selector: 'ds-edit-item-template-page', + styleUrls: ['./edit-item-template-page.component.scss'], + // templateUrl: './edit-item-template-page.component.html', + templateUrl: '../../../../../app/collection-page/edit-item-template-page/edit-item-template-page.component.html', +}) +/** + * Component for editing the item template of a collection + */ +export class EditItemTemplatePageComponent extends BaseComponent { +} diff --git a/src/themes/custom/theme.module.ts b/src/themes/custom/theme.module.ts index ce259b5841..af3dee50c0 100644 --- a/src/themes/custom/theme.module.ts +++ b/src/themes/custom/theme.module.ts @@ -85,6 +85,9 @@ import { ResourcePoliciesModule } from '../../app/shared/resource-policies/resou import { ComcolModule } from '../../app/shared/comcol/comcol.module'; import { FeedbackComponent } from './app/info/feedback/feedback.component'; import { ItemMetadataComponent } from './app/item-page/edit-item-page/item-metadata/item-metadata.component'; +import { + EditItemTemplatePageComponent +} from './app/collection-page/edit-item-template-page/edit-item-template-page.component'; const DECLARATIONS = [ FileSectionComponent, @@ -129,6 +132,7 @@ const DECLARATIONS = [ BreadcrumbsComponent, FeedbackComponent, ItemMetadataComponent, + EditItemTemplatePageComponent, ]; @NgModule({ From db375b8f4702acc19c14480d3f27a26ae023957c Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Thu, 12 May 2022 12:05:17 +0200 Subject: [PATCH 20/33] 91131: Added parent constructor to ThemedLoadingComponent --- src/app/shared/loading/themed-loading.component.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/app/shared/loading/themed-loading.component.ts b/src/app/shared/loading/themed-loading.component.ts index 2b6aa6212c..0f887a025f 100644 --- a/src/app/shared/loading/themed-loading.component.ts +++ b/src/app/shared/loading/themed-loading.component.ts @@ -1,6 +1,7 @@ -import { Component, Input } from '@angular/core'; -import { ThemedComponent } from '../../shared/theme-support/themed.component'; +import { Component, Input, ComponentFactoryResolver, ChangeDetectorRef } from '@angular/core'; +import { ThemedComponent } from '../theme-support/themed.component'; import { LoadingComponent } from './loading.component'; +import { ThemeService } from '../theme-support/theme.service'; /** * Themed wrapper for LoadingComponent @@ -17,6 +18,14 @@ export class ThemedLoadingComponent extends ThemedComponent { protected inAndOutputNames: (keyof LoadingComponent & keyof this)[] = ['message', 'showMessage']; + constructor( + protected resolver: ComponentFactoryResolver, + protected cdr: ChangeDetectorRef, + protected themeService: ThemeService + ) { + super(resolver, cdr, themeService); + } + protected getComponentName(): string { return 'LoadingComponent'; } From 5682c81217c5da5090ad6cbb4cb561cbca5cd84c Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Fri, 13 May 2022 13:45:49 +0200 Subject: [PATCH 21/33] 91272: Fixed import statements and position of expandable navbar button --- .../themed-expandable-navbar-section.component.ts | 4 ++-- src/app/navbar/navbar.component.html | 4 ++-- .../expandable-navbar-section.component.ts | 4 ++-- src/themes/dspace/app/navbar/navbar.component.html | 4 ++-- src/themes/dspace/styles/_global-styles.scss | 3 +-- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/app/navbar/expandable-navbar-section/themed-expandable-navbar-section.component.ts b/src/app/navbar/expandable-navbar-section/themed-expandable-navbar-section.component.ts index 744eeb5a02..e33dca4104 100644 --- a/src/app/navbar/expandable-navbar-section/themed-expandable-navbar-section.component.ts +++ b/src/app/navbar/expandable-navbar-section/themed-expandable-navbar-section.component.ts @@ -2,13 +2,13 @@ import { Component } from '@angular/core'; import { ThemedComponent } from '../../shared/theme-support/themed.component'; import { ExpandableNavbarSectionComponent } from './expandable-navbar-section.component'; import { rendersSectionForMenu } from '../../shared/menu/menu-section.decorator'; -import { MenuID } from '../../shared/menu/initial-menus-state'; +import { MenuID } from '../../shared/menu/menu-id.model'; /** * Themed wrapper for ExpandableNavbarSectionComponent */ @Component({ - /* tslint:disable:component-selector */ + /* eslint-disable @angular-eslint/component-selector */ selector: 'li[ds-themed-expandable-navbar-section]', styleUrls: [], templateUrl: '../../shared/theme-support/themed.component.html', diff --git a/src/app/navbar/navbar.component.html b/src/app/navbar/navbar.component.html index 63f308fb32..b41f2ea706 100644 --- a/src/app/navbar/navbar.component.html +++ b/src/app/navbar/navbar.component.html @@ -4,7 +4,7 @@
-
- \ No newline at end of file + diff --git a/src/themes/custom/app/navbar/expandable-navbar-section/expandable-navbar-section.component.ts b/src/themes/custom/app/navbar/expandable-navbar-section/expandable-navbar-section.component.ts index 283b9ca6f6..f7efd1fdca 100644 --- a/src/themes/custom/app/navbar/expandable-navbar-section/expandable-navbar-section.component.ts +++ b/src/themes/custom/app/navbar/expandable-navbar-section/expandable-navbar-section.component.ts @@ -4,13 +4,13 @@ import { } from '../../../../../app/navbar/expandable-navbar-section/expandable-navbar-section.component'; import { slide } from '../../../../../app/shared/animations/slide'; import { rendersSectionForMenu } from '../../../../../app/shared/menu/menu-section.decorator'; -import { MenuID } from '../../../../../app/shared/menu/initial-menus-state'; +import { MenuID } from '../../../../../app/shared/menu/menu-id.model'; /** * Represents an expandable section in the navbar */ @Component({ - /* tslint:disable:component-selector */ + /* eslint-disable @angular-eslint/component-selector */ selector: 'li[ds-expandable-navbar-section]', // templateUrl: './expandable-navbar-section.component.html', templateUrl: '../../../../../app/navbar/expandable-navbar-section/expandable-navbar-section.component.html', diff --git a/src/themes/dspace/app/navbar/navbar.component.html b/src/themes/dspace/app/navbar/navbar.component.html index 218fc368ba..6b71728494 100644 --- a/src/themes/dspace/app/navbar/navbar.component.html +++ b/src/themes/dspace/app/navbar/navbar.component.html @@ -6,7 +6,7 @@
-
- \ No newline at end of file + diff --git a/src/themes/dspace/styles/_global-styles.scss b/src/themes/dspace/styles/_global-styles.scss index 8682e3dcdf..3271f15bf2 100644 --- a/src/themes/dspace/styles/_global-styles.scss +++ b/src/themes/dspace/styles/_global-styles.scss @@ -23,8 +23,7 @@ } header { - li > .navbar-section, - li > .expandable-navbar-section { + .navbar-navigation > li { display: flex; flex-direction: column; justify-content: center; From e197e496b51aad5d05e4e6684a84cf435a1e15d4 Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Fri, 13 May 2022 17:19:42 +0200 Subject: [PATCH 22/33] 91272: Fixed accessibility violation --- .../admin-sidebar-section/admin-sidebar-section.component.ts | 2 ++ .../expandable-admin-sidebar-section.component.ts | 2 ++ .../expandable-navbar-section.component.ts | 3 +-- src/app/navbar/navbar-section/navbar-section.component.ts | 2 ++ .../expandable-navbar-section.component.ts | 3 +-- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/app/admin/admin-sidebar/admin-sidebar-section/admin-sidebar-section.component.ts b/src/app/admin/admin-sidebar/admin-sidebar-section/admin-sidebar-section.component.ts index 47f693cb99..422431d2c5 100644 --- a/src/app/admin/admin-sidebar/admin-sidebar-section/admin-sidebar-section.component.ts +++ b/src/app/admin/admin-sidebar/admin-sidebar-section/admin-sidebar-section.component.ts @@ -14,6 +14,8 @@ import { Router } from '@angular/router'; @Component({ /* eslint-disable @angular-eslint/component-selector */ selector: 'li[ds-admin-sidebar-section]', + // To theme this element remove the surrounding li[] in this component but leave it in the new + // ThemedAdminSidebarSectionComponent templateUrl: './admin-sidebar-section.component.html', styleUrls: ['./admin-sidebar-section.component.scss'], diff --git a/src/app/admin/admin-sidebar/expandable-admin-sidebar-section/expandable-admin-sidebar-section.component.ts b/src/app/admin/admin-sidebar/expandable-admin-sidebar-section/expandable-admin-sidebar-section.component.ts index 7cd20b15d2..28cadcac5f 100644 --- a/src/app/admin/admin-sidebar/expandable-admin-sidebar-section/expandable-admin-sidebar-section.component.ts +++ b/src/app/admin/admin-sidebar/expandable-admin-sidebar-section/expandable-admin-sidebar-section.component.ts @@ -17,6 +17,8 @@ import { Router } from '@angular/router'; @Component({ /* eslint-disable @angular-eslint/component-selector */ selector: 'li[ds-expandable-admin-sidebar-section]', + // To theme this element remove the surrounding li[] in this component but leave it in the new + // ThemedExpandableAdminSidebarSectionComponent templateUrl: './expandable-admin-sidebar-section.component.html', styleUrls: ['./expandable-admin-sidebar-section.component.scss'], animations: [rotate, slide, bgColor] diff --git a/src/app/navbar/expandable-navbar-section/expandable-navbar-section.component.ts b/src/app/navbar/expandable-navbar-section/expandable-navbar-section.component.ts index a6d3a52cd2..5bc69bcbb4 100644 --- a/src/app/navbar/expandable-navbar-section/expandable-navbar-section.component.ts +++ b/src/app/navbar/expandable-navbar-section/expandable-navbar-section.component.ts @@ -11,8 +11,7 @@ import { MenuID } from '../../shared/menu/menu-id.model'; * Represents an expandable section in the navbar */ @Component({ - /* eslint-disable @angular-eslint/component-selector */ - selector: 'li[ds-expandable-navbar-section]', + selector: 'ds-expandable-navbar-section', templateUrl: './expandable-navbar-section.component.html', styleUrls: ['./expandable-navbar-section.component.scss'], animations: [slide] diff --git a/src/app/navbar/navbar-section/navbar-section.component.ts b/src/app/navbar/navbar-section/navbar-section.component.ts index 9f75a96f6e..20d5299584 100644 --- a/src/app/navbar/navbar-section/navbar-section.component.ts +++ b/src/app/navbar/navbar-section/navbar-section.component.ts @@ -10,6 +10,8 @@ import { MenuID } from '../../shared/menu/menu-id.model'; @Component({ /* eslint-disable @angular-eslint/component-selector */ selector: 'li[ds-navbar-section]', + // To theme this element remove the surrounding li[] in this component but leave it in the new + // ThemedNavbarSectionComponent templateUrl: './navbar-section.component.html', styleUrls: ['./navbar-section.component.scss'] }) diff --git a/src/themes/custom/app/navbar/expandable-navbar-section/expandable-navbar-section.component.ts b/src/themes/custom/app/navbar/expandable-navbar-section/expandable-navbar-section.component.ts index f7efd1fdca..3e11271bf0 100644 --- a/src/themes/custom/app/navbar/expandable-navbar-section/expandable-navbar-section.component.ts +++ b/src/themes/custom/app/navbar/expandable-navbar-section/expandable-navbar-section.component.ts @@ -10,8 +10,7 @@ import { MenuID } from '../../../../../app/shared/menu/menu-id.model'; * Represents an expandable section in the navbar */ @Component({ - /* eslint-disable @angular-eslint/component-selector */ - selector: 'li[ds-expandable-navbar-section]', + selector: 'ds-expandable-navbar-section', // templateUrl: './expandable-navbar-section.component.html', templateUrl: '../../../../../app/navbar/expandable-navbar-section/expandable-navbar-section.component.html', // styleUrls: ['./expandable-navbar-section.component.scss'], From 460efa42c732dc80979e8733793c439282141c1e Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Fri, 13 May 2022 19:33:40 +0200 Subject: [PATCH 23/33] 91272: Fix merge request --- src/app/admin/admin-sidebar/admin-sidebar.component.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/app/admin/admin-sidebar/admin-sidebar.component.ts b/src/app/admin/admin-sidebar/admin-sidebar.component.ts index 5febf93deb..d4071b91ed 100644 --- a/src/app/admin/admin-sidebar/admin-sidebar.component.ts +++ b/src/app/admin/admin-sidebar/admin-sidebar.component.ts @@ -41,7 +41,6 @@ import { FeatureID } from '../../core/data/feature-authorization/feature-id'; import { MenuID } from '../../shared/menu/menu-id.model'; import { MenuItemType } from '../../shared/menu/menu-item-type.model'; import { ActivatedRoute } from '@angular/router'; -import { Router, ActivatedRoute } from '@angular/router'; import { ThemeService } from '../../shared/theme-support/theme.service'; /** From 743513cf848a7db3c5ec1fc97817a07fd6cdc134 Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Fri, 13 May 2022 20:35:08 +0200 Subject: [PATCH 24/33] 89676: Added empty SearchResultsComponent files --- .../shared/search/search-results/search-results.component.html | 0 .../shared/search/search-results/search-results.component.scss | 0 .../app/shared/search/search-results/search-results.component.ts | 1 + 3 files changed, 1 insertion(+) create mode 100644 src/themes/custom/app/shared/search/search-results/search-results.component.html create mode 100644 src/themes/custom/app/shared/search/search-results/search-results.component.scss diff --git a/src/themes/custom/app/shared/search/search-results/search-results.component.html b/src/themes/custom/app/shared/search/search-results/search-results.component.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/shared/search/search-results/search-results.component.scss b/src/themes/custom/app/shared/search/search-results/search-results.component.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/shared/search/search-results/search-results.component.ts b/src/themes/custom/app/shared/search/search-results/search-results.component.ts index bdfeea15a5..5084d4d405 100644 --- a/src/themes/custom/app/shared/search/search-results/search-results.component.ts +++ b/src/themes/custom/app/shared/search/search-results/search-results.component.ts @@ -6,6 +6,7 @@ import { fadeIn, fadeInOut } from '../../../../../../app/shared/animations/fade' selector: 'ds-search-results', // templateUrl: './search-results.component.html', templateUrl: '../../../../../../app/shared/search/search-results/search-results.component.html', + // styleUrls: ['./search-results.component.scss'], animations: [ fadeIn, fadeInOut From 3a483c393ddeeb94c90113bbd36320bf8abb3800 Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Fri, 27 May 2022 16:32:23 +0200 Subject: [PATCH 25/33] 89721: Themed UntypedItemComponent --- .../untyped-item/untyped-item.component.html | 0 .../untyped-item/untyped-item.component.scss | 0 .../untyped-item/untyped-item.component.ts | 25 +++++++++++++++++++ src/themes/custom/entry-components.ts | 4 ++- src/themes/custom/theme.module.ts | 22 ++++++++++++---- 5 files changed, 45 insertions(+), 6 deletions(-) create mode 100644 src/themes/custom/app/item-page/simple/item-types/untyped-item/untyped-item.component.html create mode 100644 src/themes/custom/app/item-page/simple/item-types/untyped-item/untyped-item.component.scss create mode 100644 src/themes/custom/app/item-page/simple/item-types/untyped-item/untyped-item.component.ts diff --git a/src/themes/custom/app/item-page/simple/item-types/untyped-item/untyped-item.component.html b/src/themes/custom/app/item-page/simple/item-types/untyped-item/untyped-item.component.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/item-page/simple/item-types/untyped-item/untyped-item.component.scss b/src/themes/custom/app/item-page/simple/item-types/untyped-item/untyped-item.component.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/item-page/simple/item-types/untyped-item/untyped-item.component.ts b/src/themes/custom/app/item-page/simple/item-types/untyped-item/untyped-item.component.ts new file mode 100644 index 0000000000..1d1676e92f --- /dev/null +++ b/src/themes/custom/app/item-page/simple/item-types/untyped-item/untyped-item.component.ts @@ -0,0 +1,25 @@ +import { ChangeDetectionStrategy, Component } from '@angular/core'; +import { Item } from '../../../../../../../app/core/shared/item.model'; +import { ViewMode } from '../../../../../../../app/core/shared/view-mode.model'; +import { + listableObjectComponent +} from '../../../../../../../app/shared/object-collection/shared/listable-object/listable-object.decorator'; +import { Context } from '../../../../../../../app/core/shared/context.model'; +import { + UntypedItemComponent as BaseComponent +} from '../../../../../../../app/item-page/simple/item-types/untyped-item/untyped-item.component'; + +/** + * Component that represents an untyped Item page + */ +@listableObjectComponent(Item, ViewMode.StandalonePage, Context.Any, 'custom') +@Component({ + selector: 'ds-untyped-item', + // styleUrls: ['./untyped-item.component.scss'], + styleUrls: ['../../../../../../../app/item-page/simple/item-types/untyped-item/untyped-item.component.scss'], + // templateUrl: './untyped-item.component.html', + templateUrl: '../../../../../../../app/item-page/simple/item-types/untyped-item/untyped-item.component.html', + changeDetection: ChangeDetectionStrategy.OnPush, +}) +export class UntypedItemComponent extends BaseComponent { +} diff --git a/src/themes/custom/entry-components.ts b/src/themes/custom/entry-components.ts index b518e4cc45..9a9c0624a4 100644 --- a/src/themes/custom/entry-components.ts +++ b/src/themes/custom/entry-components.ts @@ -1,5 +1,7 @@ import { PublicationComponent } from './app/item-page/simple/item-types/publication/publication.component'; +import { UntypedItemComponent } from './app/item-page/simple/item-types/untyped-item/untyped-item.component'; export const ENTRY_COMPONENTS = [ - PublicationComponent + PublicationComponent, + UntypedItemComponent, ]; diff --git a/src/themes/custom/theme.module.ts b/src/themes/custom/theme.module.ts index e2e97b9087..c5d5e5a1c4 100644 --- a/src/themes/custom/theme.module.ts +++ b/src/themes/custom/theme.module.ts @@ -34,6 +34,7 @@ import { HomePageModule } from '../../app/home-page/home-page.module'; import { RootComponent } from './app/root/root.component'; import { AppModule } from '../../app/app.module'; import { PublicationComponent } from './app/item-page/simple/item-types/publication/publication.component'; +import { UntypedItemComponent } from './app/item-page/simple/item-types/untyped-item/untyped-item.component'; import { ItemPageModule } from '../../app/item-page/item-page.module'; import { RouterModule } from '@angular/router'; import { AccessControlModule } from '../../app/access-control/access-control.module'; @@ -47,8 +48,12 @@ import { PageNotFoundComponent } from './app/pagenotfound/pagenotfound.component import { ObjectNotFoundComponent } from './app/lookup-by-id/objectnotfound/objectnotfound.component'; import { ForbiddenComponent } from './app/forbidden/forbidden.component'; import { PrivacyComponent } from './app/info/privacy/privacy.component'; -import { CollectionStatisticsPageComponent } from './app/statistics-page/collection-statistics-page/collection-statistics-page.component'; -import { CommunityStatisticsPageComponent } from './app/statistics-page/community-statistics-page/community-statistics-page.component'; +import { + CollectionStatisticsPageComponent +} from './app/statistics-page/collection-statistics-page/collection-statistics-page.component'; +import { + CommunityStatisticsPageComponent +} from './app/statistics-page/community-statistics-page/community-statistics-page.component'; import { StatisticsPageModule } from '../../app/statistics-page/statistics-page.module'; import { ItemStatisticsPageComponent } from './app/statistics-page/item-statistics-page/item-statistics-page.component'; import { SiteStatisticsPageComponent } from './app/statistics-page/site-statistics-page/site-statistics-page.component'; @@ -67,11 +72,17 @@ import { ForgotPasswordFormComponent } from './app/forgot-password/forgot-passwo import { ProfilePageComponent } from './app/profile-page/profile-page.component'; import { RegisterEmailComponent } from './app/register-page/register-email/register-email.component'; import { SubmissionEditComponent } from './app/submission/edit/submission-edit.component'; -import { SubmissionImportExternalComponent } from './app/submission/import-external/submission-import-external.component'; +import { + SubmissionImportExternalComponent +} from './app/submission/import-external/submission-import-external.component'; import { SubmissionSubmitComponent } from './app/submission/submit/submission-submit.component'; import { MyDSpacePageComponent } from './app/my-dspace-page/my-dspace-page.component'; -import { WorkflowItemSendBackComponent } from './app/workflowitems-edit-page/workflow-item-send-back/workflow-item-send-back.component'; -import { WorkflowItemDeleteComponent } from './app/workflowitems-edit-page/workflow-item-delete/workflow-item-delete.component'; +import { + WorkflowItemSendBackComponent +} from './app/workflowitems-edit-page/workflow-item-send-back/workflow-item-send-back.component'; +import { + WorkflowItemDeleteComponent +} from './app/workflowitems-edit-page/workflow-item-delete/workflow-item-delete.component'; import { SubmissionModule } from '../../app/submission/submission.module'; import { MyDSpacePageModule } from '../../app/my-dspace-page/my-dspace-page.module'; import { NavbarComponent } from './app/navbar/navbar.component'; @@ -91,6 +102,7 @@ const DECLARATIONS = [ HomeNewsComponent, RootComponent, PublicationComponent, + UntypedItemComponent, BrowseBySwitcherComponent, CommunityListPageComponent, SearchPageComponent, From 533e4c982f43f2859951479c1302b3343226941d Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Thu, 2 Jun 2022 10:22:46 +0200 Subject: [PATCH 26/33] 91272: Small fixes --- .../listable-object-component-loader.component.ts | 2 ++ .../app/info/end-user-agreement/end-user-agreement.component.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/shared/object-collection/shared/listable-object/listable-object-component-loader.component.ts b/src/app/shared/object-collection/shared/listable-object/listable-object-component-loader.component.ts index 8adbcbeec3..9c7ad5f659 100644 --- a/src/app/shared/object-collection/shared/listable-object/listable-object-component-loader.component.ts +++ b/src/app/shared/object-collection/shared/listable-object/listable-object-component-loader.component.ts @@ -128,6 +128,8 @@ export class ListableObjectComponentLoaderComponent implements OnInit, OnChanges 'context', 'viewMode', 'value', + 'hideBadges', + 'contentChange', ]; constructor( diff --git a/src/themes/custom/app/info/end-user-agreement/end-user-agreement.component.ts b/src/themes/custom/app/info/end-user-agreement/end-user-agreement.component.ts index e3e5ac8d19..50e196bfaf 100644 --- a/src/themes/custom/app/info/end-user-agreement/end-user-agreement.component.ts +++ b/src/themes/custom/app/info/end-user-agreement/end-user-agreement.component.ts @@ -2,7 +2,7 @@ import { Component } from '@angular/core'; import { EndUserAgreementComponent as BaseComponent } from '../../../../../app/info/end-user-agreement/end-user-agreement.component'; @Component({ - selector: 'ds-home-news', + selector: 'ds-end-user-agreement', // styleUrls: ['./end-user-agreement.component.scss'], styleUrls: ['../../../../../app/info/end-user-agreement/end-user-agreement.component.scss'], // templateUrl: './end-user-agreement.component.html' From 2441db16e93a500f8ed4849537be918d86696086 Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Fri, 27 May 2022 18:53:56 +0200 Subject: [PATCH 27/33] 89721: Themed JournalIssueComponent --- .../journal-issue.component.html | 0 .../journal-issue.component.scss | 0 .../journal-issue/journal-issue.component.ts | 23 +++++++++++++++++++ src/themes/custom/entry-components.ts | 4 ++++ src/themes/custom/theme.module.ts | 6 ++++- 5 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 src/themes/custom/app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component.html create mode 100644 src/themes/custom/app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component.scss create mode 100644 src/themes/custom/app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component.ts diff --git a/src/themes/custom/app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component.html b/src/themes/custom/app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component.scss b/src/themes/custom/app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component.ts b/src/themes/custom/app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component.ts new file mode 100644 index 0000000000..a9f23c25f6 --- /dev/null +++ b/src/themes/custom/app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component.ts @@ -0,0 +1,23 @@ +import { Component } from '@angular/core'; +import { ViewMode } from '../../../../../../../app/core/shared/view-mode.model'; +import { + listableObjectComponent +} from '../../../../../../../app/shared/object-collection/shared/listable-object/listable-object.decorator'; +import { + JournalIssueComponent as BaseComponent +} from '../../../../../../../app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component'; +import { Context } from '../../../../../../../app/core/shared/context.model'; + +@listableObjectComponent('JournalIssue', ViewMode.StandalonePage, Context.Any, 'custom') +@Component({ + selector: 'ds-journal-issue', + // styleUrls: ['./journal-issue.component.scss'], + styleUrls: ['../../../../../../../app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component.scss'], + // templateUrl: './journal-issue.component.html', + templateUrl: '../../../../../../../app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component.html', +}) +/** + * The component for displaying metadata and relations of an item of the type Journal Issue + */ +export class JournalIssueComponent extends BaseComponent { +} diff --git a/src/themes/custom/entry-components.ts b/src/themes/custom/entry-components.ts index 9a9c0624a4..b5c4469718 100644 --- a/src/themes/custom/entry-components.ts +++ b/src/themes/custom/entry-components.ts @@ -1,7 +1,11 @@ +import { + JournalIssueComponent +} from './app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component'; import { PublicationComponent } from './app/item-page/simple/item-types/publication/publication.component'; import { UntypedItemComponent } from './app/item-page/simple/item-types/untyped-item/untyped-item.component'; export const ENTRY_COMPONENTS = [ + JournalIssueComponent, PublicationComponent, UntypedItemComponent, ]; diff --git a/src/themes/custom/theme.module.ts b/src/themes/custom/theme.module.ts index c5d5e5a1c4..5fb1ce580b 100644 --- a/src/themes/custom/theme.module.ts +++ b/src/themes/custom/theme.module.ts @@ -95,6 +95,9 @@ import { SearchModule } from '../../app/shared/search/search.module'; import { ResourcePoliciesModule } from '../../app/shared/resource-policies/resource-policies.module'; import { ComcolModule } from '../../app/shared/comcol/comcol.module'; import { FeedbackComponent } from './app/info/feedback/feedback.component'; +import { + JournalIssueComponent +} from './app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component'; const DECLARATIONS = [ FileSectionComponent, @@ -138,7 +141,8 @@ const DECLARATIONS = [ NavbarComponent, HeaderNavbarWrapperComponent, BreadcrumbsComponent, - FeedbackComponent + FeedbackComponent, + JournalIssueComponent, ]; @NgModule({ From 2264067240e3d7302878e59fae02e27fc65d096e Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Fri, 27 May 2022 19:12:03 +0200 Subject: [PATCH 28/33] 89721: Themed JournalVolumeComponent --- .../journal-volume.component.html | 0 .../journal-volume.component.scss | 0 .../journal-volume.component.ts | 23 +++++++++++++++++++ src/themes/custom/entry-components.ts | 4 ++++ src/themes/custom/theme.module.ts | 4 ++++ 5 files changed, 31 insertions(+) create mode 100644 src/themes/custom/app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component.html create mode 100644 src/themes/custom/app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component.scss create mode 100644 src/themes/custom/app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component.ts diff --git a/src/themes/custom/app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component.html b/src/themes/custom/app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component.scss b/src/themes/custom/app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component.ts b/src/themes/custom/app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component.ts new file mode 100644 index 0000000000..1a190dc2e8 --- /dev/null +++ b/src/themes/custom/app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component.ts @@ -0,0 +1,23 @@ +import { Component } from '@angular/core'; +import { ViewMode } from '../../../../../../../app/core/shared/view-mode.model'; +import { + listableObjectComponent +} from '../../../../../../../app/shared/object-collection/shared/listable-object/listable-object.decorator'; +import { + JournalVolumeComponent as BaseComponent +} from '../../../../../../../app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component'; +import { Context } from '../../../../../../../app/core/shared/context.model'; + +@listableObjectComponent('JournalVolume', ViewMode.StandalonePage, Context.Any, 'custom') +@Component({ + selector: 'ds-journal-volume', + // styleUrls: ['./journal-volume.component.scss'], + styleUrls: ['../../../../../../../app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component.scss'], + // templateUrl: './journal-volume.component.html', + templateUrl: '../../../../../../../app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component.html', +}) +/** + * The component for displaying metadata and relations of an item of the type Journal Volume + */ +export class JournalVolumeComponent extends BaseComponent { +} diff --git a/src/themes/custom/entry-components.ts b/src/themes/custom/entry-components.ts index b5c4469718..8f24a3b7e6 100644 --- a/src/themes/custom/entry-components.ts +++ b/src/themes/custom/entry-components.ts @@ -1,11 +1,15 @@ import { JournalIssueComponent } from './app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component'; +import { + JournalVolumeComponent +} from './app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component'; import { PublicationComponent } from './app/item-page/simple/item-types/publication/publication.component'; import { UntypedItemComponent } from './app/item-page/simple/item-types/untyped-item/untyped-item.component'; export const ENTRY_COMPONENTS = [ JournalIssueComponent, + JournalVolumeComponent, PublicationComponent, UntypedItemComponent, ]; diff --git a/src/themes/custom/theme.module.ts b/src/themes/custom/theme.module.ts index 5fb1ce580b..3193b200af 100644 --- a/src/themes/custom/theme.module.ts +++ b/src/themes/custom/theme.module.ts @@ -98,6 +98,9 @@ import { FeedbackComponent } from './app/info/feedback/feedback.component'; import { JournalIssueComponent } from './app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component'; +import { + JournalVolumeComponent +} from './app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component'; const DECLARATIONS = [ FileSectionComponent, @@ -143,6 +146,7 @@ const DECLARATIONS = [ BreadcrumbsComponent, FeedbackComponent, JournalIssueComponent, + JournalVolumeComponent, ]; @NgModule({ From bca332a23aed34b5e96ea6cfae8cfccd92173fc3 Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Mon, 30 May 2022 10:12:04 +0200 Subject: [PATCH 29/33] 89721: Themed JournalComponent --- .../item-pages/journal/journal.component.html | 0 .../item-pages/journal/journal.component.scss | 0 .../item-pages/journal/journal.component.ts | 23 +++++++++++++++++++ src/themes/custom/entry-components.ts | 2 ++ src/themes/custom/theme.module.ts | 6 ++++- 5 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 src/themes/custom/app/entity-groups/journal-entities/item-pages/journal/journal.component.html create mode 100644 src/themes/custom/app/entity-groups/journal-entities/item-pages/journal/journal.component.scss create mode 100644 src/themes/custom/app/entity-groups/journal-entities/item-pages/journal/journal.component.ts diff --git a/src/themes/custom/app/entity-groups/journal-entities/item-pages/journal/journal.component.html b/src/themes/custom/app/entity-groups/journal-entities/item-pages/journal/journal.component.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/entity-groups/journal-entities/item-pages/journal/journal.component.scss b/src/themes/custom/app/entity-groups/journal-entities/item-pages/journal/journal.component.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/entity-groups/journal-entities/item-pages/journal/journal.component.ts b/src/themes/custom/app/entity-groups/journal-entities/item-pages/journal/journal.component.ts new file mode 100644 index 0000000000..7b64c1a35d --- /dev/null +++ b/src/themes/custom/app/entity-groups/journal-entities/item-pages/journal/journal.component.ts @@ -0,0 +1,23 @@ +import { Component } from '@angular/core'; +import { ViewMode } from '../../../../../../../app/core/shared/view-mode.model'; +import { + listableObjectComponent +} from '../../../../../../../app/shared/object-collection/shared/listable-object/listable-object.decorator'; +import { + JournalComponent as BaseComponent +} from '../../../../../../../app/entity-groups/journal-entities/item-pages/journal/journal.component'; +import { Context } from '../../../../../../../app/core/shared/context.model'; + +@listableObjectComponent('Journal', ViewMode.StandalonePage, Context.Any, 'custom') +@Component({ + selector: 'ds-journal', + // styleUrls: ['./journal.component.scss'], + styleUrls: ['../../../../../../../app/entity-groups/journal-entities/item-pages/journal/journal.component.scss'], + // templateUrl: './journal.component.html', + templateUrl: '../../../../../../../app/entity-groups/journal-entities/item-pages/journal/journal.component.html', +}) +/** + * The component for displaying metadata and relations of an item of the type Journal + */ +export class JournalComponent extends BaseComponent { +} diff --git a/src/themes/custom/entry-components.ts b/src/themes/custom/entry-components.ts index 8f24a3b7e6..ca4c40f523 100644 --- a/src/themes/custom/entry-components.ts +++ b/src/themes/custom/entry-components.ts @@ -1,3 +1,4 @@ +import { JournalComponent } from './app/entity-groups/journal-entities/item-pages/journal/journal.component'; import { JournalIssueComponent } from './app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component'; @@ -8,6 +9,7 @@ import { PublicationComponent } from './app/item-page/simple/item-types/publicat import { UntypedItemComponent } from './app/item-page/simple/item-types/untyped-item/untyped-item.component'; export const ENTRY_COMPONENTS = [ + JournalComponent, JournalIssueComponent, JournalVolumeComponent, PublicationComponent, diff --git a/src/themes/custom/theme.module.ts b/src/themes/custom/theme.module.ts index 3193b200af..b42dfa80ac 100644 --- a/src/themes/custom/theme.module.ts +++ b/src/themes/custom/theme.module.ts @@ -95,12 +95,14 @@ import { SearchModule } from '../../app/shared/search/search.module'; import { ResourcePoliciesModule } from '../../app/shared/resource-policies/resource-policies.module'; import { ComcolModule } from '../../app/shared/comcol/comcol.module'; import { FeedbackComponent } from './app/info/feedback/feedback.component'; +import { JournalComponent } from './app/entity-groups/journal-entities/item-pages/journal/journal.component'; import { JournalIssueComponent } from './app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component'; import { JournalVolumeComponent } from './app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component'; +import { ItemSharedModule } from '../../app/item-page/item-shared.module'; const DECLARATIONS = [ FileSectionComponent, @@ -145,6 +147,7 @@ const DECLARATIONS = [ HeaderNavbarWrapperComponent, BreadcrumbsComponent, FeedbackComponent, + JournalComponent, JournalIssueComponent, JournalVolumeComponent, ]; @@ -196,7 +199,8 @@ const DECLARATIONS = [ SearchModule, FormsModule, ResourcePoliciesModule, - ComcolModule + ComcolModule, + ItemSharedModule, ], declarations: DECLARATIONS }) From dc5d46993e33f31d5c35b52777fc544c1d372d84 Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Fri, 27 May 2022 11:14:28 +0200 Subject: [PATCH 30/33] 89721: Themed AdminSidebarComponent --- .../admin-sidebar/admin-sidebar.component.html | 0 .../admin-sidebar/admin-sidebar.component.scss | 0 .../admin-sidebar/admin-sidebar.component.ts | 15 +++++++++++++++ src/themes/custom/theme.module.ts | 2 ++ 4 files changed, 17 insertions(+) create mode 100644 src/themes/custom/app/admin/admin-sidebar/admin-sidebar.component.html create mode 100644 src/themes/custom/app/admin/admin-sidebar/admin-sidebar.component.scss create mode 100644 src/themes/custom/app/admin/admin-sidebar/admin-sidebar.component.ts diff --git a/src/themes/custom/app/admin/admin-sidebar/admin-sidebar.component.html b/src/themes/custom/app/admin/admin-sidebar/admin-sidebar.component.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/admin/admin-sidebar/admin-sidebar.component.scss b/src/themes/custom/app/admin/admin-sidebar/admin-sidebar.component.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/admin/admin-sidebar/admin-sidebar.component.ts b/src/themes/custom/app/admin/admin-sidebar/admin-sidebar.component.ts new file mode 100644 index 0000000000..6485ad98e6 --- /dev/null +++ b/src/themes/custom/app/admin/admin-sidebar/admin-sidebar.component.ts @@ -0,0 +1,15 @@ +import { Component } from '@angular/core'; +import { AdminSidebarComponent as BaseComponent } from '../../../../../app/admin/admin-sidebar/admin-sidebar.component'; + +/** + * Component representing the admin sidebar + */ +@Component({ + selector: 'ds-admin-sidebar', + // templateUrl: './admin-sidebar.component.html', + templateUrl: '../../../../../app/admin/admin-sidebar/admin-sidebar.component.html', + // styleUrls: ['./admin-sidebar.component.scss'] + styleUrls: ['../../../../../app/admin/admin-sidebar/admin-sidebar.component.scss'] +}) +export class AdminSidebarComponent extends BaseComponent { +} diff --git a/src/themes/custom/theme.module.ts b/src/themes/custom/theme.module.ts index b42dfa80ac..95203336dd 100644 --- a/src/themes/custom/theme.module.ts +++ b/src/themes/custom/theme.module.ts @@ -103,6 +103,7 @@ import { JournalVolumeComponent } from './app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component'; import { ItemSharedModule } from '../../app/item-page/item-shared.module'; +import { AdminSidebarComponent } from './app/admin/admin-sidebar/admin-sidebar.component'; const DECLARATIONS = [ FileSectionComponent, @@ -150,6 +151,7 @@ const DECLARATIONS = [ JournalComponent, JournalIssueComponent, JournalVolumeComponent, + AdminSidebarComponent, ]; @NgModule({ From fc1e6b6b852da9fc635144caf84da08ddaaa5f8e Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Fri, 3 Jun 2022 11:47:46 +0200 Subject: [PATCH 31/33] Removed comments for how to theme li[Component] --- .../admin-sidebar-section/admin-sidebar-section.component.ts | 2 -- .../expandable-admin-sidebar-section.component.ts | 2 -- src/app/navbar/navbar-section/navbar-section.component.ts | 2 -- 3 files changed, 6 deletions(-) diff --git a/src/app/admin/admin-sidebar/admin-sidebar-section/admin-sidebar-section.component.ts b/src/app/admin/admin-sidebar/admin-sidebar-section/admin-sidebar-section.component.ts index 422431d2c5..47f693cb99 100644 --- a/src/app/admin/admin-sidebar/admin-sidebar-section/admin-sidebar-section.component.ts +++ b/src/app/admin/admin-sidebar/admin-sidebar-section/admin-sidebar-section.component.ts @@ -14,8 +14,6 @@ import { Router } from '@angular/router'; @Component({ /* eslint-disable @angular-eslint/component-selector */ selector: 'li[ds-admin-sidebar-section]', - // To theme this element remove the surrounding li[] in this component but leave it in the new - // ThemedAdminSidebarSectionComponent templateUrl: './admin-sidebar-section.component.html', styleUrls: ['./admin-sidebar-section.component.scss'], diff --git a/src/app/admin/admin-sidebar/expandable-admin-sidebar-section/expandable-admin-sidebar-section.component.ts b/src/app/admin/admin-sidebar/expandable-admin-sidebar-section/expandable-admin-sidebar-section.component.ts index 28cadcac5f..7cd20b15d2 100644 --- a/src/app/admin/admin-sidebar/expandable-admin-sidebar-section/expandable-admin-sidebar-section.component.ts +++ b/src/app/admin/admin-sidebar/expandable-admin-sidebar-section/expandable-admin-sidebar-section.component.ts @@ -17,8 +17,6 @@ import { Router } from '@angular/router'; @Component({ /* eslint-disable @angular-eslint/component-selector */ selector: 'li[ds-expandable-admin-sidebar-section]', - // To theme this element remove the surrounding li[] in this component but leave it in the new - // ThemedExpandableAdminSidebarSectionComponent templateUrl: './expandable-admin-sidebar-section.component.html', styleUrls: ['./expandable-admin-sidebar-section.component.scss'], animations: [rotate, slide, bgColor] diff --git a/src/app/navbar/navbar-section/navbar-section.component.ts b/src/app/navbar/navbar-section/navbar-section.component.ts index 20d5299584..9f75a96f6e 100644 --- a/src/app/navbar/navbar-section/navbar-section.component.ts +++ b/src/app/navbar/navbar-section/navbar-section.component.ts @@ -10,8 +10,6 @@ import { MenuID } from '../../shared/menu/menu-id.model'; @Component({ /* eslint-disable @angular-eslint/component-selector */ selector: 'li[ds-navbar-section]', - // To theme this element remove the surrounding li[] in this component but leave it in the new - // ThemedNavbarSectionComponent templateUrl: './navbar-section.component.html', styleUrls: ['./navbar-section.component.scss'] }) From e9372395f4e84946653fcc56ea3489120c4a10f5 Mon Sep 17 00:00:00 2001 From: lotte Date: Fri, 15 Jul 2022 11:41:38 +0200 Subject: [PATCH 32/33] make collections on item page into an input --- .../field-components/collections/collections.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/item-page/field-components/collections/collections.component.ts b/src/app/item-page/field-components/collections/collections.component.ts index 23aff80160..34b1385f46 100644 --- a/src/app/item-page/field-components/collections/collections.component.ts +++ b/src/app/item-page/field-components/collections/collections.component.ts @@ -30,7 +30,7 @@ export class CollectionsComponent implements OnInit { label = 'item.page.collections'; - separator = '
'; + @Input() separator = '
'; /** * Amount of mapped collections that should be fetched at once. From c7a88f99d62674595eaec14ae21bb3c00afc9eaa Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Tue, 26 Jul 2022 00:34:19 +0200 Subject: [PATCH 33/33] Center expandable navbar section in header --- src/themes/dspace/app/navbar/navbar.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/themes/dspace/app/navbar/navbar.component.html b/src/themes/dspace/app/navbar/navbar.component.html index 6b71728494..512ef45265 100644 --- a/src/themes/dspace/app/navbar/navbar.component.html +++ b/src/themes/dspace/app/navbar/navbar.component.html @@ -6,7 +6,7 @@
-