Merge remote-tracking branch 'origin/develop' into angular-16

This commit is contained in:
Konstantinos Triantafyllou 2023-08-30 16:44:39 +03:00
commit 6470331207
9 changed files with 32 additions and 20 deletions

View File

@ -95,7 +95,7 @@
<div [id]="item.id" *ngFor="let item of fos; index as i"> <div [id]="item.id" *ngFor="let item of fos; index as i">
<div class="uk-text-capitalize"> <div class="uk-text-capitalize">
<h2 class="uk-h4 uk-margin-remove"> <h2 class="uk-h4 uk-margin-remove">
<a [routerLink]="properties.searchLinkToResults" [queryParams]="{'fos': urlEncodeAndQuote(item.id)}" <a [routerLink]="properties.searchLinkToResults" [queryParams]="buildFosQueryParam(item)"
class="uk-link-text"> class="uk-link-text">
{{item.id}} {{item.id}}
</a> </a>
@ -105,13 +105,13 @@
<div *ngFor="let child of item.children"> <div *ngFor="let child of item.children">
<div class="uk-text-capitalize"> <div class="uk-text-capitalize">
<h3 class="uk-h6 uk-margin-small-bottom"> <h3 class="uk-h6 uk-margin-small-bottom">
<a [routerLink]="properties.searchLinkToResults" [queryParams]="{'fos': urlEncodeAndQuote(child.id)}" <a [routerLink]="properties.searchLinkToResults" [queryParams]="buildFosQueryParam(child)"
class="uk-link-text"> class="uk-link-text">
{{child.id}} {{child.id}}
</a> </a>
</h3> </h3>
<div *ngFor="let subChild of child.children" style="margin-bottom: 5px;"> <div *ngFor="let subChild of child.children" style="margin-bottom: 5px;">
<a [routerLink]="properties.searchLinkToResults" [queryParams]="{'fos': urlEncodeAndQuote(subChild.id)}" <a [routerLink]="properties.searchLinkToResults" [queryParams]="buildFosQueryParam(subChild)"
class="uk-link-text"> class="uk-link-text">
{{subChild.label}} {{subChild.label}}
</a> </a>
@ -126,19 +126,19 @@
<div <div
class="uk-margin-large-bottom uk-padding uk-padding-remove-top uk-padding-remove-horizontal uk-text-capitalize" [class.custom-bottom-border]="i < viewResults.length - 1"> class="uk-margin-large-bottom uk-padding uk-padding-remove-top uk-padding-remove-horizontal uk-text-capitalize" [class.custom-bottom-border]="i < viewResults.length - 1">
<h2 class="uk-h4 uk-margin-remove"> <h2 class="uk-h4 uk-margin-remove">
<a [routerLink]="properties.searchLinkToResults" [queryParams]="{'fos': urlEncodeAndQuote(item.id)}" <a [routerLink]="properties.searchLinkToResults" [queryParams]="buildFosQueryParam(item)"
class="uk-link-text" [innerHTML]="highlightKeyword(item.id)"> class="uk-link-text" [innerHTML]="highlightKeyword(item.id)">
</a> </a>
</h2> </h2>
<div class="uk-grid uk-child-width-1-3 uk-margin-large-top uk-margin-medium-bottom" uk-grid="masonry: false"> <div class="uk-grid uk-child-width-1-3 uk-margin-large-top uk-margin-medium-bottom" uk-grid="masonry: false">
<div *ngFor="let subItem of item.children"> <div *ngFor="let subItem of item.children">
<h3 class="uk-h6 uk-margin-small-bottom"> <h3 class="uk-h6 uk-margin-small-bottom">
<a [routerLink]="properties.searchLinkToResults" [queryParams]="{'fos': urlEncodeAndQuote(subItem.id)}" <a [routerLink]="properties.searchLinkToResults" [queryParams]="buildFosQueryParam(subItem)"
class="uk-link-text" [innerHTML]="highlightKeyword(subItem.id)"> class="uk-link-text" [innerHTML]="highlightKeyword(subItem.id)">
</a> </a>
</h3> </h3>
<div *ngFor="let subSubItem of subItem.children" style="margin-bottom: 5px;"> <div *ngFor="let subSubItem of subItem.children" style="margin-bottom: 5px;">
<a [routerLink]="properties.searchLinkToResults" [queryParams]="{'fos': urlEncodeAndQuote(subSubItem.id)}" <a [routerLink]="properties.searchLinkToResults" [queryParams]="buildFosQueryParam(subSubItem)"
class="uk-link-text" [innerHTML]="highlightKeyword(subSubItem.label)"> class="uk-link-text" [innerHTML]="highlightKeyword(subSubItem.label)">
</a> </a>
</div> </div>

View File

@ -214,4 +214,8 @@ export class FosComponent implements OnInit, OnDestroy {
this._meta.updateTag({content: description}, "name='description'"); this._meta.updateTag({content: description}, "name='description'");
this._meta.updateTag({content: description}, "property='og:description'"); this._meta.updateTag({content: description}, "property='og:description'");
} }
public buildFosQueryParam(fos) {
return (properties.environment !== 'production' ? ({'foslabel': this.urlEncodeAndQuote(fos.id+"||"+fos.label)}) : ({'fos': this.urlEncodeAndQuote(fos.id)}));
}
} }

View File

@ -440,7 +440,7 @@
</ng-container> </ng-container>
</div> </div>
<div class="landing-action-bar-mobile uk-background-default"> <div class="landing-action-bar-mobile uk-tile-default uk-blur-background">
<div class="uk-container uk-flex-middle uk-grid uk-text-xsmall uk-text-meta" [ngClass]="hasMetrics ? 'uk-child-width-1-3' : 'uk-child-width-1-2'"> <div class="uk-container uk-flex-middle uk-grid uk-text-xsmall uk-text-meta" [ngClass]="hasMetrics ? 'uk-child-width-1-3' : 'uk-child-width-1-2'">
<div> <div>
<a class="uk-flex uk-flex-column uk-flex-middle uk-flex-center uk-link-reset" (click)="mobileContent = 'info'; scroll()"> <a class="uk-flex uk-flex-column uk-flex-middle uk-flex-center uk-link-reset" (click)="mobileContent = 'info'; scroll()">

View File

@ -32,7 +32,7 @@ import {StringUtils} from "../../utils/string-utils.class";
<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 [routerLink]="properties.searchLinkToResults"
[queryParams]="{'fos': urlEncodeAndQuote(subject.id)}"> [queryParams]="buildFosQueryParam(subject)">
{{subject.label}} {{subject.label}}
</a> </a>
</div> </div>
@ -47,11 +47,11 @@ import {StringUtils} from "../../utils/string-utils.class";
<div class="uk-width-expand"> <div class="uk-width-expand">
<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 *ngIf="properties.adminToolsPortalType != 'eosc'" <a *ngIf="properties.adminToolsPortalType != 'eosc'"
[routerLink]="properties.searchLinkToResults" [queryParams]="{'fos': urlEncodeAndQuote(subject.id)}"> [routerLink]="properties.searchLinkToResults" [queryParams]="buildFosQueryParam(subject)">
{{subject.label}} {{subject.label}}
</a> </a>
<a *ngIf="properties.adminToolsPortalType == 'eosc'" class="custom-external" target="_blank" <a *ngIf="properties.adminToolsPortalType == 'eosc'" class="custom-external" target="_blank"
[href]="'https://explore.openaire.eu'+properties.searchLinkToResults+'?fos='+urlEncodeAndQuote(subject.id)"> [href]="'https://explore.openaire.eu'+properties.searchLinkToResults+'?'+buildFosHrefParam(subject)">
{{subject.label}} {{subject.label}}
</a> </a>
</div> </div>
@ -60,11 +60,11 @@ import {StringUtils} from "../../utils/string-utils.class";
<div *ngIf="viewAll"> <div *ngIf="viewAll">
<div *ngFor="let subject of subjects; let i=index" class="uk-text-truncate"> <div *ngFor="let subject of subjects; let i=index" class="uk-text-truncate">
<a *ngIf="properties.adminToolsPortalType != 'eosc'" <a *ngIf="properties.adminToolsPortalType != 'eosc'"
[routerLink]="properties.searchLinkToResults" [queryParams]="{'fos': urlEncodeAndQuote(subject.id)}"> [routerLink]="properties.searchLinkToResults" [queryParams]="buildFosQueryParam(subject)">
{{subject.label}} {{subject.label}}
</a> </a>
<a *ngIf="properties.adminToolsPortalType == 'eosc'" class="custom-external" target="_blank" <a *ngIf="properties.adminToolsPortalType == 'eosc'" class="custom-external" target="_blank"
[href]="'https://explore.openaire.eu'+properties.searchLinkToResults+'?fos='+urlEncodeAndQuote(subject.id)"> [href]="'https://explore.openaire.eu'+properties.searchLinkToResults+'?'+buildFosHrefParam(subject)">
{{subject.label}} {{subject.label}}
</a> </a>
</div> </div>
@ -115,4 +115,12 @@ export class FosComponent {
public urlEncodeAndQuote(str: string): string { public urlEncodeAndQuote(str: string): string {
return StringUtils.quote(StringUtils.URIEncode(str)); return StringUtils.quote(StringUtils.URIEncode(str));
} }
public buildFosQueryParam(fos) {
return (properties.environment !== 'production' ? ({'foslabel': this.urlEncodeAndQuote(fos.id+"||"+fos.label)}) : ({'fos': this.urlEncodeAndQuote(fos.id)}));
}
public buildFosHrefParam(fos): string {
return (properties.environment !== 'production' ? ('foslabel='+this.urlEncodeAndQuote(fos.id+"||"+fos.label)) : ('fos='+this.urlEncodeAndQuote(fos.id)));
}
} }

View File

@ -375,7 +375,7 @@
</ng-container> </ng-container>
</div> </div>
<div class="landing-action-bar-mobile uk-background-default"> <div class="landing-action-bar-mobile uk-tile-default uk-blur-background">
<div class="uk-container uk-grid uk-flex-middle uk-child-width-1-2 uk-text-xsmall uk-text-meta"> <div class="uk-container uk-grid uk-flex-middle uk-child-width-1-2 uk-text-xsmall uk-text-meta">
<div> <div>
<a class="uk-flex uk-flex-column uk-flex-middle uk-flex-center uk-link-reset" (click)="mobileContent = 'info'; scroll()"> <a class="uk-flex uk-flex-column uk-flex-middle uk-flex-center uk-link-reset" (click)="mobileContent = 'info'; scroll()">

View File

@ -581,7 +581,7 @@
</ng-container> </ng-container>
</div> </div>
<div class="landing-action-bar-mobile uk-background-default"> <div class="landing-action-bar-mobile uk-tile-default uk-blur-background">
<div class="uk-container uk-flex-middle uk-grid uk-text-xsmall uk-text-meta" [ngClass]="hasMetrics ? 'uk-child-width-1-3' : 'uk-child-width-1-2'"> <div class="uk-container uk-flex-middle uk-grid uk-text-xsmall uk-text-meta" [ngClass]="hasMetrics ? 'uk-child-width-1-3' : 'uk-child-width-1-2'">
<div> <div>
<a class="uk-flex uk-flex-column uk-flex-middle uk-flex-center uk-link-reset" (click)="mobileContent = 'info'; scroll()"> <a class="uk-flex uk-flex-column uk-flex-middle uk-flex-center uk-link-reset" (click)="mobileContent = 'info'; scroll()">

View File

@ -694,7 +694,7 @@
</ng-container> </ng-container>
</div> </div>
<div class="landing-action-bar-mobile uk-background-default"> <div class="landing-action-bar-mobile uk-tile-default uk-blur-background">
<div class="uk-container uk-flex-middle uk-grid uk-text-xsmall uk-text-meta" [ngClass]="(resultLandingInfo.measure || hasAltMetrics) ? 'uk-child-width-1-3' : 'uk-child-width-1-2'"> <div class="uk-container uk-flex-middle uk-grid uk-text-xsmall uk-text-meta" [ngClass]="(resultLandingInfo.measure || hasAltMetrics) ? 'uk-child-width-1-3' : 'uk-child-width-1-2'">
<div> <div>
<a class="uk-flex uk-flex-column uk-flex-middle uk-flex-center uk-link-reset" (click)="mobileContent = 'info'; egiTransferModalOpen = false; scroll();"> <a class="uk-flex uk-flex-column uk-flex-middle uk-flex-center uk-link-reset" (click)="mobileContent = 'info'; egiTransferModalOpen = false; scroll();">

View File

@ -19,10 +19,10 @@ declare var UIkit: any;
<div class="uk-modal-dialog"> <div class="uk-modal-dialog">
<div class="uk-modal-header uk-flex uk-flex-middle uk-flex-between" [ngClass]="classTitle"> <div class="uk-modal-header uk-flex uk-flex-middle uk-flex-between" [ngClass]="classTitle">
<div [class.uk-invisible]="!alertHeader"> <div [class.uk-invisible]="!alertHeader">
<h5 class="uk-margin-remove">{{alertTitle}}</h5> <h6 class="uk-margin-remove">{{alertTitle}}</h6>
</div> </div>
<button class="uk-close uk-icon uk-margin-left" (click)="cancel()"> <button class="uk-close uk-icon uk-margin-left" (click)="cancel()">
<icon name="close" ratio="1.5"></icon> <icon name="close" ratio="1.4"></icon>
</button> </button>
</div> </div>
<div #bodyElement class="uk-modal-body uk-animation-fast uk-text-left" <div #bodyElement class="uk-modal-body uk-animation-fast uk-text-left"

View File

@ -25,12 +25,12 @@ declare var ResizeObserver;
<div #header class="uk-modal-header uk-flex uk-flex-middle" [ngClass]="classTitle"> <div #header class="uk-modal-header uk-flex uk-flex-middle" [ngClass]="classTitle">
<div [class.uk-invisible]="!back" class="uk-width-medium@l uk-width-auto uk-flex uk-flex-center"> <div [class.uk-invisible]="!back" class="uk-width-medium@l uk-width-auto uk-flex uk-flex-center">
<button class="uk-button uk-button-link" [class.uk-disabled]="!back" [disabled]="!back" (click)="backClicked()"> <button class="uk-button uk-button-link" [class.uk-disabled]="!back" [disabled]="!back" (click)="backClicked()">
<icon name="west" [flex]="true" [ratio]="isMobile?2:3"></icon> <icon name="west" [flex]="true" [ratio]="isMobile?1.4:2"></icon>
</button> </button>
</div> </div>
<div [class.uk-invisible]="!title" <div [class.uk-invisible]="!title"
class="uk-width-expand uk-padding-small uk-padding-remove-vertical uk-flex uk-flex-center"> class="uk-width-expand uk-padding-small uk-padding-remove-vertical uk-flex uk-flex-center">
<h4 *ngIf="isMobile" class="uk-margin-remove">{{title}}</h4> <h6 *ngIf="isMobile" class="uk-margin-remove">{{title}}</h6>
<h2 *ngIf="!isMobile" class="uk-margin-remove">{{title}}</h2> <h2 *ngIf="!isMobile" class="uk-margin-remove">{{title}}</h2>
</div> </div>
<div class="uk-width-medium@l uk-width-auto uk-flex" <div class="uk-width-medium@l uk-width-auto uk-flex"
@ -40,7 +40,7 @@ declare var ResizeObserver;
{{okButtonText}} {{okButtonText}}
</button> </button>
<button *ngIf="!okButton && cancelButton" class="uk-close uk-icon" (click)="cancel()"> <button *ngIf="!okButton && cancelButton" class="uk-close uk-icon" (click)="cancel()">
<icon name="close" ratio="2"></icon> <icon name="close" [ratio]="1.4"></icon>
</button> </button>
</div> </div>
</div> </div>