Update to Angular 16 #16
|
@ -216,6 +216,6 @@ export class FosComponent implements OnInit, OnDestroy {
|
||||||
}
|
}
|
||||||
|
|
||||||
public buildFosQueryParam(fos) {
|
public buildFosQueryParam(fos) {
|
||||||
return (properties.environment !== 'production' ? ({'foslabel': this.urlEncodeAndQuote(fos.id+"||"+fos.label)}) : ({'fos': this.urlEncodeAndQuote(fos.id)}));
|
return {'foslabel': this.urlEncodeAndQuote(fos.id+"||"+fos.label)};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,8 +31,12 @@ import {StringUtils} from "../../utils/string-utils.class";
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-margin-small-top">
|
<div class="uk-margin-small-top">
|
||||||
<div *ngFor="let subject of subjects.slice(0, viewAll?subjects.length:threshold); let i=index" class="uk-text-truncate">
|
<div *ngFor="let subject of subjects.slice(0, viewAll?subjects.length:threshold); let i=index" class="uk-text-truncate">
|
||||||
<a [routerLink]="properties.searchLinkToResults"
|
<a *ngIf="properties.adminToolsPortalType != 'eosc'"
|
||||||
[queryParams]="buildFosQueryParam(subject)">
|
[routerLink]="properties.searchLinkToResults" [queryParams]="buildFosQueryParam(subject)">
|
||||||
|
{{subject.label}}
|
||||||
|
</a>
|
||||||
|
<a *ngIf="properties.adminToolsPortalType == 'eosc'" class="custom-external" target="_blank"
|
||||||
|
[href]="'https://explore.openaire.eu'+properties.searchLinkToResults+'?fos='+urlEncodeAndQuote(subject.label)">
|
||||||
{{subject.label}}
|
{{subject.label}}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -117,10 +121,10 @@ export class FosComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
public buildFosQueryParam(fos) {
|
public buildFosQueryParam(fos) {
|
||||||
return (properties.environment !== 'production' ? ({'foslabel': this.urlEncodeAndQuote(fos.id+"||"+fos.label)}) : ({'fos': this.urlEncodeAndQuote(fos.id)}));
|
return {'foslabel': this.urlEncodeAndQuote(fos.id+"||"+fos.label)};
|
||||||
}
|
}
|
||||||
|
|
||||||
public buildFosHrefParam(fos): string {
|
public buildFosHrefParam(fos): string {
|
||||||
return (properties.environment !== 'production' ? ('foslabel='+this.urlEncodeAndQuote(fos.id+"||"+fos.label)) : ('fos='+this.urlEncodeAndQuote(fos.id)));
|
return ('foslabel='+this.urlEncodeAndQuote(fos.id+"||"+fos.label));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ import {AlertModalModule} from "../../utils/modal/alertModal.module";
|
||||||
import { SearchInputModule } from '../../sharedComponents/search-input/search-input.module';
|
import { SearchInputModule } from '../../sharedComponents/search-input/search-input.module';
|
||||||
import {EntityMetadataComponent} from "./entity-metadata.component";
|
import {EntityMetadataComponent} from "./entity-metadata.component";
|
||||||
import {IconsService} from "../../utils/icons/icons.service";
|
import {IconsService} from "../../utils/icons/icons.service";
|
||||||
import {closed_access, open_access, unknown_access} from "../../utils/icons/icons";
|
import {book, closed_access, cog, database, earth, open_access, unknown_access} from "../../utils/icons/icons";
|
||||||
import {FullScreenModalModule} from "../../utils/modal/full-screen-modal/full-screen-modal.module";
|
import {FullScreenModalModule} from "../../utils/modal/full-screen-modal/full-screen-modal.module";
|
||||||
import {MobileDropdownModule} from "../../utils/mobile-dropdown/mobile-dropdown.module";
|
import {MobileDropdownModule} from "../../utils/mobile-dropdown/mobile-dropdown.module";
|
||||||
|
|
||||||
|
@ -45,6 +45,6 @@ import {MobileDropdownModule} from "../../utils/mobile-dropdown/mobile-dropdown.
|
||||||
})
|
})
|
||||||
export class ResultLandingUtilsModule {
|
export class ResultLandingUtilsModule {
|
||||||
constructor(private iconsService: IconsService) {
|
constructor(private iconsService: IconsService) {
|
||||||
this.iconsService.registerIcons([open_access, closed_access, unknown_access]);
|
this.iconsService.registerIcons([open_access, closed_access, unknown_access, book, cog, database, earth]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -216,6 +216,9 @@
|
||||||
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0"
|
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0"
|
||||||
[texts]="pageContents['top']"></helper>
|
[texts]="pageContents['top']"></helper>
|
||||||
|
|
||||||
|
<i class="uk-text-meta uk-text-xsmall" *ngIf="properties.adminToolsPortalType == 'eosc' && !belongsInEOSC && properties.environment !== 'production'">
|
||||||
|
This {{getTypeName() | lowercase}} is not part of the European Open Science Cloud
|
||||||
|
</i>
|
||||||
<landing-header [properties]="properties" [title]="resultLandingInfo.title"
|
<landing-header [properties]="properties" [title]="resultLandingInfo.title"
|
||||||
[subTitle]="resultLandingInfo.subtitle"
|
[subTitle]="resultLandingInfo.subtitle"
|
||||||
[authors]="resultLandingInfo.authors"
|
[authors]="resultLandingInfo.authors"
|
||||||
|
@ -508,6 +511,9 @@
|
||||||
<icon [name]="resultLandingInfo.hostedBy_collectedFrom[0].accessRightIcon" [flex]="true" [ratio]="1"></icon>
|
<icon [name]="resultLandingInfo.hostedBy_collectedFrom[0].accessRightIcon" [flex]="true" [ratio]="1"></icon>
|
||||||
<span class="uk-margin-xsmall-left uk-text-small uk-text-uppercase uk-text-bolder">{{getAccessLabel(resultLandingInfo.hostedBy_collectedFrom[0].accessRight)}}</span>
|
<span class="uk-margin-xsmall-left uk-text-small uk-text-uppercase uk-text-bolder">{{getAccessLabel(resultLandingInfo.hostedBy_collectedFrom[0].accessRight)}}</span>
|
||||||
</div>
|
</div>
|
||||||
|
<i class="uk-text-meta uk-text-xsmall" *ngIf="properties.adminToolsPortalType == 'eosc' && !belongsInEOSC && properties.environment !== 'production'">
|
||||||
|
This {{getTypeName() | lowercase}} is not part of the European Open Science Cloud
|
||||||
|
</i>
|
||||||
<landing-header [properties]="properties" [title]="resultLandingInfo.title"
|
<landing-header [properties]="properties" [title]="resultLandingInfo.title"
|
||||||
[subTitle]="resultLandingInfo.subtitle"
|
[subTitle]="resultLandingInfo.subtitle"
|
||||||
[authors]="resultLandingInfo.authors"
|
[authors]="resultLandingInfo.authors"
|
||||||
|
|
|
@ -55,6 +55,7 @@ export class ResultLandingComponent {
|
||||||
public deleteByInferenceOpened: boolean = false;
|
public deleteByInferenceOpened: boolean = false;
|
||||||
@Input() public resultFromInput: boolean = false;
|
@Input() public resultFromInput: boolean = false;
|
||||||
@Input() public resultLandingInfo: ResultLandingInfo;
|
@Input() public resultLandingInfo: ResultLandingInfo;
|
||||||
|
public belongsInEOSC: boolean = false;
|
||||||
public supplementaryResults: RelationResult[];
|
public supplementaryResults: RelationResult[];
|
||||||
public relation: string = 'trust';
|
public relation: string = 'trust';
|
||||||
public id: string;
|
public id: string;
|
||||||
|
@ -592,7 +593,12 @@ export class ResultLandingComponent {
|
||||||
if (contexts) {
|
if (contexts) {
|
||||||
await this.promise;
|
await this.promise;
|
||||||
if(this.publicCommunities && this.publicCommunities.length > 0) {
|
if(this.publicCommunities && this.publicCommunities.length > 0) {
|
||||||
this.resultLandingInfo.contexts = contexts.filter(context => this.publicCommunities.includes(context.idContext));
|
this.resultLandingInfo.contexts = contexts.filter(context => {
|
||||||
|
if(context.idContext == "eosc") {
|
||||||
|
this.belongsInEOSC = true;
|
||||||
|
}
|
||||||
|
return this.publicCommunities.includes(context.idContext)
|
||||||
|
});
|
||||||
this.cdr.detectChanges();
|
this.cdr.detectChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -135,7 +135,7 @@ export class SearchDataprovidersService {
|
||||||
// result.description = result.description.substring(0, this.sizeOfDescription) + "...";
|
// result.description = result.description.substring(0, this.sizeOfDescription) + "...";
|
||||||
// }
|
// }
|
||||||
|
|
||||||
let typeid: string = resData['datasourcetype'].classid;
|
let typeid: string = resData['datasourcetype'] && resData['datasourcetype'].classid;
|
||||||
if(typeid != "entityregistry" && typeid != "entityregistry::projects" && typeid != "entityregistry::repositories") {
|
if(typeid != "entityregistry" && typeid != "entityregistry::projects" && typeid != "entityregistry::repositories") {
|
||||||
|
|
||||||
if(resData.hasOwnProperty('accessinfopackage')) {
|
if(resData.hasOwnProperty('accessinfopackage')) {
|
||||||
|
|
|
@ -15,10 +15,11 @@
|
||||||
<ng-container *ngTemplateOutlet="modalContents;"></ng-container>
|
<ng-container *ngTemplateOutlet="modalContents;"></ng-container>
|
||||||
</modal-alert>
|
</modal-alert>
|
||||||
|
|
||||||
|
<!-- [okButtonDisabled]="!privacyAccepted || destinationPath.length == 0 || status == 'succeeded' || (requests > 0)-->
|
||||||
|
<!-- || !validatePath() || !validateDestinationUrl() || (!this.downloadElements || this.downloadElements.length == 0)"-->
|
||||||
|
<!-- (okEmitter)="transfer()" (cancelEmitter)="init()"-->
|
||||||
<fs-modal #egiTransferFsModal classTitle="uk-tile-default uk-border-bottom" classBody="uk-container-xlarge"
|
<fs-modal #egiTransferFsModal classTitle="uk-tile-default uk-border-bottom" classBody="uk-container-xlarge"
|
||||||
[okButtonDisabled]="!privacyAccepted || destinationPath.length == 0 || status == 'succeeded' || (requests > 0)
|
(cancelEmitter)="init()">
|
||||||
|| !validatePath() || !validateDestinationUrl() || (!this.downloadElements || this.downloadElements.length == 0)"
|
|
||||||
(okEmitter)="transfer()" (cancelEmitter)="init()">
|
|
||||||
<ng-container *ngTemplateOutlet="modalContents;"></ng-container>
|
<ng-container *ngTemplateOutlet="modalContents;"></ng-container>
|
||||||
</fs-modal>
|
</fs-modal>
|
||||||
|
|
||||||
|
@ -85,7 +86,7 @@
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<p class="uk-text-meta uk-text-xsmall uk-margin-remove-bottom uk-margin-top">Destination path (e.g. /folder1/folder2):</p>
|
<p class="uk-text-meta uk-text-xsmall uk-margin-remove-bottom uk-margin-top">Destination path (e.g. /folder1/folder2):</p>
|
||||||
<div input [(value)]="destinationPath" [inputClass]="'flat'"
|
<div #destinationPathInput input [(value)]="destinationPath" [inputClass]="'flat'"
|
||||||
[validators]="pathValidators" class=""></div>
|
[validators]="pathValidators" class=""></div>
|
||||||
<!-- <div *ngIf="selectedDestination.hasBrowse">-->
|
<!-- <div *ngIf="selectedDestination.hasBrowse">-->
|
||||||
<p *ngIf="selectedDestination.canBrowse" class="uk-text-meta uk-text-xsmall uk-margin-remove-bottom"> or <a
|
<p *ngIf="selectedDestination.canBrowse" class="uk-text-meta uk-text-xsmall uk-margin-remove-bottom"> or <a
|
||||||
|
@ -111,9 +112,9 @@
|
||||||
<div *ngIf="isMobile" class="uk-align-right uk-margin-medium-top uk-margin-bottom">
|
<div *ngIf="isMobile" class="uk-align-right uk-margin-medium-top uk-margin-bottom">
|
||||||
<button class="uk-button uk-button-primary"
|
<button class="uk-button uk-button-primary"
|
||||||
[disabled]="!privacyAccepted || destinationPath.length == 0 || status == 'succeeded'
|
[disabled]="!privacyAccepted || destinationPath.length == 0 || status == 'succeeded'
|
||||||
|| (requests > 0) || !validatePath() || !validateDestinationUrl() || (!this.downloadElements || this.downloadElements.length == 0)"
|
|| (requests > 0) || !destinationPathInput.formControl.valid || !validateDestinationUrl() || (!this.downloadElements || this.downloadElements.length == 0)"
|
||||||
[class.uk-disabled]="!privacyAccepted || destinationPath.length == 0 || status == 'succeeded'
|
[class.uk-disabled]="!privacyAccepted || destinationPath.length == 0 || status == 'succeeded'
|
||||||
|| (requests > 0) || !validatePath() || !validateDestinationUrl() || (!this.downloadElements || this.downloadElements.length == 0)"
|
|| (requests > 0) || !destinationPathInput.formControl.valid || !validateDestinationUrl() || (!this.downloadElements || this.downloadElements.length == 0)"
|
||||||
(click)="transfer()">
|
(click)="transfer()">
|
||||||
>> Transfer
|
>> Transfer
|
||||||
</button>
|
</button>
|
||||||
|
|
|
@ -152,6 +152,7 @@ export class EGIDataTransferComponent {
|
||||||
this.init();
|
this.init();
|
||||||
|
|
||||||
if(!this.isMobile) {
|
if(!this.isMobile) {
|
||||||
|
this.egiTransferModal.stayOpen = true;
|
||||||
// this.egiTransferModal.back = true;
|
// this.egiTransferModal.back = true;
|
||||||
this.egiTransferModal.cancelButton = false;
|
this.egiTransferModal.cancelButton = false;
|
||||||
this.egiTransferModal.okButton = true;
|
this.egiTransferModal.okButton = true;
|
||||||
|
@ -164,7 +165,7 @@ export class EGIDataTransferComponent {
|
||||||
this.egiTransferFsModal.back = false;
|
this.egiTransferFsModal.back = false;
|
||||||
this.egiTransferFsModal.cancelButton = true;
|
this.egiTransferFsModal.cancelButton = true;
|
||||||
this.egiTransferFsModal.okButton = false;
|
this.egiTransferFsModal.okButton = false;
|
||||||
this.egiTransferFsModal.okButtonText = ">> Transfer";
|
// this.egiTransferFsModal.okButtonText = ">> Transfer";
|
||||||
this.egiTransferFsModal.title = "EOSC Data Transfer";
|
this.egiTransferFsModal.title = "EOSC Data Transfer";
|
||||||
if(typeof document !== 'undefined') {
|
if(typeof document !== 'undefined') {
|
||||||
this.egiTransferFsModal.open();
|
this.egiTransferFsModal.open();
|
||||||
|
@ -254,7 +255,7 @@ export class EGIDataTransferComponent {
|
||||||
"files": [],
|
"files": [],
|
||||||
"params": {
|
"params": {
|
||||||
"priority": 0,
|
"priority": 0,
|
||||||
"overwrite": true,
|
"overwrite": false,
|
||||||
"retry": 3
|
"retry": 3
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -560,8 +561,9 @@ export class EGIDataTransferComponent {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
validatePath():boolean {
|
validatePath():boolean {
|
||||||
let exp1 = /^\/([A-z0-9-_+]+\/?)*$/g;
|
// let exp1 = /^\/([A-z0-9-_+]+\/?)*$/g;
|
||||||
return (this.destinationPath.length > 0 && this.destinationPath.match(exp1) != null)
|
// let exp1 = /^\/([A-z0-9-_]+[+\/]?)*$/;
|
||||||
|
return (this.destinationPath.length > 0 && this.destinationPath.startsWith("/"))
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ export class SearchFields {
|
||||||
|
|
||||||
// Remove Collected From Filter "collectedfrom","collectedfrom"
|
// Remove Collected From Filter "collectedfrom","collectedfrom"
|
||||||
public RESULT_REFINE_FIELDS = [
|
public RESULT_REFINE_FIELDS = [
|
||||||
"resultbestaccessright", "instancetypename", (properties.environment !== 'production' ? "foslabel" : "fos"), "relfunder",
|
"resultbestaccessright", "instancetypename", "foslabel", "relfunder",
|
||||||
"relfundinglevel0_id", "relfundinglevel1_id", "relfundinglevel2_id",
|
"relfundinglevel0_id", "relfundinglevel1_id", "relfundinglevel2_id",
|
||||||
"relproject", "sdg", "country", "resultlanguagename", "resulthostingdatasource", "community"];
|
"relproject", "sdg", "country", "resultlanguagename", "resulthostingdatasource", "community"];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue