File tree Expand file tree Collapse file tree
bitstream-page/bitstream-download-page
shared/form/builder/ds-dynamic-form-ui/models/relation-group Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ import {
4949 isNotEmpty ,
5050} from '../../shared/empty.util' ;
5151import { MatomoService } from '../../statistics/matomo.service' ;
52+ import { NativeWindowRef , NativeWindowService } from '../../core/services/window.service' ;
5253
5354@Component ( {
5455 selector : 'ds-bitstream-download-page' ,
@@ -67,9 +68,11 @@ export class BitstreamDownloadPageComponent implements OnInit {
6768 bitstreamRD$ : Observable < RemoteData < Bitstream > > ;
6869 fileName$ : Observable < string > ;
6970
71+ hasHistory = this . _window . nativeWindow . history ?. length > 1 ;
7072 configService = inject ( ConfigurationDataService ) ;
7173
7274 constructor (
75+ @Inject ( NativeWindowService ) private _window : NativeWindowRef ,
7376 private route : ActivatedRoute ,
7477 protected router : Router ,
7578 private authorizationService : AuthorizationDataService ,
@@ -90,6 +93,10 @@ export class BitstreamDownloadPageComponent implements OnInit {
9093 this . location . back ( ) ;
9194 }
9295
96+ close ( ) : void {
97+ this . _window . nativeWindow . self . close ( ) ;
98+ }
99+
93100 ngOnInit ( ) : void {
94101 const accessToken$ : Observable < string > = this . route . queryParams . pipe (
95102 map ( ( queryParams : Params ) => queryParams ?. accessToken || null ) ,
Original file line number Diff line number Diff line change @@ -858,7 +858,7 @@ export class HeadTagService {
858858
859859 private setGenericPageMetaTags ( ) {
860860 const pageDocumentTitle = this . _document . getElementsByTagName ( 'title' ) [ 0 ] . innerText ;
861- const pageUrl = new URLCombiner ( this . hardRedirectService . getCurrentOrigin ( ) , this . router . url ) . toString ( ) ;
861+ const pageUrl = new URLCombiner ( this . hardRedirectService . getBaseUrl ( ) , this . router . url ) . toString ( ) ;
862862 const genericPageOpenGraphType = 'website' ;
863863
864864 this . setTitleTags ( pageDocumentTitle ) ;
@@ -874,6 +874,6 @@ export class HeadTagService {
874874 }
875875
876876 private getUrlOrigin ( ) : string {
877- return isPlatformBrowser ( this . platformId ) ? this . hardRedirectService . getCurrentOrigin ( ) : this . origin ;
877+ return isPlatformBrowser ( this . platformId ) ? this . hardRedirectService . getBaseUrl ( ) : this . origin ;
878878 }
879879}
Original file line number Diff line number Diff line change 11import {
22 ChangeDetectorRef ,
33 Component ,
4- EventEmitter ,
4+ EventEmitter , forwardRef ,
55 Input ,
66 OnDestroy ,
77 OnInit ,
@@ -61,6 +61,7 @@ import { FormBuilderService } from '../../../form-builder.service';
6161import { FormFieldMetadataValueObject } from '../../../models/form-field-metadata-value.model' ;
6262import { DynamicRelationGroupModel } from './dynamic-relation-group.model' ;
6363import { DsDynamicRelationGroupModalComponent } from './modal/dynamic-relation-group-modal.components' ;
64+ import { NgClass } from '@angular/common' ;
6465
6566/**
6667 * Component representing a group input field
You can’t perform that action at this time.
0 commit comments