Skip to content

Commit

Permalink
Merge pull request #2473 from alexandrevryghem/fix-routes-not-relativ…
Browse files Browse the repository at this point in the history
…e-to-basehref_main-7.6

Fix routes not working with baseHref
  • Loading branch information
alanorth authored Sep 26, 2023
2 parents cae831b + 18febff commit f48764d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<div class="{{columnSizes.columns[3].buildClasses()}} row-element d-flex align-items-center">
<div class="text-center w-100">
<div class="btn-group relationship-action-buttons">
<a *ngIf="bitstreamDownloadUrl != null" [href]="bitstreamDownloadUrl"
<a *ngIf="bitstreamDownloadUrl != null" [routerLink]="bitstreamDownloadUrl"
class="btn btn-outline-primary btn-sm"
title="{{'item.edit.bitstreams.edit.buttons.download' | translate}}"
[attr.data-test]="'download-button' | dsBrowserOnly">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { createSuccessfulRemoteDataObject$ } from '../../../../shared/remote-dat
import { getBitstreamDownloadRoute } from '../../../../app-routing-paths';
import { By } from '@angular/platform-browser';
import { BrowserOnlyMockPipe } from '../../../../shared/testing/browser-only-mock.pipe';
import { RouterTestingModule } from '@angular/router/testing';

let comp: ItemEditBitstreamComponent;
let fixture: ComponentFixture<ItemEditBitstreamComponent>;
Expand Down Expand Up @@ -72,7 +73,10 @@ describe('ItemEditBitstreamComponent', () => {
);

TestBed.configureTestingModule({
imports: [TranslateModule.forRoot()],
imports: [
RouterTestingModule.withRoutes([]),
TranslateModule.forRoot(),
],
declarations: [
ItemEditBitstreamComponent,
VarDirective,
Expand Down
2 changes: 1 addition & 1 deletion src/app/shared/cookies/klaro-configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const GOOGLE_ANALYTICS_KLARO_KEY = 'google-analytics';
export const klaroConfiguration: any = {
storageName: ANONYMOUS_STORAGE_NAME_KLARO,

privacyPolicy: '/info/privacy',
privacyPolicy: './info/privacy',

/*
Setting 'hideLearnMore' to 'true' will hide the "learn more / customize" link in
Expand Down

0 comments on commit f48764d

Please sign in to comment.