[CST-5341] Link back to the item page in the now downloading page

This commit is contained in:
Davide Negretti
2021-12-24 13:07:33 +01:00
parent 78c8c38ad4
commit b2586d31ec
3 changed files with 12 additions and 0 deletions

View File

@@ -1,3 +1,8 @@
<div class="container">
<div class="d-flex justify-content-between">
<h3>{{'bitstream.download.page' | translate:{bitstream: (bitstream$ | async)?.name} }}</h3>
<button (click)="back()" class="btn btn-outline-secondary">
<i class="fas fa-arrow-left"></i> {{'bitstream.download.page.back' | translate}}
</button>
</div>
</div>

View File

@@ -12,6 +12,7 @@ import { FileService } from '../../core/shared/file.service';
import { HardRedirectService } from '../../core/services/hard-redirect.service';
import { getForbiddenRoute } from '../../app-routing-paths';
import { RemoteData } from '../../core/data/remote-data';
import { Location } from '@angular/common';
@Component({
selector: 'ds-bitstream-download-page',
@@ -33,10 +34,15 @@ export class BitstreamDownloadPageComponent implements OnInit {
private auth: AuthService,
private fileService: FileService,
private hardRedirectService: HardRedirectService,
private location: Location,
) {
}
back(): void {
this.location.back();
}
ngOnInit(): void {
this.bitstreamRD$ = this.route.data.pipe(

View File

@@ -551,6 +551,7 @@
"bitstream.download.page": "Now downloading {{bitstream}}..." ,
"bitstream.download.page.back": "Back" ,
"bitstream.edit.authorizations.link": "Edit bitstream's Policies",