From f378d53d4cdf338a31a9aca69be54ad690f2c34b Mon Sep 17 00:00:00 2001 From: Michael Spalti Date: Wed, 7 Dec 2022 12:16:45 -0800 Subject: [PATCH 01/25] Item back button and tests. --- .../journal-issue.component.html | 8 ++ .../journal-volume.component.html | 8 ++ .../item-pages/journal/journal.component.html | 8 ++ .../journal/journal.component.spec.ts | 3 +- .../org-unit/org-unit.component.html | 8 ++ .../item-pages/person/person.component.html | 8 ++ .../item-pages/project/project.component.html | 8 ++ .../publication/publication.component.html | 8 ++ .../publication/publication.component.spec.ts | 21 ++- .../item-types/shared/item.component.spec.ts | 126 +++++++++++++++++- .../item-types/shared/item.component.ts | 28 +++- .../untyped-item/untyped-item.component.html | 9 ++ .../untyped-item.component.spec.ts | 29 ++-- .../versioned-item.component.ts | 6 +- src/assets/i18n/en.json5 | 3 + 15 files changed, 251 insertions(+), 30 deletions(-) diff --git a/src/app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component.html b/src/app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component.html index bf73a62447..5e98a5f3f0 100644 --- a/src/app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component.html +++ b/src/app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component.html @@ -1,3 +1,11 @@ +
+
+ +
+
+
diff --git a/src/app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component.html b/src/app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component.html index b370431a27..75b159f9eb 100644 --- a/src/app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component.html +++ b/src/app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component.html @@ -1,3 +1,11 @@ +
+
+ +
+
+
diff --git a/src/app/entity-groups/journal-entities/item-pages/journal/journal.component.html b/src/app/entity-groups/journal-entities/item-pages/journal/journal.component.html index 27ee373237..5f5cd09a49 100644 --- a/src/app/entity-groups/journal-entities/item-pages/journal/journal.component.html +++ b/src/app/entity-groups/journal-entities/item-pages/journal/journal.component.html @@ -1,3 +1,11 @@ +
+
+ +
+
+
diff --git a/src/app/entity-groups/journal-entities/item-pages/journal/journal.component.spec.ts b/src/app/entity-groups/journal-entities/item-pages/journal/journal.component.spec.ts index 4469a2ac29..7e20edca6b 100644 --- a/src/app/entity-groups/journal-entities/item-pages/journal/journal.component.spec.ts +++ b/src/app/entity-groups/journal-entities/item-pages/journal/journal.component.spec.ts @@ -34,6 +34,7 @@ import { VersionHistoryDataService } from '../../../../core/data/version-history import { VersionDataService } from '../../../../core/data/version-data.service'; import { WorkspaceitemDataService } from '../../../../core/submission/workspaceitem-data.service'; import { SearchService } from '../../../../core/shared/search/search.service'; +import { mockRouteService } from '../../../../item-page/simple/item-types/shared/item.component.spec'; let comp: JournalComponent; let fixture: ComponentFixture; @@ -99,7 +100,7 @@ describe('JournalComponent', () => { { provide: BitstreamDataService, useValue: mockBitstreamDataService }, { provide: WorkspaceitemDataService, useValue: {} }, { provide: SearchService, useValue: {} }, - { provide: RouteService, useValue: {} } + { provide: RouteService, useValue: mockRouteService } ], schemas: [NO_ERRORS_SCHEMA] diff --git a/src/app/entity-groups/research-entities/item-pages/org-unit/org-unit.component.html b/src/app/entity-groups/research-entities/item-pages/org-unit/org-unit.component.html index ac92e4ad6d..e743aeb935 100644 --- a/src/app/entity-groups/research-entities/item-pages/org-unit/org-unit.component.html +++ b/src/app/entity-groups/research-entities/item-pages/org-unit/org-unit.component.html @@ -1,3 +1,11 @@ +
+
+ +
+
+
diff --git a/src/app/entity-groups/research-entities/item-pages/person/person.component.html b/src/app/entity-groups/research-entities/item-pages/person/person.component.html index a73236006b..d046578873 100644 --- a/src/app/entity-groups/research-entities/item-pages/person/person.component.html +++ b/src/app/entity-groups/research-entities/item-pages/person/person.component.html @@ -1,3 +1,11 @@ +
+
+ +
+
+
diff --git a/src/app/entity-groups/research-entities/item-pages/project/project.component.html b/src/app/entity-groups/research-entities/item-pages/project/project.component.html index 3fb5e2d520..808ba17f36 100644 --- a/src/app/entity-groups/research-entities/item-pages/project/project.component.html +++ b/src/app/entity-groups/research-entities/item-pages/project/project.component.html @@ -1,3 +1,11 @@ +
+
+ +
+
+
diff --git a/src/app/item-page/simple/item-types/publication/publication.component.html b/src/app/item-page/simple/item-types/publication/publication.component.html index 181480b789..e2f78a7f32 100644 --- a/src/app/item-page/simple/item-types/publication/publication.component.html +++ b/src/app/item-page/simple/item-types/publication/publication.component.html @@ -1,3 +1,11 @@ +
+
+ +
+
+
{ describe('with IIIF viewer and search', () => { + const localMockRouteService = { + getPreviousUrl(): Observable { + return of('/search?query=test%20query&fakeParam=true'); + } + }; beforeEach(waitForAsync(() => { - const localMockRouteService = { - getPreviousUrl(): Observable { - return of('/search?query=test%20query&fakeParam=true'); - } - }; const iiifEnabledMap: MetadataMap = { 'dspace.iiif.enabled': [getIIIFEnabled(true)], 'iiif.search.enabled': [getIIIFSearchEnabled(true)], @@ -193,13 +193,12 @@ describe('PublicationComponent', () => { }); describe('with IIIF viewer and search but no previous search query', () => { - + const localMockRouteService = { + getPreviousUrl(): Observable { + return of('/item'); + } + }; beforeEach(waitForAsync(() => { - const localMockRouteService = { - getPreviousUrl(): Observable { - return of('/item'); - } - }; const iiifEnabledMap: MetadataMap = { 'dspace.iiif.enabled': [getIIIFEnabled(true)], 'iiif.search.enabled': [getIIIFSearchEnabled(true)], diff --git a/src/app/item-page/simple/item-types/shared/item.component.spec.ts b/src/app/item-page/simple/item-types/shared/item.component.spec.ts index b14e56a58e..b47d12caee 100644 --- a/src/app/item-page/simple/item-types/shared/item.component.spec.ts +++ b/src/app/item-page/simple/item-types/shared/item.component.spec.ts @@ -39,6 +39,12 @@ import { VersionHistoryDataService } from '../../../../core/data/version-history import { RouterTestingModule } from '@angular/router/testing'; import { AuthorizationDataService } from '../../../../core/data/feature-authorization/authorization-data.service'; import { ResearcherProfileDataService } from '../../../../core/profile/researcher-profile-data.service'; +import { Router } from '@angular/router'; + +import { buildPaginatedList } from '../../../../core/data/paginated-list.model'; +import { PageInfo } from '../../../../core/shared/page-info.model'; +import { ItemComponent } from './item.component'; +import { ItemVersionsSharedService } from '../../../../shared/item/item-versions/item-versions-shared.service'; export function getIIIFSearchEnabled(enabled: boolean): MetadataValue { return Object.assign(new MetadataValue(), { @@ -60,7 +66,11 @@ export function getIIIFEnabled(enabled: boolean): MetadataValue { }); } -export const mockRouteService = jasmine.createSpyObj('RouteService', ['getPreviousUrl']); +export const mockRouteService = { + getPreviousUrl(): Observable { + return observableOf(''); + } +}; /** * Create a generic test for an item-page-fields component using a mockItem and the type of component @@ -115,7 +125,7 @@ export function getItemPageFieldsTest(mockItem: Item, component) { { provide: BitstreamDataService, useValue: mockBitstreamDataService }, { provide: WorkspaceitemDataService, useValue: {} }, { provide: SearchService, useValue: {} }, - { provide: RouteService, useValue: {} }, + { provide: RouteService, useValue: mockRouteService }, { provide: AuthorizationDataService, useValue: authorizationService }, { provide: ResearcherProfileDataService, useValue: {} } ], @@ -377,4 +387,116 @@ describe('ItemComponent', () => { }); }); + const mockItem: Item = Object.assign(new Item(), { + bundles: createSuccessfulRemoteDataObject$(buildPaginatedList(new PageInfo(), [])), + metadata: { + 'publicationissue.issueNumber': [ + { + language: 'en_US', + value: '1234' + } + ], + 'dc.description': [ + { + language: 'en_US', + value: 'desc' + } + ] + }, + }); + + describe('back to results', () => { + let comp: ItemComponent; + let fixture: ComponentFixture; + let router: Router; + + const searchUrl = '/search?query=test&spc.page=2'; + const browseUrl = '/browse/title?scope=0cc&bbm.page=3'; + const recentSubmissionsUrl = '/collections/be7b8430-77a5-4016-91c9-90863e50583a?cp.page=3'; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + imports: [ + TranslateModule.forRoot({ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), + RouterTestingModule, + ], + declarations: [ItemComponent, GenericItemPageFieldComponent, TruncatePipe ], + providers: [ + { provide: ItemDataService, useValue: {} }, + { provide: TruncatableService, useValue: {} }, + { provide: RelationshipDataService, useValue: {} }, + { provide: ObjectCacheService, useValue: {} }, + { provide: UUIDService, useValue: {} }, + { provide: Store, useValue: {} }, + { provide: RemoteDataBuildService, useValue: {} }, + { provide: CommunityDataService, useValue: {} }, + { provide: HALEndpointService, useValue: {} }, + { provide: NotificationsService, useValue: {} }, + { provide: HttpClient, useValue: {} }, + { provide: DSOChangeAnalyzer, useValue: {} }, + { provide: DefaultChangeAnalyzer, useValue: {} }, + { provide: VersionHistoryDataService, useValue: {} }, + { provide: VersionDataService, useValue: {} }, + { provide: BitstreamDataService, useValue: {} }, + { provide: WorkspaceitemDataService, useValue: {} }, + { provide: SearchService, useValue: {} }, + { provide: ItemDataService, useValue: {} }, + { provide: ItemVersionsSharedService, useValue: {} }, + { provide: RouteService, useValue: mockRouteService } + ], + schemas: [NO_ERRORS_SCHEMA] + }).overrideComponent(ItemComponent, { + set: {changeDetection: ChangeDetectionStrategy.Default} + }); + })); + + beforeEach(waitForAsync(() => { + router = TestBed.inject(Router); + spyOn(router, 'navigateByUrl'); + spyOn(mockRouteService, 'getPreviousUrl').and.returnValue(observableOf('')); + TestBed.compileComponents(); + fixture = TestBed.createComponent(ItemComponent); + comp = fixture.componentInstance; + comp.object = mockItem; + fixture.detectChanges(); + })); + + it('should hide back button',() => { + spyOn(mockRouteService, 'getPreviousUrl').and.returnValue(observableOf('')); + comp.showBackButton.subscribe((val) => { + expect(val).toBeFalse(); + }); + }); + it('should show back button', () => { + spyOn(mockRouteService, 'getPreviousUrl').and.returnValue(observableOf(searchUrl)); + comp.ngOnInit(); + comp.showBackButton.subscribe((val) => { + expect(val).toBeTrue(); + }); + }); + it('should navigate back to the search list', () => { + spyOn(mockRouteService, 'getPreviousUrl').and.returnValue(observableOf(searchUrl)); + comp.back(); + expect(mockRouteService.getPreviousUrl).toHaveBeenCalled(); + expect(router.navigateByUrl).toHaveBeenCalledWith(searchUrl); + }); + it('should navigate back to the browse list', () => { + spyOn(mockRouteService, 'getPreviousUrl').and.returnValue(observableOf(browseUrl)); + comp.back(); + expect(mockRouteService.getPreviousUrl).toHaveBeenCalled(); + expect(router.navigateByUrl).toHaveBeenCalledWith(browseUrl); + }); + it('should navigate back to the recent submissions list', () => { + spyOn(mockRouteService, 'getPreviousUrl').and.returnValue(observableOf(recentSubmissionsUrl)); + comp.back(); + expect(mockRouteService.getPreviousUrl).toHaveBeenCalled(); + expect(router.navigateByUrl).toHaveBeenCalledWith(recentSubmissionsUrl); + }); + }); + }); diff --git a/src/app/item-page/simple/item-types/shared/item.component.ts b/src/app/item-page/simple/item-types/shared/item.component.ts index 71b0b5b678..b5037924f3 100644 --- a/src/app/item-page/simple/item-types/shared/item.component.ts +++ b/src/app/item-page/simple/item-types/shared/item.component.ts @@ -5,6 +5,8 @@ import { getItemPageRoute } from '../../../item-page-routing-paths'; import { RouteService } from '../../../../core/services/route.service'; import { Observable } from 'rxjs'; import { getDSpaceQuery, isIiifEnabled, isIiifSearchEnabled } from './item-iiif-utils'; +import { filter, map, take } from 'rxjs/operators'; +import { Router } from '@angular/router'; @Component({ selector: 'ds-item', @@ -36,12 +38,29 @@ export class ItemComponent implements OnInit { */ iiifQuery$: Observable; + /** + * Used to configure search in mirador. + */ + showBackButton: Observable; + mediaViewer; - constructor(protected routeService: RouteService) { + constructor(protected routeService: RouteService, + protected router: Router) { this.mediaViewer = environment.mediaViewer; } + /** + * Navigate back from the item to the previous pagination url. + */ + public back() { + this.routeService.getPreviousUrl().pipe( + take(1) + ).subscribe( + (url => this.router.navigateByUrl(url)) + ); + } + ngOnInit(): void { this.itemPageRoute = getItemPageRoute(this.object); // check to see if iiif viewer is required. @@ -50,5 +69,12 @@ export class ItemComponent implements OnInit { if (this.iiifSearchEnabled) { this.iiifQuery$ = getDSpaceQuery(this.object, this.routeService); } + // Show the back to results button when the previous context was search, browse, + // or recent submissions pagination. + this.showBackButton = this.routeService.getPreviousUrl().pipe( + filter(url => /^(\/search|\/browse|\/collections)/.test(url)), + take(1), + map(() => true) + ); } } diff --git a/src/app/item-page/simple/item-types/untyped-item/untyped-item.component.html b/src/app/item-page/simple/item-types/untyped-item/untyped-item.component.html index 5c3e5e77b0..2b0458d14c 100644 --- a/src/app/item-page/simple/item-types/untyped-item/untyped-item.component.html +++ b/src/app/item-page/simple/item-types/untyped-item/untyped-item.component.html @@ -1,3 +1,11 @@ +
+
+ +
+
+
+
diff --git a/src/app/item-page/simple/item-types/untyped-item/untyped-item.component.spec.ts b/src/app/item-page/simple/item-types/untyped-item/untyped-item.component.spec.ts index 57f546fbec..135810d543 100644 --- a/src/app/item-page/simple/item-types/untyped-item/untyped-item.component.spec.ts +++ b/src/app/item-page/simple/item-types/untyped-item/untyped-item.component.spec.ts @@ -169,13 +169,12 @@ describe('UntypedItemComponent', () => { }); describe('with IIIF viewer and search', () => { - + const localMockRouteService = { + getPreviousUrl(): Observable { + return of('/search?query=test%20query&fakeParam=true'); + } + }; beforeEach(waitForAsync(() => { - const localMockRouteService = { - getPreviousUrl(): Observable { - return of('/search?query=test%20query&fakeParam=true'); - } - }; const iiifEnabledMap: MetadataMap = { 'dspace.iiif.enabled': [getIIIFEnabled(true)], 'iiif.search.enabled': [getIIIFSearchEnabled(true)], @@ -183,6 +182,7 @@ describe('UntypedItemComponent', () => { TestBed.overrideProvider(RouteService, {useValue: localMockRouteService}); TestBed.compileComponents(); fixture = TestBed.createComponent(UntypedItemComponent); + spyOn(localMockRouteService, 'getPreviousUrl').and.callThrough(); comp = fixture.componentInstance; comp.object = getItem(iiifEnabledMap); fixture.detectChanges(); @@ -196,17 +196,21 @@ describe('UntypedItemComponent', () => { it('should retrieve the query term for previous route', (): void => { expect(comp.iiifQuery$.subscribe(result => expect(result).toEqual('test query'))); }); - + it('should navigate back to the browse list', () => { + comp.back(); + expect(localMockRouteService.getPreviousUrl).toHaveBeenCalled(); + //expect(routerSpy.navigateByUrl).toHaveBeenCalledWith(url); + }); }); describe('with IIIF viewer and search but no previous search query', () => { + const localMockRouteService = { + getPreviousUrl(): Observable { + return of('/item'); + } + }; beforeEach(waitForAsync(() => { - const localMockRouteService = { - getPreviousUrl(): Observable { - return of('/item'); - } - }; const iiifEnabledMap: MetadataMap = { 'dspace.iiif.enabled': [getIIIFEnabled(true)], 'iiif.search.enabled': [getIIIFSearchEnabled(true)], @@ -214,6 +218,7 @@ describe('UntypedItemComponent', () => { TestBed.overrideProvider(RouteService, {useValue: localMockRouteService}); TestBed.compileComponents(); fixture = TestBed.createComponent(UntypedItemComponent); + comp = fixture.componentInstance; comp.object = getItem(iiifEnabledMap); fixture.detectChanges(); diff --git a/src/app/item-page/simple/item-types/versioned-item/versioned-item.component.ts b/src/app/item-page/simple/item-types/versioned-item/versioned-item.component.ts index 7f61cee10b..2dbbd494d6 100644 --- a/src/app/item-page/simple/item-types/versioned-item/versioned-item.component.ts +++ b/src/app/item-page/simple/item-types/versioned-item/versioned-item.component.ts @@ -31,13 +31,13 @@ export class VersionedItemComponent extends ItemComponent { private translateService: TranslateService, private versionService: VersionDataService, private itemVersionShared: ItemVersionsSharedService, - private router: Router, + protected router: Router, private workspaceItemDataService: WorkspaceitemDataService, private searchService: SearchService, private itemService: ItemDataService, - protected routeService: RouteService + protected routeService: RouteService, ) { - super(routeService); + super(routeService, router); } /** diff --git a/src/assets/i18n/en.json5 b/src/assets/i18n/en.json5 index a806588701..68c7d55522 100644 --- a/src/assets/i18n/en.json5 +++ b/src/assets/i18n/en.json5 @@ -780,6 +780,9 @@ "browse.title.page": "Browsing {{ collection }} by {{ field }} {{ value }}", + "search-browse-item-return": "Back to Results", + + "chips.remove": "Remove chip", From 9fefe064bf99c70051b1b0a91eee715bdc4633ca Mon Sep 17 00:00:00 2001 From: Michael Spalti Date: Wed, 7 Dec 2022 13:45:54 -0800 Subject: [PATCH 02/25] Added some space below the button. --- .../item-pages/journal-issue/journal-issue.component.html | 2 +- .../item-pages/journal-issue/journal-issue.component.scss | 4 ++++ .../item-pages/journal-volume/journal-volume.component.html | 2 +- .../item-pages/journal-volume/journal-volume.component.scss | 4 ++++ .../item-pages/journal/journal.component.html | 2 +- .../item-pages/journal/journal.component.scss | 4 ++++ .../item-pages/org-unit/org-unit.component.html | 2 +- .../item-pages/org-unit/org-unit.component.scss | 4 ++++ .../research-entities/item-pages/person/person.component.html | 2 +- .../research-entities/item-pages/person/person.component.scss | 4 ++++ .../item-pages/project/project.component.html | 2 +- .../item-pages/project/project.component.scss | 4 ++++ .../simple/item-types/publication/publication.component.html | 2 +- .../simple/item-types/publication/publication.component.scss | 4 ++++ .../item-types/untyped-item/untyped-item.component.html | 2 +- .../item-types/untyped-item/untyped-item.component.scss | 3 +++ 16 files changed, 39 insertions(+), 8 deletions(-) diff --git a/src/app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component.html b/src/app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component.html index 5e98a5f3f0..22002d4af6 100644 --- a/src/app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component.html +++ b/src/app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component.html @@ -1,6 +1,6 @@
-
diff --git a/src/app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component.scss b/src/app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component.scss index 3575cae797..b596e76018 100644 --- a/src/app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component.scss +++ b/src/app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component.scss @@ -1 +1,5 @@ @import '../../../../../styles/variables.scss'; + +button.back-btn { + margin-bottom: 10px; +} diff --git a/src/app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component.html b/src/app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component.html index 75b159f9eb..23b600691c 100644 --- a/src/app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component.html +++ b/src/app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component.html @@ -1,6 +1,6 @@
-
diff --git a/src/app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component.scss b/src/app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component.scss index 3575cae797..b596e76018 100644 --- a/src/app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component.scss +++ b/src/app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component.scss @@ -1 +1,5 @@ @import '../../../../../styles/variables.scss'; + +button.back-btn { + margin-bottom: 10px; +} diff --git a/src/app/entity-groups/journal-entities/item-pages/journal/journal.component.html b/src/app/entity-groups/journal-entities/item-pages/journal/journal.component.html index 5f5cd09a49..f52990f539 100644 --- a/src/app/entity-groups/journal-entities/item-pages/journal/journal.component.html +++ b/src/app/entity-groups/journal-entities/item-pages/journal/journal.component.html @@ -1,6 +1,6 @@
-
diff --git a/src/app/entity-groups/journal-entities/item-pages/journal/journal.component.scss b/src/app/entity-groups/journal-entities/item-pages/journal/journal.component.scss index 3575cae797..b596e76018 100644 --- a/src/app/entity-groups/journal-entities/item-pages/journal/journal.component.scss +++ b/src/app/entity-groups/journal-entities/item-pages/journal/journal.component.scss @@ -1 +1,5 @@ @import '../../../../../styles/variables.scss'; + +button.back-btn { + margin-bottom: 10px; +} diff --git a/src/app/entity-groups/research-entities/item-pages/org-unit/org-unit.component.html b/src/app/entity-groups/research-entities/item-pages/org-unit/org-unit.component.html index e743aeb935..bd75e0bcde 100644 --- a/src/app/entity-groups/research-entities/item-pages/org-unit/org-unit.component.html +++ b/src/app/entity-groups/research-entities/item-pages/org-unit/org-unit.component.html @@ -1,6 +1,6 @@
-
diff --git a/src/app/entity-groups/research-entities/item-pages/org-unit/org-unit.component.scss b/src/app/entity-groups/research-entities/item-pages/org-unit/org-unit.component.scss index 3575cae797..b596e76018 100644 --- a/src/app/entity-groups/research-entities/item-pages/org-unit/org-unit.component.scss +++ b/src/app/entity-groups/research-entities/item-pages/org-unit/org-unit.component.scss @@ -1 +1,5 @@ @import '../../../../../styles/variables.scss'; + +button.back-btn { + margin-bottom: 10px; +} diff --git a/src/app/entity-groups/research-entities/item-pages/person/person.component.html b/src/app/entity-groups/research-entities/item-pages/person/person.component.html index d046578873..a1486fde0e 100644 --- a/src/app/entity-groups/research-entities/item-pages/person/person.component.html +++ b/src/app/entity-groups/research-entities/item-pages/person/person.component.html @@ -1,6 +1,6 @@
-
diff --git a/src/app/entity-groups/research-entities/item-pages/person/person.component.scss b/src/app/entity-groups/research-entities/item-pages/person/person.component.scss index 3575cae797..b596e76018 100644 --- a/src/app/entity-groups/research-entities/item-pages/person/person.component.scss +++ b/src/app/entity-groups/research-entities/item-pages/person/person.component.scss @@ -1 +1,5 @@ @import '../../../../../styles/variables.scss'; + +button.back-btn { + margin-bottom: 10px; +} diff --git a/src/app/entity-groups/research-entities/item-pages/project/project.component.html b/src/app/entity-groups/research-entities/item-pages/project/project.component.html index 808ba17f36..991cbf864d 100644 --- a/src/app/entity-groups/research-entities/item-pages/project/project.component.html +++ b/src/app/entity-groups/research-entities/item-pages/project/project.component.html @@ -1,6 +1,6 @@
-
diff --git a/src/app/entity-groups/research-entities/item-pages/project/project.component.scss b/src/app/entity-groups/research-entities/item-pages/project/project.component.scss index 3575cae797..b596e76018 100644 --- a/src/app/entity-groups/research-entities/item-pages/project/project.component.scss +++ b/src/app/entity-groups/research-entities/item-pages/project/project.component.scss @@ -1 +1,5 @@ @import '../../../../../styles/variables.scss'; + +button.back-btn { + margin-bottom: 10px; +} diff --git a/src/app/item-page/simple/item-types/publication/publication.component.html b/src/app/item-page/simple/item-types/publication/publication.component.html index e2f78a7f32..9c02fc8fd8 100644 --- a/src/app/item-page/simple/item-types/publication/publication.component.html +++ b/src/app/item-page/simple/item-types/publication/publication.component.html @@ -1,6 +1,6 @@
-
diff --git a/src/app/item-page/simple/item-types/publication/publication.component.scss b/src/app/item-page/simple/item-types/publication/publication.component.scss index 3575cae797..b596e76018 100644 --- a/src/app/item-page/simple/item-types/publication/publication.component.scss +++ b/src/app/item-page/simple/item-types/publication/publication.component.scss @@ -1 +1,5 @@ @import '../../../../../styles/variables.scss'; + +button.back-btn { + margin-bottom: 10px; +} diff --git a/src/app/item-page/simple/item-types/untyped-item/untyped-item.component.html b/src/app/item-page/simple/item-types/untyped-item/untyped-item.component.html index 2b0458d14c..ebc4aaa38a 100644 --- a/src/app/item-page/simple/item-types/untyped-item/untyped-item.component.html +++ b/src/app/item-page/simple/item-types/untyped-item/untyped-item.component.html @@ -1,6 +1,6 @@
-
diff --git a/src/app/item-page/simple/item-types/untyped-item/untyped-item.component.scss b/src/app/item-page/simple/item-types/untyped-item/untyped-item.component.scss index 3575cae797..efbfe5c4f9 100644 --- a/src/app/item-page/simple/item-types/untyped-item/untyped-item.component.scss +++ b/src/app/item-page/simple/item-types/untyped-item/untyped-item.component.scss @@ -1 +1,4 @@ @import '../../../../../styles/variables.scss'; +button.back-btn { + margin-bottom: 10px; +} From d029e804953e1a2b1636dbf3dcc431de302b34b3 Mon Sep 17 00:00:00 2001 From: Michael Spalti Date: Mon, 19 Dec 2022 12:32:53 -0800 Subject: [PATCH 03/25] Convert to themed, shared component --- .../journal-issue.component.html | 6 +-- .../journal-volume.component.html | 6 +-- .../item-pages/journal/journal.component.html | 6 +-- .../org-unit/org-unit.component.html | 6 +-- .../item-pages/person/person.component.html | 6 +-- .../item-pages/project/project.component.html | 6 +-- .../publication/publication.component.html | 6 +-- .../item-types/shared/item.component.spec.ts | 18 ------- .../item-types/shared/item.component.ts | 16 +------ .../untyped-item/untyped-item.component.html | 6 +-- .../untyped-item.component.spec.ts | 5 -- .../versioned-item.component.ts | 2 +- .../item-back-button.component.html | 4 ++ .../item-back-button.component.scss | 4 ++ .../item-back-button.component.spec.ts | 48 +++++++++++++++++++ .../item-back-button.component.ts | 32 +++++++++++++ .../themed-item-back-button.component.ts | 23 +++++++++ src/app/shared/shared.module.ts | 4 ++ .../item-back-button.component.html | 0 .../item-back-button.component.scss | 0 .../item-back-button.component.ts | 13 +++++ src/themes/custom/eager-theme.module.ts | 2 + 22 files changed, 148 insertions(+), 71 deletions(-) create mode 100644 src/app/shared/item-back-button/item-back-button.component.html create mode 100644 src/app/shared/item-back-button/item-back-button.component.scss create mode 100644 src/app/shared/item-back-button/item-back-button.component.spec.ts create mode 100644 src/app/shared/item-back-button/item-back-button.component.ts create mode 100644 src/app/shared/item-back-button/themed-item-back-button.component.ts create mode 100644 src/themes/custom/app/shared/item-back-button/item-back-button.component.html create mode 100644 src/themes/custom/app/shared/item-back-button/item-back-button.component.scss create mode 100644 src/themes/custom/app/shared/item-back-button/item-back-button.component.ts diff --git a/src/app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component.html b/src/app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component.html index 22002d4af6..0507153ab7 100644 --- a/src/app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component.html +++ b/src/app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component.html @@ -1,8 +1,6 @@ -
+
- +
diff --git a/src/app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component.html b/src/app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component.html index 23b600691c..6265b515a8 100644 --- a/src/app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component.html +++ b/src/app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component.html @@ -1,8 +1,6 @@ -
+
- +
diff --git a/src/app/entity-groups/journal-entities/item-pages/journal/journal.component.html b/src/app/entity-groups/journal-entities/item-pages/journal/journal.component.html index f52990f539..ddd4b53a30 100644 --- a/src/app/entity-groups/journal-entities/item-pages/journal/journal.component.html +++ b/src/app/entity-groups/journal-entities/item-pages/journal/journal.component.html @@ -1,8 +1,6 @@ -
+
- +
diff --git a/src/app/entity-groups/research-entities/item-pages/org-unit/org-unit.component.html b/src/app/entity-groups/research-entities/item-pages/org-unit/org-unit.component.html index bd75e0bcde..89a3417d62 100644 --- a/src/app/entity-groups/research-entities/item-pages/org-unit/org-unit.component.html +++ b/src/app/entity-groups/research-entities/item-pages/org-unit/org-unit.component.html @@ -1,8 +1,6 @@ -
+
- +
diff --git a/src/app/entity-groups/research-entities/item-pages/person/person.component.html b/src/app/entity-groups/research-entities/item-pages/person/person.component.html index a1486fde0e..f805b6568c 100644 --- a/src/app/entity-groups/research-entities/item-pages/person/person.component.html +++ b/src/app/entity-groups/research-entities/item-pages/person/person.component.html @@ -1,8 +1,6 @@ -
+
- +
diff --git a/src/app/entity-groups/research-entities/item-pages/project/project.component.html b/src/app/entity-groups/research-entities/item-pages/project/project.component.html index 991cbf864d..6ccfdbf5e0 100644 --- a/src/app/entity-groups/research-entities/item-pages/project/project.component.html +++ b/src/app/entity-groups/research-entities/item-pages/project/project.component.html @@ -1,8 +1,6 @@ -
+
- +
diff --git a/src/app/item-page/simple/item-types/publication/publication.component.html b/src/app/item-page/simple/item-types/publication/publication.component.html index 9c02fc8fd8..2741d90500 100644 --- a/src/app/item-page/simple/item-types/publication/publication.component.html +++ b/src/app/item-page/simple/item-types/publication/publication.component.html @@ -1,8 +1,6 @@ -
+
- +
diff --git a/src/app/item-page/simple/item-types/shared/item.component.spec.ts b/src/app/item-page/simple/item-types/shared/item.component.spec.ts index 914483bbfd..7544a857b3 100644 --- a/src/app/item-page/simple/item-types/shared/item.component.spec.ts +++ b/src/app/item-page/simple/item-types/shared/item.component.spec.ts @@ -478,24 +478,6 @@ describe('ItemComponent', () => { expect(val).toBeTrue(); }); }); - it('should navigate back to the search list', () => { - spyOn(mockRouteService, 'getPreviousUrl').and.returnValue(observableOf(searchUrl)); - comp.back(); - expect(mockRouteService.getPreviousUrl).toHaveBeenCalled(); - expect(router.navigateByUrl).toHaveBeenCalledWith(searchUrl); - }); - it('should navigate back to the browse list', () => { - spyOn(mockRouteService, 'getPreviousUrl').and.returnValue(observableOf(browseUrl)); - comp.back(); - expect(mockRouteService.getPreviousUrl).toHaveBeenCalled(); - expect(router.navigateByUrl).toHaveBeenCalledWith(browseUrl); - }); - it('should navigate back to the recent submissions list', () => { - spyOn(mockRouteService, 'getPreviousUrl').and.returnValue(observableOf(recentSubmissionsUrl)); - comp.back(); - expect(mockRouteService.getPreviousUrl).toHaveBeenCalled(); - expect(router.navigateByUrl).toHaveBeenCalledWith(recentSubmissionsUrl); - }); }); }); diff --git a/src/app/item-page/simple/item-types/shared/item.component.ts b/src/app/item-page/simple/item-types/shared/item.component.ts index b5037924f3..297886dfaa 100644 --- a/src/app/item-page/simple/item-types/shared/item.component.ts +++ b/src/app/item-page/simple/item-types/shared/item.component.ts @@ -6,7 +6,6 @@ import { RouteService } from '../../../../core/services/route.service'; import { Observable } from 'rxjs'; import { getDSpaceQuery, isIiifEnabled, isIiifSearchEnabled } from './item-iiif-utils'; import { filter, map, take } from 'rxjs/operators'; -import { Router } from '@angular/router'; @Component({ selector: 'ds-item', @@ -45,22 +44,9 @@ export class ItemComponent implements OnInit { mediaViewer; - constructor(protected routeService: RouteService, - protected router: Router) { + constructor(protected routeService: RouteService) { this.mediaViewer = environment.mediaViewer; } - - /** - * Navigate back from the item to the previous pagination url. - */ - public back() { - this.routeService.getPreviousUrl().pipe( - take(1) - ).subscribe( - (url => this.router.navigateByUrl(url)) - ); - } - ngOnInit(): void { this.itemPageRoute = getItemPageRoute(this.object); // check to see if iiif viewer is required. diff --git a/src/app/item-page/simple/item-types/untyped-item/untyped-item.component.html b/src/app/item-page/simple/item-types/untyped-item/untyped-item.component.html index ebc4aaa38a..b6c54138ce 100644 --- a/src/app/item-page/simple/item-types/untyped-item/untyped-item.component.html +++ b/src/app/item-page/simple/item-types/untyped-item/untyped-item.component.html @@ -1,8 +1,6 @@ -
+
- +
diff --git a/src/app/item-page/simple/item-types/untyped-item/untyped-item.component.spec.ts b/src/app/item-page/simple/item-types/untyped-item/untyped-item.component.spec.ts index 135810d543..85d6d4728e 100644 --- a/src/app/item-page/simple/item-types/untyped-item/untyped-item.component.spec.ts +++ b/src/app/item-page/simple/item-types/untyped-item/untyped-item.component.spec.ts @@ -196,11 +196,6 @@ describe('UntypedItemComponent', () => { it('should retrieve the query term for previous route', (): void => { expect(comp.iiifQuery$.subscribe(result => expect(result).toEqual('test query'))); }); - it('should navigate back to the browse list', () => { - comp.back(); - expect(localMockRouteService.getPreviousUrl).toHaveBeenCalled(); - //expect(routerSpy.navigateByUrl).toHaveBeenCalledWith(url); - }); }); describe('with IIIF viewer and search but no previous search query', () => { diff --git a/src/app/item-page/simple/item-types/versioned-item/versioned-item.component.ts b/src/app/item-page/simple/item-types/versioned-item/versioned-item.component.ts index 2dbbd494d6..0308a85ade 100644 --- a/src/app/item-page/simple/item-types/versioned-item/versioned-item.component.ts +++ b/src/app/item-page/simple/item-types/versioned-item/versioned-item.component.ts @@ -37,7 +37,7 @@ export class VersionedItemComponent extends ItemComponent { private itemService: ItemDataService, protected routeService: RouteService, ) { - super(routeService, router); + super(routeService); } /** diff --git a/src/app/shared/item-back-button/item-back-button.component.html b/src/app/shared/item-back-button/item-back-button.component.html new file mode 100644 index 0000000000..acd49bda3a --- /dev/null +++ b/src/app/shared/item-back-button/item-back-button.component.html @@ -0,0 +1,4 @@ + diff --git a/src/app/shared/item-back-button/item-back-button.component.scss b/src/app/shared/item-back-button/item-back-button.component.scss new file mode 100644 index 0000000000..57d3445d89 --- /dev/null +++ b/src/app/shared/item-back-button/item-back-button.component.scss @@ -0,0 +1,4 @@ + +button.back-btn { + margin-bottom: 10px; +} diff --git a/src/app/shared/item-back-button/item-back-button.component.spec.ts b/src/app/shared/item-back-button/item-back-button.component.spec.ts new file mode 100644 index 0000000000..5d1b2c96f3 --- /dev/null +++ b/src/app/shared/item-back-button/item-back-button.component.spec.ts @@ -0,0 +1,48 @@ +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; +import { ItemBackButtonComponent } from './item-back-button.component'; +import { TranslateModule } from '@ngx-translate/core'; +import { NO_ERRORS_SCHEMA } from '@angular/core'; +import { RouteService } from '../../core/services/route.service'; +import { RouterTestingModule } from '@angular/router/testing'; +import { Observable, of } from 'rxjs'; +import { Router } from '@angular/router'; + +describe('ItemBackButtonComponent', () => { + let component: ItemBackButtonComponent; + let fixture: ComponentFixture; + let router; + const searchUrl = '/search?query=test&spc.page=2'; + + const mockRouteService = { + getPreviousUrl(): Observable { + return of(searchUrl); + } + }; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ItemBackButtonComponent], + imports: [TranslateModule.forRoot(), + RouterTestingModule], + providers: [ + { provide: RouteService, useValue: {} }, + ], + schemas: [NO_ERRORS_SCHEMA] + }).compileComponents(); + + + beforeEach(waitForAsync(() => { + router = TestBed.inject(Router); + spyOn(router, 'navigateByUrl'); + spyOn(mockRouteService, 'getPreviousUrl'); + fixture = TestBed.createComponent(ItemBackButtonComponent); + component = fixture.componentInstance; + })); + + describe('back button click', () => { + component.back(); + expect(mockRouteService.getPreviousUrl).toHaveBeenCalled(); + expect(router.navigateByUrl).toHaveBeenCalledWith(searchUrl); + }); + })); +}); diff --git a/src/app/shared/item-back-button/item-back-button.component.ts b/src/app/shared/item-back-button/item-back-button.component.ts new file mode 100644 index 0000000000..6e0d96520d --- /dev/null +++ b/src/app/shared/item-back-button/item-back-button.component.ts @@ -0,0 +1,32 @@ +import { ChangeDetectionStrategy, Component } from '@angular/core'; +import { take } from 'rxjs/operators'; +import { RouteService } from '../../core/services/route.service'; +import { Router } from '@angular/router'; + +@Component({ + selector: 'ds-item-back-button', + styleUrls: ['./item-back-button.component.scss'], + templateUrl: './item-back-button.component.html', + changeDetection: ChangeDetectionStrategy.OnPush, +}) +/** + * Component to add back to result list button to item. + */ +export class ItemBackButtonComponent { + + constructor(protected routeService: RouteService, + protected router: Router) { + } + + /** + * Navigate back from the item to the previous pagination url. + */ + public back() { + this.routeService.getPreviousUrl().pipe( + take(1) + ).subscribe( + (url => this.router.navigateByUrl(url)) + ); + } + +} diff --git a/src/app/shared/item-back-button/themed-item-back-button.component.ts b/src/app/shared/item-back-button/themed-item-back-button.component.ts new file mode 100644 index 0000000000..f24556ad22 --- /dev/null +++ b/src/app/shared/item-back-button/themed-item-back-button.component.ts @@ -0,0 +1,23 @@ +import { Component } from '@angular/core'; +import { ThemedComponent } from '../theme-support/themed.component'; +import { ItemBackButtonComponent } from './item-back-button.component'; + +@Component({ + selector: 'ds-themed-item-back-button', + styleUrls: [], + templateUrl: '../theme-support/themed.component.html', +}) +export class ThemedItemBackButtonComponent extends ThemedComponent { + protected getComponentName(): string { + return 'ItemBackButtonComponent'; + } + + protected importThemedComponent(themeName: string): Promise { + return import(`../../../themes/${themeName}/app/shared/item-back-button/item-back-button.component`); + } + + protected importUnthemedComponent(): Promise { + return import(`./item-back-button.component`); + } + +} diff --git a/src/app/shared/shared.module.ts b/src/app/shared/shared.module.ts index 0eb5284112..0c849a36ba 100644 --- a/src/app/shared/shared.module.ts +++ b/src/app/shared/shared.module.ts @@ -326,6 +326,8 @@ import { GoogleRecaptchaModule } from '../core/google-recaptcha/google-recaptcha import { ListableNotificationObjectComponent } from './object-list/listable-notification-object/listable-notification-object.component'; +import { ItemBackButtonComponent } from './item-back-button/item-back-button.component'; +import { ThemedItemBackButtonComponent } from './item-back-button/themed-item-back-button.component'; const MODULES = [ CommonModule, @@ -410,6 +412,8 @@ const COMPONENTS = [ ItemSubmitterComponent, ItemDetailPreviewComponent, ItemDetailPreviewFieldComponent, + ItemBackButtonComponent, + ThemedItemBackButtonComponent, ClaimedTaskActionsComponent, ClaimedTaskActionsApproveComponent, ClaimedTaskActionsRejectComponent, diff --git a/src/themes/custom/app/shared/item-back-button/item-back-button.component.html b/src/themes/custom/app/shared/item-back-button/item-back-button.component.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/shared/item-back-button/item-back-button.component.scss b/src/themes/custom/app/shared/item-back-button/item-back-button.component.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/themes/custom/app/shared/item-back-button/item-back-button.component.ts b/src/themes/custom/app/shared/item-back-button/item-back-button.component.ts new file mode 100644 index 0000000000..4277a26219 --- /dev/null +++ b/src/themes/custom/app/shared/item-back-button/item-back-button.component.ts @@ -0,0 +1,13 @@ +import { + ItemBackButtonComponent as BaseComponent +} from '../../../../../app/shared/item-back-button/item-back-button.component'; +import { Component } from '@angular/core'; + +@Component({ + selector: 'ds-item-back-button', + // styleUrls: ['./item-back-button.component.scss'], + styleUrls: ['../../../../../app/shared/item-back-button/item-back-button.component.scss'], + //templateUrl: './item-back-button.component.html', + templateUrl: '../../../../../app/shared/item-back-button/item-back-button.component.html' +}) +export class ItemBackButtonComponent extends BaseComponent {} diff --git a/src/themes/custom/eager-theme.module.ts b/src/themes/custom/eager-theme.module.ts index 4e3c6f8b46..d384d7f78e 100644 --- a/src/themes/custom/eager-theme.module.ts +++ b/src/themes/custom/eager-theme.module.ts @@ -43,6 +43,7 @@ import { import { CommunityListElementComponent } from './app/shared/object-list/community-list-element/community-list-element.component'; import { CollectionListElementComponent} from './app/shared/object-list/collection-list-element/collection-list-element.component'; +import { ItemBackButtonComponent } from './app/shared/item-back-button/item-back-button.component'; /** @@ -74,6 +75,7 @@ const DECLARATIONS = [ EditCollectionSelectorComponent, EditCommunitySelectorComponent, EditItemSelectorComponent, + ItemBackButtonComponent ]; @NgModule({ From d34cea1215891d741796d165c6e93766f6461814 Mon Sep 17 00:00:00 2001 From: Michael Spalti Date: Mon, 19 Dec 2022 13:01:53 -0800 Subject: [PATCH 04/25] Fixed module. --- src/app/shared/shared.module.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/shared/shared.module.ts b/src/app/shared/shared.module.ts index 6228fef3a3..235c16d213 100644 --- a/src/app/shared/shared.module.ts +++ b/src/app/shared/shared.module.ts @@ -317,6 +317,7 @@ import { } from './object-list/listable-notification-object/listable-notification-object.component'; import { ThemedItemBackButtonComponent } from './item-back-button/themed-item-back-button.component'; import { ThemedCollectionDropdownComponent } from './collection-dropdown/themed-collection-dropdown.component'; +import { ItemBackButtonComponent } from './item-back-button/item-back-button.component'; const MODULES = [ @@ -397,6 +398,7 @@ const COMPONENTS = [ ItemSubmitterComponent, ItemDetailPreviewComponent, ItemDetailPreviewFieldComponent, + ItemBackButtonComponent, ThemedItemBackButtonComponent, ClaimedTaskActionsComponent, ClaimedTaskActionsLoaderComponent, From c28f1659236ff070cc2728e024171b07b251cbb4 Mon Sep 17 00:00:00 2001 From: Michael Spalti Date: Mon, 19 Dec 2022 15:21:29 -0800 Subject: [PATCH 05/25] Node 18 spec fix --- .../item-page/simple/item-types/shared/item.component.spec.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/app/item-page/simple/item-types/shared/item.component.spec.ts b/src/app/item-page/simple/item-types/shared/item.component.spec.ts index 7544a857b3..e08c651f7c 100644 --- a/src/app/item-page/simple/item-types/shared/item.component.spec.ts +++ b/src/app/item-page/simple/item-types/shared/item.component.spec.ts @@ -457,7 +457,6 @@ describe('ItemComponent', () => { beforeEach(waitForAsync(() => { router = TestBed.inject(Router); spyOn(router, 'navigateByUrl'); - spyOn(mockRouteService, 'getPreviousUrl').and.returnValue(observableOf('')); TestBed.compileComponents(); fixture = TestBed.createComponent(ItemComponent); comp = fixture.componentInstance; From 73a9e0b0bb53d5dd27b6b1196525781a82e6ebaf Mon Sep 17 00:00:00 2001 From: Michael Spalti Date: Tue, 20 Dec 2022 13:46:59 -0800 Subject: [PATCH 06/25] Apply shared button component to browse-by. --- .../journal-issue.component.html | 2 +- .../journal-volume.component.html | 2 +- .../item-pages/journal/journal.component.html | 2 +- .../org-unit/org-unit.component.html | 2 +- .../item-pages/person/person.component.html | 2 +- .../item-pages/project/project.component.html | 2 +- .../publication/publication.component.html | 2 +- .../untyped-item/untyped-item.component.html | 2 +- .../shared/browse-by/browse-by.component.html | 4 +- .../item-back-button.component.spec.ts | 48 -------- .../item-back-button.component.ts | 32 ------ .../themed-item-back-button.component.ts | 23 ---- .../results-back-button.component.html} | 2 +- .../results-back-button.component.scss} | 0 .../results-back-button.component.spec.ts | 103 ++++++++++++++++++ .../results-back-button.component.ts | 70 ++++++++++++ .../themed-results-back-button.component.ts | 23 ++++ src/app/shared/shared.module.ts | 8 +- src/assets/i18n/en.json5 | 2 +- .../item-back-button.component.ts | 13 --- .../results-back-button.component.html} | 0 .../results-back-button.component.scss} | 0 .../results-back-button.component.ts | 13 +++ src/themes/custom/eager-theme.module.ts | 35 +++--- 24 files changed, 244 insertions(+), 148 deletions(-) delete mode 100644 src/app/shared/item-back-button/item-back-button.component.spec.ts delete mode 100644 src/app/shared/item-back-button/item-back-button.component.ts delete mode 100644 src/app/shared/item-back-button/themed-item-back-button.component.ts rename src/app/shared/{item-back-button/item-back-button.component.html => results-back-button/results-back-button.component.html} (79%) rename src/app/shared/{item-back-button/item-back-button.component.scss => results-back-button/results-back-button.component.scss} (100%) create mode 100644 src/app/shared/results-back-button/results-back-button.component.spec.ts create mode 100644 src/app/shared/results-back-button/results-back-button.component.ts create mode 100644 src/app/shared/results-back-button/themed-results-back-button.component.ts delete mode 100644 src/themes/custom/app/shared/item-back-button/item-back-button.component.ts rename src/themes/custom/app/shared/{item-back-button/item-back-button.component.html => results-back-button/results-back-button.component.html} (100%) rename src/themes/custom/app/shared/{item-back-button/item-back-button.component.scss => results-back-button/results-back-button.component.scss} (100%) create mode 100644 src/themes/custom/app/shared/results-back-button/results-back-button.component.ts diff --git a/src/app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component.html b/src/app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component.html index 0507153ab7..db3d3f8bd1 100644 --- a/src/app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component.html +++ b/src/app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component.html @@ -1,6 +1,6 @@
- +
diff --git a/src/app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component.html b/src/app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component.html index 6265b515a8..957d409ed0 100644 --- a/src/app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component.html +++ b/src/app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component.html @@ -1,6 +1,6 @@
- +
diff --git a/src/app/entity-groups/journal-entities/item-pages/journal/journal.component.html b/src/app/entity-groups/journal-entities/item-pages/journal/journal.component.html index ddd4b53a30..c6ad79628d 100644 --- a/src/app/entity-groups/journal-entities/item-pages/journal/journal.component.html +++ b/src/app/entity-groups/journal-entities/item-pages/journal/journal.component.html @@ -1,6 +1,6 @@
- +
diff --git a/src/app/entity-groups/research-entities/item-pages/org-unit/org-unit.component.html b/src/app/entity-groups/research-entities/item-pages/org-unit/org-unit.component.html index 89a3417d62..06d6ba5b1d 100644 --- a/src/app/entity-groups/research-entities/item-pages/org-unit/org-unit.component.html +++ b/src/app/entity-groups/research-entities/item-pages/org-unit/org-unit.component.html @@ -1,6 +1,6 @@
- +
diff --git a/src/app/entity-groups/research-entities/item-pages/person/person.component.html b/src/app/entity-groups/research-entities/item-pages/person/person.component.html index f805b6568c..d02ffeaf55 100644 --- a/src/app/entity-groups/research-entities/item-pages/person/person.component.html +++ b/src/app/entity-groups/research-entities/item-pages/person/person.component.html @@ -1,6 +1,6 @@
- +
diff --git a/src/app/entity-groups/research-entities/item-pages/project/project.component.html b/src/app/entity-groups/research-entities/item-pages/project/project.component.html index 6ccfdbf5e0..f1fea10e33 100644 --- a/src/app/entity-groups/research-entities/item-pages/project/project.component.html +++ b/src/app/entity-groups/research-entities/item-pages/project/project.component.html @@ -1,6 +1,6 @@
- +
diff --git a/src/app/item-page/simple/item-types/publication/publication.component.html b/src/app/item-page/simple/item-types/publication/publication.component.html index 2741d90500..92da2f14ca 100644 --- a/src/app/item-page/simple/item-types/publication/publication.component.html +++ b/src/app/item-page/simple/item-types/publication/publication.component.html @@ -1,6 +1,6 @@
- +
diff --git a/src/app/item-page/simple/item-types/untyped-item/untyped-item.component.html b/src/app/item-page/simple/item-types/untyped-item/untyped-item.component.html index b6c54138ce..9ca50cc2ee 100644 --- a/src/app/item-page/simple/item-types/untyped-item/untyped-item.component.html +++ b/src/app/item-page/simple/item-types/untyped-item/untyped-item.component.html @@ -1,6 +1,6 @@
- +
diff --git a/src/app/shared/browse-by/browse-by.component.html b/src/app/shared/browse-by/browse-by.component.html index 7d9153b9f8..a4f473f583 100644 --- a/src/app/shared/browse-by/browse-by.component.html +++ b/src/app/shared/browse-by/browse-by.component.html @@ -3,7 +3,7 @@
- +
- +