Connect Admin release 30th August 2023 #8
|
@ -27,7 +27,6 @@ import {DropdownFilterComponent} from "../../../utils/dropdown-filter/dropdown-f
|
||||||
styleUrls: ['displayClaims.component.less']
|
styleUrls: ['displayClaims.component.less']
|
||||||
})
|
})
|
||||||
export class DisplayClaimsComponent implements OnInit, OnDestroy {
|
export class DisplayClaimsComponent implements OnInit, OnDestroy {
|
||||||
@Input() piwikSiteId = null;
|
|
||||||
@Input() pageTitle: string = "";
|
@Input() pageTitle: string = "";
|
||||||
properties: EnvProperties;
|
properties: EnvProperties;
|
||||||
public searchTermStream = new Subject<string>();
|
public searchTermStream = new Subject<string>();
|
||||||
|
@ -110,9 +109,7 @@ export class DisplayClaimsComponent implements OnInit, OnDestroy {
|
||||||
this.updateTitle(this.pageTitle);
|
this.updateTitle(this.pageTitle);
|
||||||
this.updateDescription(description);
|
this.updateDescription(description);
|
||||||
this.updateUrl(this.url);
|
this.updateUrl(this.url);
|
||||||
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
|
this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle).subscribe());
|
||||||
this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle, this.piwikSiteId).subscribe());
|
|
||||||
}
|
|
||||||
|
|
||||||
this.subscriptions.push(this.helper.getPageHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => {
|
this.subscriptions.push(this.helper.getPageHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => {
|
||||||
this.pageContents = contents;
|
this.pageContents = contents;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<linking-generic *ngIf="validInput" [localStoragePrefix]="localStoragePrefix" [results]="results" [sources]="sources"
|
<linking-generic *ngIf="validInput" [localStoragePrefix]="localStoragePrefix" [results]="results" [sources]="sources"
|
||||||
[communityId]="communityId" [inlineEntity]="inlineEntity" [showOptions]="showOptions"
|
[communityId]="communityId" [inlineEntity]="inlineEntity" [showOptions]="showOptions"
|
||||||
[piwikSiteId]="piwikSiteId" pageTitle="Direct Linking">
|
pageTitle="Direct Linking">
|
||||||
</linking-generic>
|
</linking-generic>
|
||||||
|
|
||||||
<div *ngIf="validInput== false" id="tm-main" class=" uk-section uk-padding-remove-top tm-middle">
|
<div *ngIf="validInput== false" id="tm-main" class=" uk-section uk-padding-remove-top tm-middle">
|
||||||
|
|
|
@ -18,8 +18,6 @@ import {ClaimProjectsSearchFormComponent} from "../claim-utils/claimProjectSearc
|
||||||
templateUrl: 'directLinking.component.html'
|
templateUrl: 'directLinking.component.html'
|
||||||
})
|
})
|
||||||
export class DirectLinkingComponent {
|
export class DirectLinkingComponent {
|
||||||
@Input() piwikSiteId = null;
|
|
||||||
|
|
||||||
@ViewChild(LinkingGenericComponent) linking: LinkingGenericComponent;
|
@ViewChild(LinkingGenericComponent) linking: LinkingGenericComponent;
|
||||||
|
|
||||||
results: ClaimEntity[] = [];
|
results: ClaimEntity[] = [];
|
||||||
|
|
|
@ -22,7 +22,6 @@ import { Location } from '@angular/common';
|
||||||
templateUrl: 'linkingGeneric.component.html'
|
templateUrl: 'linkingGeneric.component.html'
|
||||||
})
|
})
|
||||||
export class LinkingGenericComponent {
|
export class LinkingGenericComponent {
|
||||||
@Input() piwikSiteId = null;
|
|
||||||
@Input() pageTitle: string = "Create links between research objects";
|
@Input() pageTitle: string = "Create links between research objects";
|
||||||
piwiksub:any;
|
piwiksub:any;
|
||||||
|
|
||||||
|
@ -79,9 +78,7 @@ export class LinkingGenericComponent {
|
||||||
|
|
||||||
this.seoService.createLinkForCanonicalURL(this.url, false);
|
this.seoService.createLinkForCanonicalURL(this.url, false);
|
||||||
|
|
||||||
if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){
|
this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle).subscribe());
|
||||||
this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle, this.piwikSiteId).subscribe());
|
|
||||||
}
|
|
||||||
|
|
||||||
this.helper.getPageHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => {
|
this.helper.getPageHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => {
|
||||||
this.pageContents = contents;
|
this.pageContents = contents;
|
||||||
|
|
|
@ -19,7 +19,7 @@ import {Subscriber} from "rxjs";
|
||||||
<div class="uk-margin-top">
|
<div class="uk-margin-top">
|
||||||
<displayClaims *ngIf="user" [user]="user" [enableDelete]=true [myClaims]=true [isAdmin]=false [showUserEmail]=false
|
<displayClaims *ngIf="user" [user]="user" [enableDelete]=true [myClaims]=true [isAdmin]=false [showUserEmail]=false
|
||||||
[claimsInfoURL]=claimsInfoURL [communityId]=communityId
|
[claimsInfoURL]=claimsInfoURL [communityId]=communityId
|
||||||
[piwikSiteId]="piwikSiteId" pageTitle="My links">
|
pageTitle="My links">
|
||||||
</displayClaims>
|
</displayClaims>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -30,7 +30,6 @@ import {Subscriber} from "rxjs";
|
||||||
export class MyClaimsComponent {
|
export class MyClaimsComponent {
|
||||||
@Input() claimsInfoURL: string;
|
@Input() claimsInfoURL: string;
|
||||||
@Input() communityId:string;
|
@Input() communityId:string;
|
||||||
@Input() piwikSiteId = null;
|
|
||||||
@Input() userInfoURL: string;
|
@Input() userInfoURL: string;
|
||||||
public user: User = null;
|
public user: User = null;
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ import {FullScreenModalComponent} from '../utils/modal/full-screen-modal/full-sc
|
||||||
1. Find the appropriate repository or journal
|
1. Find the appropriate repository or journal
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
Find the appropriate repository to deposit your research products of any type (publication, data, software, other) or to include in your data management plan. Search and browse for OpenAIRE compliant repositories registered in OpenDOAR and re3data.
|
Find the appropriate repository to deposit your research products of any type (publication, data, software, other) or to include in your data management plan. Search and browse for OpenAIRE compliant repositories registered in OpenDOAR, re3data and FAIRsharing.
|
||||||
Looking for Open Access journals? Find those that suit your needs among the journals registered in the Directory of Open Access Journals (DOAJ).
|
Looking for Open Access journals? Find those that suit your needs among the journals registered in the Directory of Open Access Journals (DOAJ).
|
||||||
To know more, read the OpenAIRE Open Access primer (<a target="_blank" href="https://www.openaire.eu/oa-basics">https://www.openaire.eu/oa-basics</a>)
|
To know more, read the OpenAIRE Open Access primer (<a target="_blank" href="https://www.openaire.eu/oa-basics">https://www.openaire.eu/oa-basics</a>)
|
||||||
</div>
|
</div>
|
||||||
|
@ -110,7 +110,7 @@ import {FullScreenModalComponent} from '../utils/modal/full-screen-modal/full-sc
|
||||||
<div class="uk-card-body uk-text-small">
|
<div class="uk-card-body uk-text-small">
|
||||||
<img src="assets/common-assets/common/Logo_Horizontal.png" alt="OpenAIRE logo" class="uk-width-small uk-margin-bottom">
|
<img src="assets/common-assets/common/Logo_Horizontal.png" alt="OpenAIRE logo" class="uk-width-small uk-margin-bottom">
|
||||||
<div>
|
<div>
|
||||||
Search and browse for <span class="uk-text-bold">OpenAIRE compliant repositories</span> registered in OpenDOAR and re3data.
|
Search and browse for <span class="uk-text-bold">OpenAIRE compliant repositories</span> registered in OpenDOAR, re3data and FAIRsharing.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-card-footer uk-padding-small uk-tile-primary uk-flex uk-flex-center uk-light">
|
<div class="uk-card-footer uk-padding-small uk-tile-primary uk-flex uk-flex-center uk-light">
|
||||||
|
@ -152,7 +152,6 @@ export class DepositFirstPageComponent {
|
||||||
public title: string = "Deposit or publish your research in Open Access";
|
public title: string = "Deposit or publish your research in Open Access";
|
||||||
|
|
||||||
@Input() public zenodoInformation: ZenodoInformationClass = new ZenodoInformationClass();
|
@Input() public zenodoInformation: ZenodoInformationClass = new ZenodoInformationClass();
|
||||||
@Input() piwikSiteId = null;
|
|
||||||
@Input() assetsPath: string = 'assets/common-assets/common';
|
@Input() assetsPath: string = 'assets/common-assets/common';
|
||||||
|
|
||||||
@Input() communityId = null;
|
@Input() communityId = null;
|
||||||
|
@ -201,10 +200,7 @@ export class DepositFirstPageComponent {
|
||||||
if (!this.zenodoInformation.name) {
|
if (!this.zenodoInformation.name) {
|
||||||
this.zenodoInformation.name = "Zenodo";
|
this.zenodoInformation.name = "Zenodo";
|
||||||
}
|
}
|
||||||
|
this.subscriptions.push(this._piwikService.trackView(this.properties, this.title).subscribe());
|
||||||
if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){
|
|
||||||
this.subscriptions.push(this._piwikService.trackView(this.properties, this.title, this.piwikSiteId).subscribe());
|
|
||||||
}
|
|
||||||
this.breadcrumbs.push({name: 'home', route: '/'}, {name: "Deposit", route: null});
|
this.breadcrumbs.push({name: 'home', route: '/'}, {name: "Deposit", route: null});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,6 @@ import {SearchForm} from "../searchPages/searchUtils/newSearchPage.component";
|
||||||
export class SearchDataprovidersToDepositComponent {
|
export class SearchDataprovidersToDepositComponent {
|
||||||
private errorCodes: ErrorCodes;
|
private errorCodes: ErrorCodes;
|
||||||
private errorMessages: ErrorMessagesComponent;
|
private errorMessages: ErrorMessagesComponent;
|
||||||
@Input() piwikSiteId = null;
|
|
||||||
@Input() searchForm: SearchForm = {class: null, dark: false};
|
@Input() searchForm: SearchForm = {class: null, dark: false};
|
||||||
public results =[];
|
public results =[];
|
||||||
public filters =[];
|
public filters =[];
|
||||||
|
|
|
@ -23,7 +23,7 @@ export class IsRouteEnabled implements CanActivate {
|
||||||
if (!community) {
|
if (!community) {
|
||||||
community = properties.adminToolsCommunity;
|
community = properties.adminToolsCommunity;
|
||||||
}
|
}
|
||||||
return this.config.isPageEnabledByState(properties, community, '/' + path).pipe(take(1), tap((enabled) => {
|
return this.config.isPageEnabled(properties, community, '/' + path).pipe(take(1), tap((enabled) => {
|
||||||
if (!enabled) {
|
if (!enabled) {
|
||||||
this.router.navigate([redirect], {queryParams: {'page': path}});
|
this.router.navigate([redirect], {queryParams: {'page': path}});
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,8 +72,9 @@ export class FosSelectionComponent {
|
||||||
} else {
|
} else {
|
||||||
this.activeSection = this.fos[0].id;
|
this.activeSection = this.fos[0].id;
|
||||||
}
|
}
|
||||||
|
if(typeof IntersectionObserver !== "undefined") {
|
||||||
this.setObserver();
|
this.setObserver();
|
||||||
|
}
|
||||||
this.cdr.detectChanges();
|
this.cdr.detectChanges();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -93,7 +94,7 @@ export class FosSelectionComponent {
|
||||||
this.subscriptions.push(this.keywordControl.valueChanges.pipe(debounceTime(500), distinctUntilChanged()).subscribe(value => {
|
this.subscriptions.push(this.keywordControl.valueChanges.pipe(debounceTime(500), distinctUntilChanged()).subscribe(value => {
|
||||||
this.keyword = value;
|
this.keyword = value;
|
||||||
this.findMatches(this.keyword);
|
this.findMatches(this.keyword);
|
||||||
if (typeof document !== 'undefined') {
|
if (typeof IntersectionObserver !== 'undefined') {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.setObserver();
|
this.setObserver();
|
||||||
});
|
});
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -27,8 +27,6 @@ export class FosComponent implements OnInit, OnDestroy {
|
||||||
public url: string = null;
|
public url: string = null;
|
||||||
public pageTitle: string = "OpenAIRE | Fields of Science";
|
public pageTitle: string = "OpenAIRE | Fields of Science";
|
||||||
public pageDescription: string = "We have integrated a Field-of-Science (FoS) taxonomy into our dataset to organize and discover research more effectively. Using the full capabilities of the OpenAIRE Graph (full-texts, citations, references, venues) we apply AI and bring forward any multidisciplinarity potential.";
|
public pageDescription: string = "We have integrated a Field-of-Science (FoS) taxonomy into our dataset to organize and discover research more effectively. Using the full capabilities of the OpenAIRE Graph (full-texts, citations, references, venues) we apply AI and bring forward any multidisciplinarity potential.";
|
||||||
@Input() piwikSiteId = null;
|
|
||||||
|
|
||||||
public fos: any[] = [];
|
public fos: any[] = [];
|
||||||
public fosOptions: string[] = [];
|
public fosOptions: string[] = [];
|
||||||
public activeSection: string;
|
public activeSection: string;
|
||||||
|
@ -63,9 +61,7 @@ export class FosComponent implements OnInit, OnDestroy {
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
|
this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle).subscribe());
|
||||||
this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle, this.piwikSiteId).subscribe());
|
|
||||||
}
|
|
||||||
this.url = this.properties.domain + this.properties.baseLink + this._router.url;
|
this.url = this.properties.domain + this.properties.baseLink + this._router.url;
|
||||||
this.seoService.createLinkForCanonicalURL(this.url);
|
this.seoService.createLinkForCanonicalURL(this.url);
|
||||||
this.updateUrl(this.url);
|
this.updateUrl(this.url);
|
||||||
|
@ -109,7 +105,7 @@ export class FosComponent implements OnInit, OnDestroy {
|
||||||
this.subscriptions.push(this.keywordControl.valueChanges.pipe(debounceTime(500), distinctUntilChanged()).subscribe(value => {
|
this.subscriptions.push(this.keywordControl.valueChanges.pipe(debounceTime(500), distinctUntilChanged()).subscribe(value => {
|
||||||
this.keyword = value;
|
this.keyword = value;
|
||||||
this.findMatches(this.keyword);
|
this.findMatches(this.keyword);
|
||||||
if (typeof document !== 'undefined') {
|
if (typeof IntersectionObserver !== 'undefined') {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.setObserver();
|
this.setObserver();
|
||||||
});
|
});
|
||||||
|
@ -218,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)}));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -185,7 +185,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="dataProviderInfo && hasMetrics" class="uk-width-1-1 uk-width-medium@s">
|
<div *ngIf="dataProviderInfo && hasMetrics" class="uk-width-1-1 uk-width-medium@s">
|
||||||
<div class="landing-metrics-card uk-card uk-card-secondary uk-text-small uk-flex uk-padding-small">
|
<div class="landing-metrics-card uk-text-small uk-flex uk-padding-small">
|
||||||
<div class="uk-width-expand uk-flex uk-flex-middle">
|
<div class="uk-width-expand uk-flex uk-flex-middle">
|
||||||
<div class="uk-grid uk-grid-small uk-flex-nowrap" uk-grid uk-height-match="target: > div > .cell">
|
<div class="uk-grid uk-grid-small uk-flex-nowrap" uk-grid uk-height-match="target: > div > .cell">
|
||||||
<div>
|
<div>
|
||||||
|
@ -221,9 +221,9 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-width-1-5 uk-flex uk-flex-bottom">
|
<!-- <div class="uk-width-1-5 uk-flex uk-flex-bottom">-->
|
||||||
<img src="assets/common-assets/metrics-badge.svg" loading="lazy" alt="Metrics badge">
|
<!-- <img src="assets/common-assets/metrics-badge.svg" loading="lazy" alt="Metrics badge">-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -425,32 +425,36 @@
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="mobileContent == 'actions'" class="uk-container uk-section">
|
<div *ngIf="mobileContent == 'actions'" class="uk-container uk-section">
|
||||||
<ng-container>
|
<ng-container>
|
||||||
<div class="clickable uk-button-link uk-flex uk-flex-middle uk-h6 uk-margin-remove uk-padding-small uk-padding-remove-horizontal"
|
<div class="uk-padding-small uk-padding-remove-horizontal">
|
||||||
(click)="openFsModal(addThisFsModal, 'Share this '+openaireEntities.DATASOURCE+' in your social networks')">
|
<div class="clickable" (click)="openFsModal(addThisFsModal, 'Share this '+openaireEntities.DATASOURCE+' in your social networks')">
|
||||||
|
<div class="uk-button-link uk-flex uk-flex-middle uk-h6 uk-margin-xsmall-bottom">
|
||||||
<icon [flex]="true" name="share" visuallyHidden="share"></icon>
|
<icon [flex]="true" name="share" visuallyHidden="share"></icon>
|
||||||
<span class="uk-margin-small-left">Share</span>
|
<span class="uk-margin-small-left">Share</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="uk-padding uk-padding-remove-vertical uk-text-meta uk-text-xsmall">Share this {{openaireEntities.DATASOURCE}} in your social networks</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<hr class="uk-margin-remove">
|
<hr class="uk-margin-remove">
|
||||||
</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'">
|
<a class="uk-flex uk-flex-column uk-flex-middle uk-flex-center uk-link-reset" (click)="mobileContent = 'info'; scroll()">
|
||||||
<icon name="note_add" type="outlined" [flex]="true" [ratio]="2" [ngClass]="mobileContent == 'info' ? 'uk-text-primary': ''"></icon>
|
<icon name="note_add" type="outlined" [flex]="true" [ratio]="1.4" [ngClass]="mobileContent == 'info' ? 'uk-text-primary': ''"></icon>
|
||||||
<span>{{openaireEntities.DATASOURCE}}</span>
|
<span>{{openaireEntities.DATASOURCE}}</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="dataProviderInfo && hasMetrics">
|
<div *ngIf="dataProviderInfo && hasMetrics">
|
||||||
<a class="uk-flex uk-flex-column uk-flex-middle uk-flex-center uk-link-reset" (click)="mobileContent = 'metrics'">
|
<a class="uk-flex uk-flex-column uk-flex-middle uk-flex-center uk-link-reset" (click)="mobileContent = 'metrics'; scroll()">
|
||||||
<icon name="bar_chart" type="outlined" [flex]="true" [ratio]="2" [ngClass]="mobileContent == 'metrics' ? 'uk-text-primary': ''"></icon>
|
<icon name="bar_chart" type="outlined" [flex]="true" [ratio]="1.4" [ngClass]="mobileContent == 'metrics' ? 'uk-text-primary': ''"></icon>
|
||||||
<span>Metrics</span>
|
<span>Metrics</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<a class="uk-flex uk-flex-column uk-flex-middle uk-flex-center uk-link-reset" (click)="mobileContent = 'actions'">
|
<a class="uk-flex uk-flex-column uk-flex-middle uk-flex-center uk-link-reset" (click)="mobileContent = 'actions'; scroll()">
|
||||||
<icon name="pending" type="outlined" [flex]="true" [ratio]="2" [ngClass]="mobileContent == 'actions' ? 'uk-text-primary': ''"></icon>
|
<icon name="pending" type="outlined" [flex]="true" [ratio]="1.4" [ngClass]="mobileContent == 'actions' ? 'uk-text-primary': ''"></icon>
|
||||||
<span>Actions</span>
|
<span>Actions</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -46,7 +46,6 @@ export class DataProviderComponent {
|
||||||
|
|
||||||
@Input() type: string = "dataprovider";
|
@Input() type: string = "dataprovider";
|
||||||
private typeQueryPathParam: string = "datasources";
|
private typeQueryPathParam: string = "datasources";
|
||||||
@Input() piwikSiteId = null;
|
|
||||||
@Input() communityId = null;
|
@Input() communityId = null;
|
||||||
public dataProviderInfo: DataProviderInfo;
|
public dataProviderInfo: DataProviderInfo;
|
||||||
public datasourceId: string;
|
public datasourceId: string;
|
||||||
|
@ -407,9 +406,7 @@ export class DataProviderComponent {
|
||||||
this.showTabs = true;
|
this.showTabs = true;
|
||||||
this.updateTitle(this.dataProviderInfo.title.name?this.dataProviderInfo.title.name:this.dataProviderInfo.officialName);
|
this.updateTitle(this.dataProviderInfo.title.name?this.dataProviderInfo.title.name:this.dataProviderInfo.officialName);
|
||||||
this.updateDescription((this.dataProviderInfo.description ? (this.dataProviderInfo.description.substr(0,157) + (this.dataProviderInfo.description.substr(0,157).length == 157?"...":"")) : (this.dataProviderInfo.title.name?this.dataProviderInfo.title.name:this.dataProviderInfo.officialName)));
|
this.updateDescription((this.dataProviderInfo.description ? (this.dataProviderInfo.description.substr(0,157) + (this.dataProviderInfo.description.substr(0,157).length == 157?"...":"")) : (this.dataProviderInfo.title.name?this.dataProviderInfo.title.name:this.dataProviderInfo.officialName)));
|
||||||
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
|
this.subscriptions.push(this._piwikService.trackView(this.properties, this.dataProviderInfo.title.name).subscribe());
|
||||||
this.subscriptions.push(this._piwikService.trackView(this.properties, this.dataProviderInfo.title.name, this.piwikSiteId).subscribe());
|
|
||||||
}
|
|
||||||
|
|
||||||
this.showLoading = false;
|
this.showLoading = false;
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,6 @@ import { RouterModule } from '@angular/router';
|
||||||
|
|
||||||
import {IFrameModule} from '../../utils/iframe.module';
|
import {IFrameModule} from '../../utils/iframe.module';
|
||||||
import {ErrorMessagesModule} from '../../utils/errorMessages.module';
|
import {ErrorMessagesModule} from '../../utils/errorMessages.module';
|
||||||
import {MetricsModule} from '../landing-utils/metrics/metrics.module';
|
|
||||||
import {LandingModule} from '../landing-utils/landing.module';
|
import {LandingModule} from '../landing-utils/landing.module';
|
||||||
import {PagingModule} from '../../utils/paging.module';
|
import {PagingModule} from '../../utils/paging.module';
|
||||||
|
|
||||||
|
@ -41,7 +40,7 @@ import {EntityActionsModule} from "../../utils/entity-actions/entity-actions.mod
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports:
|
imports:
|
||||||
[CommonModule, FormsModule, RouterModule,
|
[CommonModule, FormsModule, RouterModule,
|
||||||
IFrameModule, ErrorMessagesModule, MetricsModule, LandingModule,
|
IFrameModule, ErrorMessagesModule, LandingModule,
|
||||||
DataProvidersServiceModule, ProjectsServiceModule, SearchResearchResultsServiceModule,
|
DataProvidersServiceModule, ProjectsServiceModule, SearchResearchResultsServiceModule,
|
||||||
PagingModule, Schema2jsonldModule, SEOServiceModule, ShowPublisherModule, HelperModule,
|
PagingModule, Schema2jsonldModule, SEOServiceModule, ShowPublisherModule, HelperModule,
|
||||||
LandingHeaderModule, AlertModalModule, NoLoadPaging, FeedbackModule,
|
LandingHeaderModule, AlertModalModule, NoLoadPaging, FeedbackModule,
|
||||||
|
|
|
@ -54,7 +54,6 @@ declare var UIkit: any;
|
||||||
`
|
`
|
||||||
})
|
})
|
||||||
export class HtmlProjectReportComponent {
|
export class HtmlProjectReportComponent {
|
||||||
@Input() piwikSiteId = null;
|
|
||||||
@Input() communityId = null;
|
@Input() communityId = null;
|
||||||
private projectId: string;
|
private projectId: string;
|
||||||
private totalResults: number = 10;
|
private totalResults: number = 10;
|
||||||
|
@ -170,9 +169,7 @@ export class HtmlProjectReportComponent {
|
||||||
} else if (data.title) {
|
} else if (data.title) {
|
||||||
this.updateTitle(data.title + " " + this.resultsType + " report");
|
this.updateTitle(data.title + " " + this.resultsType + " report");
|
||||||
}
|
}
|
||||||
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
|
this.subscriptions.push(this._piwikService.trackView(this.properties, ((data.acronym) ? data.acronym : data.title) + " " + this.resultsType + " report").subscribe());
|
||||||
this.subscriptions.push(this._piwikService.trackView(this.properties, ((data.acronym) ? data.acronym : data.title) + " " + this.resultsType + " report", this.piwikSiteId).subscribe());
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
err => {
|
err => {
|
||||||
this.handleError("Error getting html information for project id: " + this.projectId, err);
|
this.handleError("Error getting html information for project id: " + this.projectId, err);
|
||||||
|
|
|
@ -17,7 +17,7 @@ import {RouterHelper} from "../../utils/routerHelper.class";
|
||||||
uk-tooltip [title]="getAccessLabel(availableOn[0].accessRight)">
|
uk-tooltip [title]="getAccessLabel(availableOn[0].accessRight)">
|
||||||
<icon [name]="availableOn[0].accessRightIcon" [flex]="true" [ratio]="(isMobile && usedBy == 'landing') ? 1 : 0.8"></icon>
|
<icon [name]="availableOn[0].accessRightIcon" [flex]="true" [ratio]="(isMobile && usedBy == 'landing') ? 1 : 0.8"></icon>
|
||||||
</span>
|
</span>
|
||||||
<ng-container *ngIf="!(isMobile && usedBy == 'landing')">
|
<ng-container *ngIf="!isMobile">
|
||||||
<a uk-tooltip="Source" target="_blank"
|
<a uk-tooltip="Source" target="_blank"
|
||||||
class="uk-flex uk-flex-middle uk-flex-center uk-button-link uk-text-bolder">
|
class="uk-flex uk-flex-middle uk-flex-center uk-button-link uk-text-bolder">
|
||||||
<span>{{sliceString(availableOn[0].downloadNames.join("; "), 20)}}</span>
|
<span>{{sliceString(availableOn[0].downloadNames.join("; "), 20)}}</span>
|
||||||
|
@ -32,18 +32,21 @@ import {RouterHelper} from "../../utils/routerHelper.class";
|
||||||
</div>
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container *ngIf="(isMobile && usedBy == 'landing')">
|
<ng-container *ngIf="isMobile">
|
||||||
<a class="uk-flex uk-flex-between uk-flex-middle uk-flex-center uk-width-expand uk-button-link" (click)="openAvailableListFsModal()">
|
<a #toggle class="uk-flex uk-flex-between uk-flex-middle uk-flex-center uk-width-expand uk-button-link">
|
||||||
<span uk-tooltip="Source">{{sliceString(availableOn[0].downloadNames.join("; "), 20)}}</span>
|
<span>{{sliceString(availableOn[0].downloadNames.join("; "), 20)}}</span>
|
||||||
<span>
|
<span>
|
||||||
<icon [flex]="true" ratio="1.5" name="arrow_right"></icon>
|
<icon [flex]="true" ratio="1.5" name="arrow_right"></icon>
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
<fs-modal #availableListFsModal classTitle="uk-tile-default uk-border-bottom">
|
<mobile-dropdown [toggle]="toggle">
|
||||||
<div class="uk-text-small download-drop">
|
<div class="uk-text-emphasis uk-text-bolder uk-text-center uk-padding-small uk-padding-remove-vertical uk-text-uppercase">
|
||||||
|
Sources
|
||||||
|
</div>
|
||||||
|
<div class="uk-text-small download-drop uk-padding uk-padding-remove-horizontal">
|
||||||
<ng-container *ngTemplateOutlet="availableOnList"></ng-container>
|
<ng-container *ngTemplateOutlet="availableOnList"></ng-container>
|
||||||
</div>
|
</div>
|
||||||
</fs-modal>
|
</mobile-dropdown>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
|
@ -97,7 +100,6 @@ export class AvailableOnComponent {
|
||||||
/** @deprecated */
|
/** @deprecated */
|
||||||
@Output() viewAllClicked = new EventEmitter();
|
@Output() viewAllClicked = new EventEmitter();
|
||||||
@ViewChild("dropElement") dropElement: ElementRef;
|
@ViewChild("dropElement") dropElement: ElementRef;
|
||||||
@ViewChild("availableListFsModal") availableListFsModal: FullScreenModalComponent;
|
|
||||||
public threshold: number = 1;
|
public threshold: number = 1;
|
||||||
public dataProviderUrl = properties.searchLinkToDataProvider.split('?')[0];
|
public dataProviderUrl = properties.searchLinkToDataProvider.split('?')[0];
|
||||||
public title: string = "Download from";
|
public title: string = "Download from";
|
||||||
|
@ -125,12 +127,6 @@ export class AvailableOnComponent {
|
||||||
return StringUtils.sliceString(str, size)
|
return StringUtils.sliceString(str, size)
|
||||||
}
|
}
|
||||||
|
|
||||||
public openAvailableListFsModal() {
|
|
||||||
this.availableListFsModal.title = "Sources";
|
|
||||||
this.availableListFsModal.okButton = false;
|
|
||||||
this.availableListFsModal.open();
|
|
||||||
}
|
|
||||||
|
|
||||||
public getAccessLabel(accessRight) : string {
|
public getAccessLabel(accessRight) : string {
|
||||||
if(accessRight) {
|
if(accessRight) {
|
||||||
return (accessRight + (accessRight.toLowerCase().endsWith(" access") ? "" : " access"));
|
return (accessRight + (accessRight.toLowerCase().endsWith(" access") ? "" : " access"));
|
||||||
|
|
|
@ -57,7 +57,6 @@ export class CiteThisComponent implements OnInit, OnDestroy {
|
||||||
@Input() result: any;
|
@Input() result: any;
|
||||||
@Input() id: string;
|
@Input() id: string;
|
||||||
@Input() type: string = "article";
|
@Input() type: string = "article";
|
||||||
@Input() piwikSiteId;
|
|
||||||
public data:CitationData;
|
public data:CitationData;
|
||||||
public clipboard;
|
public clipboard;
|
||||||
timeout;
|
timeout;
|
||||||
|
@ -223,9 +222,7 @@ export class CiteThisComponent implements OnInit, OnDestroy {
|
||||||
a.click();
|
a.click();
|
||||||
window.URL.revokeObjectURL(url);
|
window.URL.revokeObjectURL(url);
|
||||||
a.remove(); // remove the element
|
a.remove(); // remove the element
|
||||||
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
|
this.sub = this._piwikService.trackDownload(this.properties, "DownloadCitation"+this.selectedFormat).subscribe();
|
||||||
this.sub = this._piwikService.trackDownload(this.properties, "DownloadCitation"+this.selectedFormat, this.piwikSiteId).subscribe();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -151,7 +151,7 @@ import {RouterHelper} from "../../utils/routerHelper.class";
|
||||||
<span>Thematic</span>
|
<span>Thematic</span>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<!-- Projects -->
|
<!-- Projects -->
|
||||||
<span uk-tooltip="Projects" *ngIf="projects && projects.length > 0" [class.truncated]="projects.length > 3">
|
<span uk-tooltip="Funded By" *ngIf="projects && projects.length > 0" [class.truncated]="projects.length > 3">
|
||||||
{{projectNames.slice(0,3).join(', ')}}
|
{{projectNames.slice(0,3).join(', ')}}
|
||||||
</span>
|
</span>
|
||||||
<!-- Organizations -->
|
<!-- Organizations -->
|
||||||
|
@ -238,9 +238,9 @@ export class EntityMetadataComponent {
|
||||||
value = value + ' | ' + (project.acronym ? project.acronym :
|
value = value + ' | ' + (project.acronym ? project.acronym :
|
||||||
(project.title.length > 25 ? (project.title.slice(0, 25) + '...'): project.title));
|
(project.title.length > 25 ? (project.title.slice(0, 25) + '...'): project.title));
|
||||||
}
|
}
|
||||||
if(project.code) {
|
// if(project.code) {
|
||||||
value = value + ' (' + project.code + ')';
|
// value = value + ' (' + project.code + ')';
|
||||||
}
|
// }
|
||||||
return value;
|
return value;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,14 +32,14 @@ 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>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-hidden@m">
|
<div class="uk-hidden@m">
|
||||||
<div class="uk-grid uk-grid-small uk-grid-divider" uk-grid>
|
<div *ngIf="!viewAll" class="uk-grid uk-grid-small uk-grid-divider" uk-grid>
|
||||||
<div class="uk-width-1-4 uk-text-meta">
|
<div class="uk-width-1-4 uk-text-meta">
|
||||||
<div class="uk-text-xsmall" style="color: #EEB204">Beta</div>
|
<div class="uk-text-xsmall" style="color: #EEB204">Beta</div>
|
||||||
{{title}}
|
{{title}}
|
||||||
|
@ -47,16 +47,28 @@ 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>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div *ngIf="viewAll">
|
||||||
|
<div *ngFor="let subject of subjects; let i=index" class="uk-text-truncate">
|
||||||
|
<a *ngIf="properties.adminToolsPortalType != 'eosc'"
|
||||||
|
[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+'?'+buildFosHrefParam(subject)">
|
||||||
|
{{subject.label}}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="uk-text-right uk-margin-small-top">
|
<div class="uk-text-right uk-margin-small-top">
|
||||||
<a *ngIf="subjects && subjects.length > threshold && !viewAll"
|
<a *ngIf="subjects && subjects.length > threshold && !viewAll"
|
||||||
(click)="viewAllClick();" class="view-more-less-link uk-text-truncate">
|
(click)="viewAllClick();" class="view-more-less-link uk-text-truncate">
|
||||||
|
@ -103,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)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,15 +34,16 @@ import {RouterHelper} from "../../utils/routerHelper.class";
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="isMobile">
|
<div *ngIf="isMobile">
|
||||||
<div *ngFor="let item of fundedByProjects.slice(0, viewAll?fundedByProjects.length:threshold) let i=index"
|
<div *ngFor="let item of fundedByProjects.slice(0, viewAll?fundedByProjects.length:threshold) let i=index"
|
||||||
class="uk-flex uk-flex-between uk-flex-middle uk-margin-small-bottom">
|
class="uk-flex uk-flex-middle uk-margin-small-bottom">
|
||||||
<span class="uk-text-emphasis">
|
<span class="uk-text-emphasis uk-width-expand">
|
||||||
<ng-container *ngTemplateOutlet="funder; context: {item: item}"></ng-container>
|
<ng-container *ngTemplateOutlet="funder; context: {item: item}"></ng-container>
|
||||||
</span>
|
</span>
|
||||||
<icon name="info" visuallyHidden="info" [type]="'outlined'" class="uk-link"></icon>
|
<a #toggle><icon name="info" visuallyHidden="info" [type]="'outlined'"></icon></a>
|
||||||
<div class="default-dropdown uk-margin-remove-top uk-dropdown"
|
<mobile-dropdown [toggle]="toggle">
|
||||||
uk-dropdown="pos: bottom-left; mode:click">
|
<div class="uk-margin-remove-top">
|
||||||
<ng-container *ngTemplateOutlet="dropInfo; context: { item: item}"></ng-container>
|
<ng-container *ngTemplateOutlet="dropInfo; context: { item: item}"></ng-container>
|
||||||
</div>
|
</div>
|
||||||
|
</mobile-dropdown>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@ import {AlertModal} from "../../../utils/modal/alert";
|
||||||
[languages]="languages" [programmingLanguages]="programmingLanguages"
|
[languages]="languages" [programmingLanguages]="programmingLanguages"
|
||||||
[compatibility]="compatibility" [aggregationStatus]="aggregationStatus"
|
[compatibility]="compatibility" [aggregationStatus]="aggregationStatus"
|
||||||
[thematic]="thematic" [type]="type" [prevPath]="prevPath"
|
[thematic]="thematic" [type]="type" [prevPath]="prevPath"
|
||||||
|
[countries]="countries" [projects]="projects"
|
||||||
></entity-metadata>
|
></entity-metadata>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="authors">
|
<div *ngIf="authors">
|
||||||
|
@ -61,4 +62,6 @@ export class LandingHeaderComponent {
|
||||||
@Input() thematic: boolean; // data provider landing
|
@Input() thematic: boolean; // data provider landing
|
||||||
@Input() type; // data provider landing
|
@Input() type; // data provider landing
|
||||||
@Input() prevPath: string = "";
|
@Input() prevPath: string = "";
|
||||||
|
@Input() countries;
|
||||||
|
@Input() projects;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,48 +0,0 @@
|
||||||
.metrics {
|
|
||||||
@import (reference) "~src/assets/openaire-theme/less/_import-variables";
|
|
||||||
position: relative;
|
|
||||||
display: inline-block;
|
|
||||||
|
|
||||||
.uk-text-primary {
|
|
||||||
color: @global-primary-background !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.uk-text-background {
|
|
||||||
background-image: @global-primary-gradient;
|
|
||||||
}
|
|
||||||
|
|
||||||
.uk-dropdown {
|
|
||||||
|
|
||||||
&::before {
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
transform: translateX(-100%);
|
|
||||||
top: 14px;
|
|
||||||
width: 0;
|
|
||||||
height: 0;
|
|
||||||
content: '';
|
|
||||||
border-left: 21px solid transparent;
|
|
||||||
border-right: 21px solid @global-border;
|
|
||||||
border-bottom: 21px solid transparent;
|
|
||||||
border-top: 21px solid transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
&::after {
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
transform: translateX(-100%);
|
|
||||||
top: 15px;
|
|
||||||
width: 0;
|
|
||||||
height: 0;
|
|
||||||
content: '';
|
|
||||||
border-left: 20px solid transparent;
|
|
||||||
border-right: 20px solid @global-background;
|
|
||||||
border-bottom: 20px solid transparent;
|
|
||||||
border-top: 20px solid transparent;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.m-badge img {
|
|
||||||
width: 35px;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,331 +0,0 @@
|
||||||
import {Component, Input, Output, EventEmitter, ChangeDetectorRef} from '@angular/core';
|
|
||||||
import {Metrics} from '../../../utils/entities/metrics';
|
|
||||||
import {MetricsService} from '../../../services/metrics.service';
|
|
||||||
import {ErrorCodes} from '../../../utils/properties/errorCodes';
|
|
||||||
|
|
||||||
import {Subscription, zip} from 'rxjs';
|
|
||||||
import {EnvProperties} from '../../../utils/properties/env-properties';
|
|
||||||
import {ClickEvent} from "../../../utils/click/click-outside-or-esc.directive";
|
|
||||||
import {NumberUtils} from "../../../utils/number-utils.class";
|
|
||||||
import {OpenaireEntities} from "../../../utils/properties/searchFields";
|
|
||||||
import {StringUtils} from "../../../utils/string-utils.class";
|
|
||||||
import {properties} from "../../../../../environments/environment";
|
|
||||||
import {RouterHelper} from "../../../utils/routerHelper.class";
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'metrics',
|
|
||||||
template: `
|
|
||||||
<div *ngIf="metrics && (pageViews >0 || metrics.totalViews > 0|| metrics.totalDownloads >0)" class="metrics">
|
|
||||||
<a class="m-badge uk-link-reset uk-display-block" (click)="clickedMetrics()">
|
|
||||||
<img src="assets/common-assets/logo-small-usage-counts.png" loading="lazy" alt="usage counts">
|
|
||||||
<div class="uk-margin-xsmall-top uk-text-primary uk-text-small uk-text-bold uk-text-center">
|
|
||||||
<ng-container *ngIf="isNumberLarge(total, true); else notFormattedTotal">{{formatNumber(total)}}</ng-container>
|
|
||||||
<ng-template #notFormattedTotal>{{total | number}}</ng-template>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
<div class="uk-dropdown uk-background-default" uk-dropdown="pos: right-top; mode: click; offset: 30; animation: uk-animation-fade">
|
|
||||||
<div class="uk-padding-small uk-width-large@s uk-width-medium">
|
|
||||||
<div *ngIf="entityType == 'projects'" class="uk-alert uk-alert-primary uk-margin-small-bottom">
|
|
||||||
<span class="uk-text-center uk-text-small">{{openaireEntities.PROJECT}} metrics
|
|
||||||
are derived from aggregating individual {{openaireEntities.RESULTS}} metrics.
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div class="uk-child-width-1-3@m uk-grid-small uk-grid-divider uk-margin-top" uk-grid>
|
|
||||||
<div class="uk-text-center">
|
|
||||||
<div class="number uk-text-bold uk-text-background">
|
|
||||||
<ng-container *ngIf="metrics.totalDownloads == 0">-</ng-container>
|
|
||||||
<span *ngIf="metrics.totalDownloads > 0" [attr.uk-tooltip]="metrics.totalDownloads >= 1000 ? 'cls: uk-active' : 'cls: uk-invisible'"
|
|
||||||
title="{{metrics.totalDownloads | number}}">{{formatNumber(metrics.totalDownloads)}}</span>
|
|
||||||
<!-- <ng-container *ngIf="isNumberLarge(metrics.totalDownloads); else notFormattedDownloads">{{formatNumber(metrics.totalDownloads)}}</ng-container>-->
|
|
||||||
<!-- <ng-template #notFormattedDownloads>{{metrics.totalDownloads | number}}</ng-template>-->
|
|
||||||
</div>
|
|
||||||
<div>Downloads</div>
|
|
||||||
</div>
|
|
||||||
<div class="uk-text-center">
|
|
||||||
<div class="number uk-text-bold uk-text-background">
|
|
||||||
<ng-container *ngIf="pageViews == 0">-</ng-container>
|
|
||||||
<span *ngIf="pageViews > 0" [attr.uk-tooltip]="pageViews >= 1000 ? 'cls: uk-active' : 'cls: uk-invisible'"
|
|
||||||
title="{{pageViews | number}}">{{formatNumber(pageViews)}}</span>
|
|
||||||
<!-- <ng-container *ngIf="isNumberLarge(pageViews); else notFormattedPageviews">{{formatNumber(pageViews)}}</ng-container>-->
|
|
||||||
<!-- <ng-template #notFormattedPageviews>{{pageViews | number}}</ng-template>-->
|
|
||||||
</div>
|
|
||||||
<div>OpenAIRE views</div>
|
|
||||||
</div>
|
|
||||||
<div class="uk-text-center">
|
|
||||||
<div class="number uk-text-bold uk-text-background">
|
|
||||||
<ng-container *ngIf="metrics.totalViews == 0">-</ng-container>
|
|
||||||
<span *ngIf="metrics.totalViews > 0" [attr.uk-tooltip]="metrics.totalViews >= 1000 ? 'cls: uk-active' : 'cls: uk-invisible'"
|
|
||||||
title="{{metrics.totalViews | number}}">{{formatNumber(metrics.totalViews)}}</span>
|
|
||||||
<!-- <ng-container *ngIf="isNumberLarge(metrics.totalViews); else notFormattedTotalviews">{{formatNumber(metrics.totalViews)}}</ng-container>-->
|
|
||||||
<!-- <ng-template #notFormattedTotalviews>{{metrics.totalViews | number}}</ng-template> -->
|
|
||||||
</div>
|
|
||||||
<div>Total views</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="uk-padding">
|
|
||||||
<div *ngIf="metricsClicked && (metrics.infos?.size > 0 || (metrics.totalViews > 0 && viewsFrameUrl) || (metrics.totalDownloads > 0 && downloadsFrameUrl))"
|
|
||||||
class="uk-position-relative uk-visible-toggle uk-slider uk-margin-small-top" tabIndex="1" uk-slider>
|
|
||||||
<div class="uk-slider-container">
|
|
||||||
<ul class="uk-slider-items uk-child-width-1-1">
|
|
||||||
<li *ngIf="metrics && metrics.infos.size > 0" class="uk-overflow-auto" style="height: 200px">
|
|
||||||
<table
|
|
||||||
class="uk-table uk-table-small uk-table-striped">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th class="uk-text-center uk-text-bold">From</th>
|
|
||||||
<th class="uk-text-center uk-text-bold">Views</th>
|
|
||||||
<th class="uk-text-center uk-text-bold">Downloads</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr *ngFor="let key of getKeys(metrics.infos)">
|
|
||||||
<td class="uk-width-1-3 uk-text-center uk-text-truncate" uk-tooltip [title]="metrics.infos.get(key).name">
|
|
||||||
<a [queryParams]="addEoscPrevInParams({datasourceId: metrics.infos.get(key).url})" [routerLink]="properties.searchLinkToDataProvider.split('?')[0]">
|
|
||||||
{{metrics.infos.get(key).name}}
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
<td class="uk-text-center">
|
|
||||||
<ng-container *ngIf="isNumberLarge(metrics.infos.get(key).numOfViews, true); else notFormattedNumViews">{{formatNumber(metrics.infos.get(key).numOfViews)}}</ng-container>
|
|
||||||
<ng-template #notFormattedNumViews>{{metrics.infos.get(key).numOfViews | number}}</ng-template>
|
|
||||||
<!-- <span *ngIf="metrics.infos.get(key).numOfViews > 0 && metrics.infos.get(key).openaireViews > 0">
|
|
||||||
( {{metrics.infos.get(key).openaireViews | number}} from OpenAIRE )
|
|
||||||
</span>-->
|
|
||||||
</td>
|
|
||||||
<td class="uk-text-center">
|
|
||||||
<ng-container *ngIf="isNumberLarge(metrics.infos.get(key).numOfDownloads, true); else notFormattedNumDownloads">{{formatNumber(metrics.infos.get(key).numOfDownloads)}}</ng-container>
|
|
||||||
<ng-template #notFormattedNumDownloads>{{metrics.infos.get(key).numOfDownloads | number}}</ng-template>
|
|
||||||
<!--<span *ngIf="metrics.infos.get(key).numOfDownloads > 0 && metrics.infos.get(key).openaireDownloads > 0">
|
|
||||||
( {{metrics.infos.get(key).openaireDownloads | number}} from OpenAIRE )
|
|
||||||
</span>-->
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</li>
|
|
||||||
<!-- remove check for datasources when with the new charts -->
|
|
||||||
<li *ngIf="metricsClicked && metrics.totalViews > 0 && viewsFrameUrl">
|
|
||||||
<i-frame [height]="200" [url]=viewsFrameUrl [addClass]="false"
|
|
||||||
customContainerClass="uk-background-default" customIframeClass="uk-blend-multiply"></i-frame>
|
|
||||||
</li>
|
|
||||||
<li *ngIf="metricsClicked && metrics.totalDownloads > 0 && downloadsFrameUrl">
|
|
||||||
<i-frame [height]="200" [url]=downloadsFrameUrl [addClass]="false"
|
|
||||||
customContainerClass="uk-background-default" customIframeClass="uk-blend-multiply"></i-frame>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<a class="uk-position-center-left-out" uk-slider-item="previous"><span uk-icon="icon: chevron-left; ratio: 2"></span></a>
|
|
||||||
<a class="uk-position-center-right-out" uk-slider-item="next"><span uk-icon="icon: chevron-right; ratio: 2"></span></a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="uk-flex uk-flex-center uk-flex-middle">
|
|
||||||
<span class="uk-margin-small-right uk-text-small uk-text-meta">Powered by</span>
|
|
||||||
<a href="https://usagecounts.openaire.eu" target="_blank">
|
|
||||||
<img width="120" src="assets/common-assets/logo-large-usage-counts.png" loading="lazy" alt="usage counts">
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
`,
|
|
||||||
styleUrls: ['metrics.component.less']
|
|
||||||
})
|
|
||||||
|
|
||||||
export class MetricsComponent {
|
|
||||||
@Input() prevPath: string = "";
|
|
||||||
@Output() metricsResults = new EventEmitter();
|
|
||||||
@Input() id: string;
|
|
||||||
@Input() entityType: string;
|
|
||||||
@Input() entity: string;
|
|
||||||
//@Input() name: string = "";
|
|
||||||
@Input() pageViews: number = 0;
|
|
||||||
@Input() properties: EnvProperties;
|
|
||||||
@Input() shortView: boolean = false;
|
|
||||||
@Input() open = false;
|
|
||||||
@Input() viewsFrameUrl: string;
|
|
||||||
@Input() downloadsFrameUrl: string;
|
|
||||||
|
|
||||||
public metrics: Metrics;
|
|
||||||
public errorCodes: ErrorCodes;
|
|
||||||
private sub: Subscription;
|
|
||||||
private timeouts: any[] = [];
|
|
||||||
|
|
||||||
public metricsClicked: boolean = false;
|
|
||||||
|
|
||||||
public status: number;
|
|
||||||
public state: number = -1;
|
|
||||||
public openaireEntities = OpenaireEntities;
|
|
||||||
public routerHelper:RouterHelper = new RouterHelper();
|
|
||||||
|
|
||||||
constructor(private metricsService: MetricsService, private cdr: ChangeDetectorRef) {
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
this.errorCodes = new ErrorCodes();
|
|
||||||
if (typeof document !== 'undefined') {
|
|
||||||
this.status = this.errorCodes.LOADING;
|
|
||||||
this.getMetrics();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnDestroy() {
|
|
||||||
if(this.sub) {
|
|
||||||
this.sub.unsubscribe();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public get total(): number {
|
|
||||||
return +this.pageViews + +this.metrics.totalViews + +this.metrics.totalDownloads;
|
|
||||||
}
|
|
||||||
|
|
||||||
private getMetrics() {
|
|
||||||
//queries from old API - replaced with queries to the stats tool
|
|
||||||
/* this.sub = this.metricsService.getMetrics(this.id, this.entityType, this.properties).subscribe(
|
|
||||||
data => {
|
|
||||||
this.metrics = data;
|
|
||||||
this.cdr.detectChanges();
|
|
||||||
this.status = this.errorCodes.DONE;
|
|
||||||
this.metricsResults.emit({
|
|
||||||
totalViews: this.metrics.totalViews,
|
|
||||||
totalDownloads: this.metrics.totalDownloads,
|
|
||||||
pageViews: this.metrics.pageViews
|
|
||||||
});
|
|
||||||
},
|
|
||||||
err => {
|
|
||||||
if (err.status == '404') {
|
|
||||||
this.status = this.errorCodes.NOT_FOUND;
|
|
||||||
} else if (err.status == '500') {
|
|
||||||
this.status = this.errorCodes.ERROR;
|
|
||||||
} else {
|
|
||||||
this.status = this.errorCodes.NOT_AVAILABLE;
|
|
||||||
}
|
|
||||||
this.metricsResults.emit({
|
|
||||||
totalViews: 0,
|
|
||||||
totalDownloads: 0
|
|
||||||
});
|
|
||||||
}
|
|
||||||
);*/
|
|
||||||
let obs;
|
|
||||||
if (this.entityType == "results") {
|
|
||||||
obs = zip(this.metricsService.getMetricsNumber(this.id, "usagestats.results.views", this.properties),
|
|
||||||
this.metricsService.getMetricsNumber(this.id, "usagestats.results.downloads", this.properties),
|
|
||||||
this.metricsService.getMetricsNumber(this.id, "usagestats.results.views.openaire", this.properties),
|
|
||||||
this.metricsService.getMetricsNumbersByRepository(this.id, "usagestats.results.viewsdownloads.repository", this.properties)
|
|
||||||
|
|
||||||
);
|
|
||||||
|
|
||||||
} else if (this.entityType == "projects") {
|
|
||||||
obs = zip(this.metricsService.getMetricsNumber(this.id, "usagestats.projects.views", this.properties),
|
|
||||||
this.metricsService.getMetricsNumber(this.id, "usagestats.projects.downloads", this.properties),
|
|
||||||
this.metricsService.getMetricsNumber(this.id, "usagestats.projects.views.openaire", this.properties));
|
|
||||||
|
|
||||||
} else if (this.entityType == "datasources") {
|
|
||||||
obs = zip(this.metricsService.getMetricsNumber(this.id, "usagestats.views.repository.local", this.properties),
|
|
||||||
this.metricsService.getMetricsNumber(this.id, "usagestats.downloads.repository.local", this.properties),
|
|
||||||
this.metricsService.getMetricsNumber(this.id, "usagestats.views.openaire", this.properties),
|
|
||||||
// this.metricsService.getMetricsNumber(this.id, "usagestats.downloads.repository.openaire", this.properties)
|
|
||||||
);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
this.sub = obs.subscribe(
|
|
||||||
data => {
|
|
||||||
this.metrics = new Metrics();
|
|
||||||
this.metrics.infos = new Map<string, { "name": string, "url": string, "numOfDownloads": string, "numOfViews": string, "openaireDownloads": string, "openaireViews": string }>();
|
|
||||||
this.metrics.totalViews = data[0] ? data[0] : 0;
|
|
||||||
this.metrics.totalDownloads = data[1] ? data[1] : 0;
|
|
||||||
this.metrics.pageViews = data[2] ? data[2] : 0;
|
|
||||||
this.metrics.infos = data[3] ? data[3] : 0;
|
|
||||||
this.cdr.detectChanges();
|
|
||||||
this.status = this.errorCodes.DONE;
|
|
||||||
this.metricsResults.emit({
|
|
||||||
totalViews: this.metrics.totalViews,
|
|
||||||
totalDownloads: this.metrics.totalDownloads,
|
|
||||||
pageViews: this.metrics.pageViews
|
|
||||||
});
|
|
||||||
},
|
|
||||||
err => {
|
|
||||||
if (err.status == '404') {
|
|
||||||
this.status = this.errorCodes.NOT_FOUND;
|
|
||||||
} else if (err.status == '500') {
|
|
||||||
this.status = this.errorCodes.ERROR;
|
|
||||||
} else {
|
|
||||||
this.status = this.errorCodes.NOT_AVAILABLE;
|
|
||||||
}
|
|
||||||
this.metricsResults.emit({
|
|
||||||
totalViews: 0,
|
|
||||||
totalDownloads: 0,
|
|
||||||
pageViews: 0
|
|
||||||
});
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
public close(event: ClickEvent) {
|
|
||||||
if(event.clicked && this.state !== -1) {
|
|
||||||
this.timeouts.forEach(timeout => {
|
|
||||||
clearTimeout(timeout);
|
|
||||||
});
|
|
||||||
this.state = -1;
|
|
||||||
this.timeouts = [];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public clickedMetrics() {
|
|
||||||
setTimeout( () => {
|
|
||||||
this.metricsClicked = true;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public toggle(event) {
|
|
||||||
this.metricsClicked = true;
|
|
||||||
|
|
||||||
event.stopPropagation();
|
|
||||||
if(this.state !== -1) {
|
|
||||||
this.timeouts.forEach(timeout => {
|
|
||||||
clearTimeout(timeout);
|
|
||||||
});
|
|
||||||
this.state = -1;
|
|
||||||
this.timeouts = [];
|
|
||||||
} else {
|
|
||||||
this.state++;
|
|
||||||
this.timeouts.push(setTimeout(() => {
|
|
||||||
this.state++;
|
|
||||||
this.timeouts.push(setTimeout(() => {
|
|
||||||
this.state++;
|
|
||||||
this.timeouts.push(setTimeout(() => {
|
|
||||||
this.state++;
|
|
||||||
this.timeouts.push(setTimeout(() => {
|
|
||||||
this.state++;
|
|
||||||
}, 400));
|
|
||||||
}, 800));
|
|
||||||
}, 300));
|
|
||||||
}, 100));
|
|
||||||
}
|
|
||||||
this.cdr.detectChanges();
|
|
||||||
}
|
|
||||||
|
|
||||||
public getKeys(map) {
|
|
||||||
return Array.from(map.keys());
|
|
||||||
}
|
|
||||||
|
|
||||||
public isNumberLarge(num: number | string, bigNum: boolean = false) {
|
|
||||||
let limit: number = bigNum ? 100000000 : 100000;
|
|
||||||
return (+num) >= limit;
|
|
||||||
}
|
|
||||||
|
|
||||||
public formatNumber(num: number | string) {
|
|
||||||
let formatted = NumberUtils.roundNumber(+num);
|
|
||||||
return formatted.number + formatted.size;
|
|
||||||
}
|
|
||||||
|
|
||||||
public addEoscPrevInParams(obj) {
|
|
||||||
if(properties.adminToolsPortalType == "eosc" && this.prevPath) {
|
|
||||||
let splitted: string[] = this.prevPath.split("?");
|
|
||||||
obj = this.routerHelper.addQueryParam("return_path", splitted[0], obj);
|
|
||||||
if(splitted.length > 0) {
|
|
||||||
obj = this.routerHelper.addQueryParam("search_params", splitted[1], obj);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return obj;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,29 +0,0 @@
|
||||||
/* This module contains all common components for all landing pages */
|
|
||||||
|
|
||||||
import {NgModule} from '@angular/core';
|
|
||||||
import {CommonModule} from '@angular/common';
|
|
||||||
import {FormsModule} from '@angular/forms';
|
|
||||||
|
|
||||||
import {MetricsComponent} from './metrics.component';
|
|
||||||
import {MetricsService} from '../../../services/metrics.service';
|
|
||||||
|
|
||||||
import {ErrorMessagesModule} from '../../../utils/errorMessages.module';
|
|
||||||
import {IFrameModule} from "../../../utils/iframe.module";
|
|
||||||
import {IconsModule} from "../../../utils/icons/icons.module";
|
|
||||||
import {RouterModule} from "@angular/router";
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [
|
|
||||||
CommonModule, FormsModule, RouterModule, ErrorMessagesModule, IFrameModule, IconsModule
|
|
||||||
],
|
|
||||||
declarations: [
|
|
||||||
MetricsComponent
|
|
||||||
],
|
|
||||||
providers:[
|
|
||||||
MetricsService
|
|
||||||
],
|
|
||||||
exports: [
|
|
||||||
MetricsComponent
|
|
||||||
]
|
|
||||||
})
|
|
||||||
export class MetricsModule { }
|
|
|
@ -1,8 +1,6 @@
|
||||||
import {Component, Input} from '@angular/core';
|
import {Component, Input} from '@angular/core';
|
||||||
import {ActivatedRoute} from '@angular/router';
|
|
||||||
|
|
||||||
import {FetchProjects} from '../../utils/fetchEntitiesClasses/fetchProjects.class';
|
import {FetchProjects} from '../../utils/fetchEntitiesClasses/fetchProjects.class';
|
||||||
import {SearchProjectsService} from '../../services/searchProjects.service';
|
|
||||||
|
|
||||||
import {ErrorCodes} from '../../utils/properties/errorCodes';
|
import {ErrorCodes} from '../../utils/properties/errorCodes';
|
||||||
import {StringUtils} from '../../utils/string-utils.class';
|
import {StringUtils} from '../../utils/string-utils.class';
|
||||||
|
@ -18,7 +16,7 @@ import {OpenaireEntities} from '../../utils/properties/searchFields';
|
||||||
<ng-container *ngFor="let filter of fetchProjects.filters">
|
<ng-container *ngFor="let filter of fetchProjects.filters">
|
||||||
<div class="uk-inline">
|
<div class="uk-inline">
|
||||||
<dropdown-filter #dropdownFilter dropdownClass="uk-width-large uk-padding-small uk-margin-medium-bottom"
|
<dropdown-filter #dropdownFilter dropdownClass="uk-width-large uk-padding-small uk-margin-medium-bottom"
|
||||||
[name]="filter.title" [count]="filter.countSelectedValues">
|
[name]="filter.title" [count]="filter.countSelectedValues" [isMobile]="isMobile">
|
||||||
<div class="uk-padding-small uk-overflow-auto uk-height-max-large uk-height-min-medium">
|
<div class="uk-padding-small uk-overflow-auto uk-height-max-large uk-height-min-medium">
|
||||||
<search-filter [filter]="filter"
|
<search-filter [filter]="filter"
|
||||||
[showResultCount]=true filterValuesNum="0"
|
[showResultCount]=true filterValuesNum="0"
|
||||||
|
@ -57,6 +55,7 @@ export class ProjectsInModalComponent {
|
||||||
@Input() organizationId: string = "";
|
@Input() organizationId: string = "";
|
||||||
@Input() properties: EnvProperties;
|
@Input() properties: EnvProperties;
|
||||||
@Input() modal: AlertModal;
|
@Input() modal: AlertModal;
|
||||||
|
@Input() isMobile: boolean = false;
|
||||||
public page: number = 1;
|
public page: number = 1;
|
||||||
public size: number = 5;
|
public size: number = 5;
|
||||||
|
|
||||||
|
@ -67,11 +66,6 @@ export class ProjectsInModalComponent {
|
||||||
|
|
||||||
public openaireEntities = OpenaireEntities;
|
public openaireEntities = OpenaireEntities;
|
||||||
|
|
||||||
constructor(private route: ActivatedRoute,
|
|
||||||
private _searchProjectsService: SearchProjectsService) {
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
if (this.organizationId) {
|
if (this.organizationId) {
|
||||||
if (this.fetchProjects.searchUtils.totalResults > 0) {
|
if (this.fetchProjects.searchUtils.totalResults > 0) {
|
||||||
|
|
|
@ -21,12 +21,13 @@ 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 {closed_access, 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";
|
||||||
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule, FormsModule, RouterModule, PagingModule, ShowPublisherModule, IconsModule, AlertModalModule,
|
CommonModule, FormsModule, RouterModule, PagingModule, ShowPublisherModule, IconsModule, AlertModalModule,
|
||||||
SearchInputModule, FullScreenModalModule
|
SearchInputModule, FullScreenModalModule, MobileDropdownModule
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
ShowIdentifiersComponent,ShowSubjectsComponent,
|
ShowIdentifiersComponent,ShowSubjectsComponent,
|
||||||
|
|
|
@ -46,6 +46,7 @@ import {StringUtils} from "../../utils/string-utils.class";
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-hidden@m">
|
<div class="uk-hidden@m">
|
||||||
|
<div *ngIf="!viewAll">
|
||||||
<div class="uk-text-xsmall" style="color: #EEB204">Beta</div>
|
<div class="uk-text-xsmall" style="color: #EEB204">Beta</div>
|
||||||
<div class="uk-flex uk-flex-middle uk-flex-wrap">
|
<div class="uk-flex uk-flex-middle uk-flex-wrap">
|
||||||
<img src="assets/common-assets/common/The_Global_Goals_Icon_Color.svg"
|
<img src="assets/common-assets/common/The_Global_Goals_Icon_Color.svg"
|
||||||
|
@ -59,6 +60,12 @@ import {StringUtils} from "../../utils/string-utils.class";
|
||||||
{{subjects.slice(0, viewAll?subjects.length:threshold).join(", ")}}
|
{{subjects.slice(0, viewAll?subjects.length:threshold).join(", ")}}
|
||||||
</div> -->
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div *ngIf="viewAll">
|
||||||
|
<div *ngFor="let subject of subjects; let i=index" class="uk-text-truncate">
|
||||||
|
<a [routerLink]=" properties.searchLinkToResults" [queryParams]="{'sdg': urlEncodeAndQuote(subject)}">{{subject}}</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="uk-text-right uk-margin-small-top">
|
<div class="uk-text-right uk-margin-small-top">
|
||||||
<a *ngIf="subjects && subjects.length > threshold && !viewAll"
|
<a *ngIf="subjects && subjects.length > threshold && !viewAll"
|
||||||
(click)="viewAllClick();" class="view-more-less-link uk-link uk-text-truncate">
|
(click)="viewAllClick();" class="view-more-less-link uk-link uk-text-truncate">
|
||||||
|
|
|
@ -53,7 +53,7 @@ import {properties} from "../../../../environments/environment";
|
||||||
</div>
|
</div>
|
||||||
</modal-alert>
|
</modal-alert>
|
||||||
|
|
||||||
<fs-modal *ngIf="isMobile" #identifiersModal>
|
<fs-modal *ngIf="isMobile" #identifiersModal classTitle="uk-tile-default uk-border-bottom">
|
||||||
<div class="uk-text-small">
|
<div class="uk-text-small">
|
||||||
<ng-container *ngTemplateOutlet="identifiers_template; context: { modal: true}"></ng-container>
|
<ng-container *ngTemplateOutlet="identifiers_template; context: { modal: true}"></ng-container>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -4,6 +4,12 @@ import {EnvProperties} from "../../utils/properties/env-properties";
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'showPublisher, [showPublisher]',
|
selector: 'showPublisher, [showPublisher]',
|
||||||
template: `
|
template: `
|
||||||
|
<ng-container *ngIf="publisher">
|
||||||
|
<span [attr.uk-tooltip]="'cls: uk-active'" [title]="'Publisher'">{{publisher}}</span>
|
||||||
|
<span *ngIf="journal && (journal['journal'] || journal['issn'] || journal['lissn']
|
||||||
|
|| journal['volume'] || journal['eissn'] || journal['issue'])"
|
||||||
|
class="uk-margin-xsmall-left uk-margin-xsmall-right bullet"></span>
|
||||||
|
</ng-container>
|
||||||
<ng-container *ngIf="journal && (journal['journal'] || journal['issn'] || journal['lissn']
|
<ng-container *ngIf="journal && (journal['journal'] || journal['issn'] || journal['lissn']
|
||||||
|| journal['volume'] || journal['eissn'] || journal['issue'])">
|
|| journal['volume'] || journal['eissn'] || journal['issue'])">
|
||||||
<ng-container *ngIf="journal && (journal['journal'] || journal['issn'] || journal['lissn']
|
<ng-container *ngIf="journal && (journal['journal'] || journal['issn'] || journal['lissn']
|
||||||
|
@ -64,10 +70,6 @@ import {EnvProperties} from "../../utils/properties/env-properties";
|
||||||
<span *ngIf=" journal['journal'] && (journal['issn'] || journal['eissn'] || journal['lissn'])">)</span>
|
<span *ngIf=" journal['journal'] && (journal['issn'] || journal['eissn'] || journal['lissn'])">)</span>
|
||||||
</span>
|
</span>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<span *ngIf="publisher" class="uk-margin-xsmall-left uk-margin-xsmall-right bullet"></span>
|
|
||||||
</ng-container>
|
|
||||||
<ng-container *ngIf="publisher">
|
|
||||||
<span [attr.uk-tooltip]="'cls: uk-active'" [title]="'Publisher'">{{publisher}}</span>
|
|
||||||
</ng-container>
|
</ng-container>
|
||||||
`
|
`
|
||||||
})
|
})
|
||||||
|
|
|
@ -208,7 +208,7 @@
|
||||||
<!-- Tabs content section -->
|
<!-- Tabs content section -->
|
||||||
<div id="landing-sections" class="uk-text-small">
|
<div id="landing-sections" class="uk-text-small">
|
||||||
<div id="projects" class="landing-section landing-section-height-auto">
|
<div id="projects" class="landing-section landing-section-height-auto">
|
||||||
<projectsInModal [fetchProjects]="fetchProjects"
|
<projectsInModal [fetchProjects]="fetchProjects" [isMobile]="isMobile"
|
||||||
[organizationId]="organizationId" [properties]=properties [prevPath]="prevPath">
|
[organizationId]="organizationId" [properties]=properties [prevPath]="prevPath">
|
||||||
</projectsInModal>
|
</projectsInModal>
|
||||||
</div>
|
</div>
|
||||||
|
@ -336,44 +336,54 @@
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="mobileContent == 'actions'" class="uk-container uk-section">
|
<div *ngIf="mobileContent == 'actions'" class="uk-container uk-section">
|
||||||
<ng-container *ngIf="organizationInfo?.deletedByInferenceIds">
|
<ng-container *ngIf="organizationInfo?.deletedByInferenceIds">
|
||||||
<div class="clickable uk-button-link uk-flex uk-flex-middle uk-h6 uk-margin-remove uk-padding-small uk-padding-remove-horizontal"
|
<div class="uk-padding-small uk-padding-remove-horizontal">
|
||||||
|
<div class="clickable uk-button-link uk-flex uk-flex-middle uk-h6 uk-margin-remove"
|
||||||
(click)="deleteByInferenceOpened = true; openFsModal(alertModalDeletedByInferenceFS, 'Other versions')">
|
(click)="deleteByInferenceOpened = true; openFsModal(alertModalDeletedByInferenceFS, 'Other versions')">
|
||||||
<icon [flex]="true" name="versions" visuallyHidden="versions"></icon>
|
<icon [flex]="true" name="versions" visuallyHidden="versions"></icon>
|
||||||
<span class="uk-margin-small-left">
|
<span class="uk-margin-small-left">
|
||||||
View all {{organizationInfo.deletedByInferenceIds.length}} versions
|
View all {{organizationInfo.deletedByInferenceIds.length}} versions
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<hr class="uk-margin-remove">
|
|
||||||
</ng-container>
|
|
||||||
<ng-container>
|
|
||||||
<div class="clickable uk-button-link uk-flex uk-flex-middle uk-h6 uk-margin-remove uk-padding-small uk-padding-remove-horizontal"
|
|
||||||
(click)="openFsModal(addThisFsModal, 'Share this '+openaireEntities.ORGANIZATION+' in your social networks')">
|
|
||||||
<icon [flex]="true" name="share" visuallyHidden="share"></icon>
|
|
||||||
<span class="uk-margin-small-left">Share</span>
|
|
||||||
</div>
|
</div>
|
||||||
<hr class="uk-margin-remove">
|
<hr class="uk-margin-remove">
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container>
|
<ng-container>
|
||||||
<div class="clickable uk-button-link uk-flex uk-flex-middle uk-h6 uk-margin-remove uk-padding-small uk-padding-remove-horizontal"
|
<div class="uk-padding-small uk-padding-remove-horizontal">
|
||||||
(click)="buildFunderOptions(); openFsModal(downloadReportsFsModal, 'Download')">
|
<div class="clickable" (click)="openFsModal(addThisFsModal, 'Share this '+openaireEntities.ORGANIZATION+' in your social networks')">
|
||||||
|
<div class="uk-button-link uk-flex uk-flex-middle uk-h6 uk-margin-xsmall-bottom">
|
||||||
|
<icon [flex]="true" name="share" visuallyHidden="share"></icon>
|
||||||
|
<span class="uk-margin-small-left">Share</span>
|
||||||
|
</div>
|
||||||
|
<div class="uk-padding uk-padding-remove-vertical uk-text-meta uk-text-xsmall">Share this {{openaireEntities.ORGANIZATION}} in your social networks</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr class="uk-margin-remove">
|
||||||
|
</ng-container>
|
||||||
|
<ng-container>
|
||||||
|
<div class="uk-padding-small uk-padding-remove-horizontal">
|
||||||
|
<div class="clickable" (click)="buildFunderOptions(); openFsModal(downloadReportsFsModal, 'Download')">
|
||||||
|
<div class="uk-button-link uk-flex uk-flex-middle uk-h6 uk-margin-xsmall-bottom">
|
||||||
<icon [flex]="true" name="download" visuallyHidden="download"></icon>
|
<icon [flex]="true" name="download" visuallyHidden="download"></icon>
|
||||||
<span class="uk-margin-small-left">Download</span>
|
<span class="uk-margin-small-left">Download</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="uk-padding uk-padding-remove-vertical uk-text-meta uk-text-xsmall">Download reports</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<hr class="uk-margin-remove">
|
<hr class="uk-margin-remove">
|
||||||
</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'">
|
<a class="uk-flex uk-flex-column uk-flex-middle uk-flex-center uk-link-reset" (click)="mobileContent = 'info'; scroll()">
|
||||||
<icon name="corporate_fare" type="outlined" [flex]="true" [ratio]="2" [ngClass]="mobileContent == 'info' ? 'uk-text-primary': ''"></icon>
|
<icon name="corporate_fare" type="outlined" [flex]="true" [ratio]="1.4" [ngClass]="mobileContent == 'info' ? 'uk-text-primary': ''"></icon>
|
||||||
<span>{{openaireEntities.ORGANIZATION}}</span>
|
<span>{{openaireEntities.ORGANIZATION}}</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<a class="uk-flex uk-flex-column uk-flex-middle uk-flex-center uk-link-reset" (click)="mobileContent = 'actions'">
|
<a class="uk-flex uk-flex-column uk-flex-middle uk-flex-center uk-link-reset" (click)="mobileContent = 'actions'; scroll()">
|
||||||
<icon name="pending" type="outlined" [flex]="true" [ratio]="2" [ngClass]="mobileContent == 'actions' ? 'uk-text-primary': ''"></icon>
|
<icon name="pending" type="outlined" [flex]="true" [ratio]="1.4" [ngClass]="mobileContent == 'actions' ? 'uk-text-primary': ''"></icon>
|
||||||
<span>Actions</span>
|
<span>Actions</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -533,7 +543,7 @@
|
||||||
|
|
||||||
<fs-modal *ngIf="isMobile" #fsModal classTitle="uk-tile-default uk-border-bottom">
|
<fs-modal *ngIf="isMobile" #fsModal classTitle="uk-tile-default uk-border-bottom">
|
||||||
<div *ngIf="activeTab == 'projects'" class="landing-section landing-section-height-auto">
|
<div *ngIf="activeTab == 'projects'" class="landing-section landing-section-height-auto">
|
||||||
<projectsInModal [fetchProjects]="fetchProjects"
|
<projectsInModal [fetchProjects]="fetchProjects" [isMobile]="isMobile"
|
||||||
[organizationId]="organizationId" [properties]=properties [prevPath]="prevPath">
|
[organizationId]="organizationId" [properties]=properties [prevPath]="prevPath">
|
||||||
</projectsInModal>
|
</projectsInModal>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -38,8 +38,6 @@ declare var ResizeObserver;
|
||||||
export class OrganizationComponent {
|
export class OrganizationComponent {
|
||||||
public referrer: string;
|
public referrer: string;
|
||||||
public prevPath: string;
|
public prevPath: string;
|
||||||
|
|
||||||
@Input() piwikSiteId = null;
|
|
||||||
@Input() communityId = null;
|
@Input() communityId = null;
|
||||||
|
|
||||||
public organizationInfo: OrganizationInfo;
|
public organizationInfo: OrganizationInfo;
|
||||||
|
@ -409,9 +407,7 @@ export class OrganizationComponent {
|
||||||
(this.organizationInfo.title.name?this.organizationInfo.title.name:'No title available') +
|
(this.organizationInfo.title.name?this.organizationInfo.title.name:'No title available') +
|
||||||
((this.organizationInfo.title.name && this.organizationInfo.title.name != this.organizationInfo.name) ? (', ') : '') +
|
((this.organizationInfo.title.name && this.organizationInfo.title.name != this.organizationInfo.name) ? (', ') : '') +
|
||||||
(this.organizationInfo.name?this.organizationInfo.name:''));
|
(this.organizationInfo.name?this.organizationInfo.name:''));
|
||||||
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
|
this.subscriptions.push(this._piwikService.trackView(this.properties, this.organizationInfo.title.name).subscribe());
|
||||||
this.subscriptions.push(this._piwikService.trackView(this.properties, this.organizationInfo.title.name, this.piwikSiteId).subscribe());
|
|
||||||
}
|
|
||||||
var refineFields: string [] = ["funder"];
|
var refineFields: string [] = ["funder"];
|
||||||
|
|
||||||
if (typeof document !== 'undefined') {
|
if (typeof document !== 'undefined') {
|
||||||
|
@ -464,9 +460,7 @@ export class OrganizationComponent {
|
||||||
a.remove(); // remove the element
|
a.remove(); // remove the element
|
||||||
|
|
||||||
//window.open(window.URL.createObjectURL(data));
|
//window.open(window.URL.createObjectURL(data));
|
||||||
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
|
this.subscriptions.push(this._piwikService.trackDownload(this.properties, "DownloadCSV" + filename).subscribe());
|
||||||
this.subscriptions.push(this._piwikService.trackDownload(this.properties, "DownloadCSV" + filename, this.piwikSiteId).subscribe());
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
err => {
|
err => {
|
||||||
//console.log("Error downloading the file.");
|
//console.log("Error downloading the file.");
|
||||||
|
@ -527,9 +521,7 @@ export class OrganizationComponent {
|
||||||
a.click();
|
a.click();
|
||||||
window.URL.revokeObjectURL(csvurl);
|
window.URL.revokeObjectURL(csvurl);
|
||||||
a.remove(); // remove the element
|
a.remove(); // remove the element
|
||||||
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
|
this.subscriptions.push(this._piwikService.trackDownload(this.properties, "DownloadCSV" + filename).subscribe());
|
||||||
this.subscriptions.push(this._piwikService.trackDownload(this.properties, "DownloadCSV" + filename, this.piwikSiteId).subscribe());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
let url: string;
|
let url: string;
|
||||||
|
@ -570,9 +562,7 @@ export class OrganizationComponent {
|
||||||
a.click();
|
a.click();
|
||||||
window.URL.revokeObjectURL(csvurl);
|
window.URL.revokeObjectURL(csvurl);
|
||||||
a.remove(); // remove the element
|
a.remove(); // remove the element
|
||||||
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
|
this.subscriptions.push(this._piwikService.trackDownload(this.properties, "DownloadCSV" + filename).subscribe());
|
||||||
this.subscriptions.push(this._piwikService.trackDownload(this.properties, "DownloadCSV" + filename, this.piwikSiteId).subscribe());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
err => {
|
err => {
|
||||||
|
|
|
@ -318,7 +318,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="projectInfo && hasMetrics" class="uk-width-1-1 uk-width-medium@s">
|
<div *ngIf="projectInfo && hasMetrics" class="uk-width-1-1 uk-width-medium@s">
|
||||||
<div class="landing-metrics-card uk-card uk-card-secondary uk-text-small uk-flex uk-padding-small">
|
<div class="landing-metrics-card uk-text-small uk-flex uk-padding-small">
|
||||||
<div class="uk-width-expand uk-flex uk-flex-middle">
|
<div class="uk-width-expand uk-flex uk-flex-middle">
|
||||||
<div class="uk-grid uk-grid-small uk-flex-nowrap" uk-grid uk-height-match="target: > div > .cell">
|
<div class="uk-grid uk-grid-small uk-flex-nowrap" uk-grid uk-height-match="target: > div > .cell">
|
||||||
<div>
|
<div>
|
||||||
|
@ -354,9 +354,9 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-width-1-5 uk-flex uk-flex-bottom">
|
<!-- <div class="uk-width-1-5 uk-flex uk-flex-bottom">-->
|
||||||
<img src="assets/common-assets/metrics-badge.svg" loading="lazy" alt="Metrics badge">
|
<!-- <img src="assets/common-assets/metrics-badge.svg" loading="lazy" alt="Metrics badge">-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -512,69 +512,90 @@
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="mobileContent == 'actions'" class="uk-container uk-section">
|
<div *ngIf="mobileContent == 'actions'" class="uk-container uk-section">
|
||||||
<ng-container>
|
<ng-container>
|
||||||
<div class="clickable uk-button-link uk-flex uk-flex-middle uk-h6 uk-margin-remove uk-padding-small uk-padding-remove-horizontal"
|
<div class="uk-padding-small uk-padding-remove-horizontal">
|
||||||
(click)="openFsModal(addThisFsModal, 'Share this '+openaireEntities.PROJECT+' in your social networks')">
|
<div class="clickable" (click)="openFsModal(addThisFsModal, 'Share this '+openaireEntities.PROJECT+' in your social networks')">
|
||||||
|
<div class="uk-button-link uk-flex uk-flex-middle uk-h6 uk-margin-xsmall-bottom">
|
||||||
<icon [flex]="true" name="share" visuallyHidden="share"></icon>
|
<icon [flex]="true" name="share" visuallyHidden="share"></icon>
|
||||||
<span class="uk-margin-small-left">Share</span>
|
<span class="uk-margin-small-left">Share</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="uk-padding uk-padding-remove-vertical uk-text-meta uk-text-xsmall">Share this {{openaireEntities.PROJECT}} in your social networks</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<hr class="uk-margin-remove">
|
<hr class="uk-margin-remove">
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container *ngIf="isRouteAvailable('participate/deposit/learn-how')">
|
<ng-container *ngIf="isRouteAvailable('participate/deposit/learn-how')">
|
||||||
<a class="uk-button-link uk-flex uk-flex-middle uk-h6 uk-margin-remove uk-padding-small uk-padding-remove-horizontal"
|
<div class="uk-padding-small uk-padding-remove-horizontal">
|
||||||
routerLinkActive="router-link-active" routerLink="/participate/deposit/learn-how">
|
<a class="uk-link-reset" routerLinkActive="router-link-active" routerLink="/participate/deposit/learn-how">
|
||||||
|
<div class="uk-button-link uk-flex uk-flex-middle uk-h6 uk-margin-xsmall-bottom">
|
||||||
<icon [flex]="true" name="upload" visuallyHidden="upload"></icon>
|
<icon [flex]="true" name="upload" visuallyHidden="upload"></icon>
|
||||||
<span class="uk-margin-small-left">
|
<span class="uk-margin-small-left">
|
||||||
Deposit
|
Deposit
|
||||||
</span>
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="uk-padding uk-padding-remove-vertical uk-text-meta uk-text-xsmall"><span class="uk-flex uk-flex-middle">Deposit your research</span></div>
|
||||||
</a>
|
</a>
|
||||||
<hr class="uk-margin-remove">
|
|
||||||
</ng-container>
|
|
||||||
<ng-container>
|
|
||||||
<div class="clickable uk-button-link uk-flex uk-flex-middle uk-h6 uk-margin-remove uk-padding-small uk-padding-remove-horizontal"
|
|
||||||
(click)="openFsModal(embedResultsFsModal, 'Embed results')">
|
|
||||||
<icon [flex]="true" name="code" visuallyHidden="code"></icon>
|
|
||||||
<span class="uk-margin-small-left">Embed</span>
|
|
||||||
</div>
|
</div>
|
||||||
<hr class="uk-margin-remove">
|
<hr class="uk-margin-remove">
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container>
|
<ng-container>
|
||||||
<div class="clickable uk-button-link uk-flex uk-flex-middle uk-h6 uk-margin-remove uk-padding-small uk-padding-remove-horizontal"
|
<div class="uk-padding-small uk-padding-remove-horizontal">
|
||||||
(click)="openFsModal(downloadReportFsModal, 'Download report')">
|
<div class="clickable" (click)="openFsModal(embedResultsFsModal, 'Embed results')">
|
||||||
|
<div class="uk-button-link uk-flex uk-flex-middle uk-h6 uk-margin-xsmall-bottom">
|
||||||
|
<icon [flex]="true" name="code" visuallyHidden="code"></icon>
|
||||||
|
<span class="uk-margin-small-left">Embed</span>
|
||||||
|
</div>
|
||||||
|
<div class="uk-padding uk-padding-remove-vertical uk-text-meta uk-text-xsmall">Emded results</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr class="uk-margin-remove">
|
||||||
|
</ng-container>
|
||||||
|
<ng-container>
|
||||||
|
<div class="uk-padding-small uk-padding-remove-horizontal">
|
||||||
|
<div class="clickable" (click)="openFsModal(downloadReportFsModal, 'Download report')">
|
||||||
|
<div class="uk-button-link uk-flex uk-flex-middle uk-h6 uk-margin-xsmall-bottom">
|
||||||
<icon [flex]="true" name="download" visuallyHidden="download"></icon>
|
<icon [flex]="true" name="download" visuallyHidden="download"></icon>
|
||||||
<span class="uk-margin-small-left">Download</span>
|
<span class="uk-margin-small-left">Download</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="uk-padding uk-padding-remove-vertical uk-text-meta uk-text-xsmall">Download report</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<hr class="uk-margin-remove">
|
<hr class="uk-margin-remove">
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container *ngIf="isRouteAvailable('participate/direct-claim')">
|
<ng-container *ngIf="isRouteAvailable('participate/direct-claim')">
|
||||||
<a class="uk-button-link uk-flex uk-flex-middle uk-h6 uk-margin-remove uk-padding-small uk-padding-remove-horizontal"
|
<div class="uk-padding-small uk-padding-remove-horizontal">
|
||||||
|
<a class="uk-link-reset"
|
||||||
[queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[projectId, 'project','result'])"
|
[queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[projectId, 'project','result'])"
|
||||||
routerLinkActive="router-link-active" routerLink="/participate/direct-claim">
|
routerLinkActive="router-link-active" routerLink="/participate/direct-claim">
|
||||||
|
<div class="uk-button-link uk-flex uk-flex-middle uk-h6 uk-margin-xsmall-bottom">
|
||||||
<icon [flex]="true" name="link_to" visuallyHidden="link"></icon>
|
<icon [flex]="true" name="link_to" visuallyHidden="link"></icon>
|
||||||
<span class="uk-margin-small-left">
|
<span class="uk-margin-small-left">
|
||||||
Link to
|
Link to
|
||||||
</span>
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="uk-padding uk-padding-remove-vertical uk-text-meta uk-text-xsmall"><span class="uk-flex uk-flex-middle">Link this project to {{openaireEntities.RESULTS}}</span></div>
|
||||||
</a>
|
</a>
|
||||||
|
</div>
|
||||||
<hr class="uk-margin-remove">
|
<hr class="uk-margin-remove">
|
||||||
</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'">
|
<a class="uk-flex uk-flex-column uk-flex-middle uk-flex-center uk-link-reset" (click)="mobileContent = 'info'; scroll()">
|
||||||
<icon name="assignment_turned_in" type="outlined" [flex]="true" [ratio]="2" [ngClass]="mobileContent == 'info' ? 'uk-text-primary': ''"></icon>
|
<icon name="assignment_turned_in" type="outlined" [flex]="true" [ratio]="1.4" [ngClass]="mobileContent == 'info' ? 'uk-text-primary': ''"></icon>
|
||||||
<span>{{openaireEntities.PROJECT}}</span>
|
<span>{{openaireEntities.PROJECT}}</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="projectInfo && hasMetrics">
|
<div *ngIf="projectInfo && hasMetrics">
|
||||||
<a class="uk-flex uk-flex-column uk-flex-middle uk-flex-center uk-link-reset" (click)="mobileContent = 'metrics'">
|
<a class="uk-flex uk-flex-column uk-flex-middle uk-flex-center uk-link-reset" (click)="mobileContent = 'metrics'; scroll()">
|
||||||
<icon name="bar_chart" type="outlined" [flex]="true" [ratio]="2" [ngClass]="mobileContent == 'metrics' ? 'uk-text-primary': ''"></icon>
|
<icon name="bar_chart" type="outlined" [flex]="true" [ratio]="1.4" [ngClass]="mobileContent == 'metrics' ? 'uk-text-primary': ''"></icon>
|
||||||
<span>Metrics</span>
|
<span>Metrics</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<a class="uk-flex uk-flex-column uk-flex-middle uk-flex-center uk-link-reset" (click)="mobileContent = 'actions'">
|
<a class="uk-flex uk-flex-column uk-flex-middle uk-flex-center uk-link-reset" (click)="mobileContent = 'actions'; scroll()">
|
||||||
<icon name="pending" type="outlined" [flex]="true" [ratio]="2" [ngClass]="mobileContent == 'actions' ? 'uk-text-primary': ''"></icon>
|
<icon name="pending" type="outlined" [flex]="true" [ratio]="1.4" [ngClass]="mobileContent == 'actions' ? 'uk-text-primary': ''"></icon>
|
||||||
<span>Actions</span>
|
<span>Actions</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -44,8 +44,6 @@ declare var ResizeObserver;
|
||||||
export class ProjectComponent {
|
export class ProjectComponent {
|
||||||
public referrer: string;
|
public referrer: string;
|
||||||
public prevPath: string;
|
public prevPath: string;
|
||||||
|
|
||||||
@Input() piwikSiteId = null;
|
|
||||||
@Input() communityId = null;
|
@Input() communityId = null;
|
||||||
public projectInfo: ProjectInfo;
|
public projectInfo: ProjectInfo;
|
||||||
public projectId: string;
|
public projectId: string;
|
||||||
|
@ -525,10 +523,7 @@ export class ProjectComponent {
|
||||||
this.updateTitle(this.projectName);
|
this.updateTitle(this.projectName);
|
||||||
// this.updateDescription(this.projectInfo.description?this.projectInfo.description: ("project" + (this.projectInfo.title?"," + this.projectInfo.title:"") + (this.projectInfo.funding && this.projectInfo.funding.funderName?", funder: " + this.projectInfo.funding.funderName:"") + (this.projectInfo.acronym?"," + this.projectInfo.acronym:"")));
|
// this.updateDescription(this.projectInfo.description?this.projectInfo.description: ("project" + (this.projectInfo.title?"," + this.projectInfo.title:"") + (this.projectInfo.funding && this.projectInfo.funding.funderName?", funder: " + this.projectInfo.funding.funderName:"") + (this.projectInfo.acronym?"," + this.projectInfo.acronym:"")));
|
||||||
this.updateDescription((this.projectInfo.description ? (this.projectInfo.description.substr(0,157) + (this.projectInfo.description.substr(0,157).length == 157?"...":"")) : (this.projectInfo.title)));
|
this.updateDescription((this.projectInfo.description ? (this.projectInfo.description.substr(0,157) + (this.projectInfo.description.substr(0,157).length == 157?"...":"")) : (this.projectInfo.title)));
|
||||||
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
|
this.subscriptions.push(this._piwikService.trackView(this.properties, this.projectName).subscribe());
|
||||||
this.subscriptions.push(this._piwikService.trackView(this.properties, this.projectName, this.piwikSiteId).subscribe());
|
|
||||||
}
|
|
||||||
|
|
||||||
this.project = {
|
this.project = {
|
||||||
funderId: "",
|
funderId: "",
|
||||||
funderName: ((this.projectInfo.funding) ? this.projectInfo.funding.funderShortName: ''),
|
funderName: ((this.projectInfo.funding) ? this.projectInfo.funding.funderShortName: ''),
|
||||||
|
@ -593,10 +588,7 @@ export class ProjectComponent {
|
||||||
|
|
||||||
let url = window.URL.createObjectURL(data);
|
let url = window.URL.createObjectURL(data);
|
||||||
this.download(url, filename+".csv");
|
this.download(url, filename+".csv");
|
||||||
|
this.subscriptions.push(this._piwikService.trackDownload(this.properties, "DownloadCSV"+filename).subscribe());
|
||||||
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
|
|
||||||
this.subscriptions.push(this._piwikService.trackDownload(this.properties, "DownloadCSV"+filename, this.piwikSiteId).subscribe());
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
//console.log("Error downloading the file.");
|
//console.log("Error downloading the file.");
|
||||||
|
@ -743,9 +735,7 @@ export class ProjectComponent {
|
||||||
let url = window.URL.createObjectURL(new Blob([this.htmlResultDownload], { type: 'text/html' }));
|
let url = window.URL.createObjectURL(new Blob([this.htmlResultDownload], { type: 'text/html' }));
|
||||||
this.download(url, filename+".html");
|
this.download(url, filename+".html");
|
||||||
|
|
||||||
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
|
this.subscriptions.push(this._piwikService.trackDownload(this.properties, "DownloadHTML"+filename).subscribe());
|
||||||
this.subscriptions.push(this._piwikService.trackDownload(this.properties, "DownloadHTML"+filename, this.piwikSiteId).subscribe());
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
err => {
|
err => {
|
||||||
this.handleError("Error getting html for id: " + this.projectId, err);
|
this.handleError("Error getting html for id: " + this.projectId, err);
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
//import {MaterialModule} from '@angular/material';
|
|
||||||
import {NgModule} from '@angular/core';
|
import {NgModule} from '@angular/core';
|
||||||
import {CommonModule} from '@angular/common';
|
import {CommonModule} from '@angular/common';
|
||||||
import {FormsModule} from '@angular/forms';
|
import {FormsModule} from '@angular/forms';
|
||||||
|
@ -10,8 +9,6 @@ import {ProjectServiceModule} from './projectService.module';
|
||||||
import {HtmlProjectReportService} from "../htmlProjectReport/htmlProjectReport.service";
|
import {HtmlProjectReportService} from "../htmlProjectReport/htmlProjectReport.service";
|
||||||
import {ReportsServiceModule} from '../../services/reportsService.module';
|
import {ReportsServiceModule} from '../../services/reportsService.module';
|
||||||
import {SearchResearchResultsServiceModule} from '../../services/searchResearchResultsService.module';
|
import {SearchResearchResultsServiceModule} from '../../services/searchResearchResultsService.module';
|
||||||
|
|
||||||
import {MetricsModule} from '../landing-utils/metrics/metrics.module';
|
|
||||||
import {LandingModule} from '../landing-utils/landing.module';
|
import {LandingModule} from '../landing-utils/landing.module';
|
||||||
import {LandingHeaderModule} from "../landing-utils/landing-header/landing-header.module";
|
import {LandingHeaderModule} from "../landing-utils/landing-header/landing-header.module";
|
||||||
|
|
||||||
|
@ -41,7 +38,7 @@ import {EntityActionsModule} from "../../utils/entity-actions/entity-actions.mod
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule, FormsModule, RouterModule, LandingModule,
|
CommonModule, FormsModule, RouterModule, LandingModule,
|
||||||
LoadingModalModule, AlertModalModule, ErrorMessagesModule,
|
LoadingModalModule, AlertModalModule, ErrorMessagesModule,
|
||||||
IFrameModule, MetricsModule, ReportsServiceModule,
|
IFrameModule, ReportsServiceModule,
|
||||||
SearchResearchResultsServiceModule, ProjectServiceModule,
|
SearchResearchResultsServiceModule, ProjectServiceModule,
|
||||||
Schema2jsonldModule, SEOServiceModule, HelperModule,
|
Schema2jsonldModule, SEOServiceModule, HelperModule,
|
||||||
LandingHeaderModule, MatSelectModule, FeedbackModule, AltMetricsModule,
|
LandingHeaderModule, MatSelectModule, FeedbackModule, AltMetricsModule,
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<div *ngIf="!isMobile" class="tm-main">
|
<div *ngIf="!isMobile" class="tm-main">
|
||||||
<div class="publication">
|
<div class="publication">
|
||||||
<div *ngIf="properties.adminToolsPortalType == 'eosc'" class="eosc-explore-back-search-bar">
|
<div *ngIf="properties.adminToolsPortalType == 'eosc'" class="eosc-explore-back-search-bar">
|
||||||
<div class="uk-light uk-container uk-container-large uk-padding-small uk-height-1-1">
|
<div class="uk-light uk-container uk-container-large uk-margin-left uk-height-1-1">
|
||||||
<div class="uk-flex uk-flex-inline uk-flex-middle uk-height-1-1">
|
<div class="uk-flex uk-flex-inline uk-flex-middle uk-height-1-1">
|
||||||
<a [href]="eoscBackLink" target="_self" class="uk-link-reset uk-flex uk-flex-middle uk-text-light uk-text-small">
|
<a [href]="eoscBackLink" target="_self" class="uk-link-reset uk-flex uk-flex-middle uk-text-light uk-text-small">
|
||||||
<icon name="arrow_back" visuallyHidden="back" flex="true" ratio="0.7" customClass="uk-text-light"></icon>
|
<icon name="arrow_back" visuallyHidden="back" flex="true" ratio="0.7" customClass="uk-text-light"></icon>
|
||||||
|
@ -222,7 +222,8 @@
|
||||||
[date]="resultLandingInfo.dateofacceptance" [embargoEndDate]="resultLandingInfo.embargoEndDate"
|
[date]="resultLandingInfo.dateofacceptance" [embargoEndDate]="resultLandingInfo.embargoEndDate"
|
||||||
[publisher]="resultLandingInfo.publisher" [journal]="resultLandingInfo.journal"
|
[publisher]="resultLandingInfo.publisher" [journal]="resultLandingInfo.journal"
|
||||||
[languages]="resultLandingInfo.languages" [programmingLanguages]="resultLandingInfo.programmingLanguages"
|
[languages]="resultLandingInfo.languages" [programmingLanguages]="resultLandingInfo.programmingLanguages"
|
||||||
[prevPath]="prevPath">
|
[prevPath]="prevPath" [countries]="resultLandingInfo.countries"
|
||||||
|
[projects]="resultLandingInfo.fundedByProjects">
|
||||||
</landing-header>
|
</landing-header>
|
||||||
<!-- Labels -->
|
<!-- Labels -->
|
||||||
<!-- Not used anymore - access labels will be in action bars, languages in the landing-header component -->
|
<!-- Not used anymore - access labels will be in action bars, languages in the landing-header component -->
|
||||||
|
@ -378,7 +379,7 @@
|
||||||
<!-- new metrics box -->
|
<!-- new metrics box -->
|
||||||
<div *ngIf="resultLandingInfo && resultLandingInfo.measure && (resultLandingInfo.measure.bip.length || resultLandingInfo.measure.counts.length) && !viewAll"
|
<div *ngIf="resultLandingInfo && resultLandingInfo.measure && (resultLandingInfo.measure.bip.length || resultLandingInfo.measure.counts.length) && !viewAll"
|
||||||
class="uk-margin-medium-top uk-padding uk-padding-remove-vertical">
|
class="uk-margin-medium-top uk-padding uk-padding-remove-vertical">
|
||||||
<div class="landing-metrics-card uk-card uk-card-secondary uk-text-small uk-flex uk-padding-small">
|
<div class="landing-metrics-card uk-text-small uk-flex uk-padding-small">
|
||||||
<div class="uk-width-expand uk-flex uk-flex-middle">
|
<div class="uk-width-expand uk-flex uk-flex-middle">
|
||||||
<div class="uk-grid uk-grid-small uk-flex-nowrap" uk-grid uk-height-match="target: > div > .cell">
|
<div class="uk-grid uk-grid-small uk-flex-nowrap" uk-grid uk-height-match="target: > div > .cell">
|
||||||
<div>
|
<div>
|
||||||
|
@ -442,9 +443,9 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-width-1-5 uk-flex uk-flex-bottom">
|
<!-- <div class="uk-width-1-5 uk-flex uk-flex-bottom">-->
|
||||||
<img src="assets/common-assets/metrics-badge.svg" loading="lazy" alt="Metrics badge">
|
<!-- <img src="assets/common-assets/metrics-badge.svg" loading="lazy" alt="Metrics badge">-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-margin-medium-top uk-list uk-list-large uk-padding uk-padding-remove-vertical" [class.uk-list-divider]="!viewAll">
|
<div class="uk-margin-medium-top uk-list uk-list-large uk-padding uk-padding-remove-vertical" [class.uk-list-divider]="!viewAll">
|
||||||
|
@ -488,6 +489,16 @@
|
||||||
<!-- Mobile view -->
|
<!-- Mobile view -->
|
||||||
<div *ngIf="isMobile" class="uk-hidden@m uk-position-relative landing">
|
<div *ngIf="isMobile" class="uk-hidden@m uk-position-relative landing">
|
||||||
<ng-container *ngIf="resultLandingInfo">
|
<ng-container *ngIf="resultLandingInfo">
|
||||||
|
<div *ngIf="properties.adminToolsPortalType == 'eosc'" class="eosc-explore-back-search-bar">
|
||||||
|
<div class="uk-light uk-container uk-height-1-1">
|
||||||
|
<div class="uk-flex uk-flex-inline uk-flex-middle uk-height-1-1">
|
||||||
|
<a [href]="eoscBackLink" target="_self" class="uk-link-reset uk-flex uk-flex-middle uk-text-light uk-text-small">
|
||||||
|
<icon name="arrow_back" visuallyHidden="back" flex="true" ratio="0.7" customClass="uk-text-light"></icon>
|
||||||
|
<span class="uk-margin-small-left">Go to Search</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div *ngIf="mobileContent == 'info'" class="uk-container uk-section">
|
<div *ngIf="mobileContent == 'info'" class="uk-container uk-section">
|
||||||
<div *ngIf="resultLandingInfo.hostedBy_collectedFrom && resultLandingInfo.hostedBy_collectedFrom.length > 0"
|
<div *ngIf="resultLandingInfo.hostedBy_collectedFrom && resultLandingInfo.hostedBy_collectedFrom.length > 0"
|
||||||
class="uk-margin-small-bottom uk-flex uk-flex-middle"
|
class="uk-margin-small-bottom uk-flex uk-flex-middle"
|
||||||
|
@ -564,6 +575,7 @@
|
||||||
<span>Compatible EOSC Services</span>
|
<span>Compatible EOSC Services</span>
|
||||||
<icon name="chevron_right" [ratio]="1.5" [flex]="true"></icon>
|
<icon name="chevron_right" [ratio]="1.5" [flex]="true"></icon>
|
||||||
</div>
|
</div>
|
||||||
|
<hr>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container *ngIf="resultLandingInfo.fundedByProjects && resultLandingInfo.fundedByProjects.length > 0 && (!viewAll || viewAll=='fundedBy')">
|
<ng-container *ngIf="resultLandingInfo.fundedByProjects && resultLandingInfo.fundedByProjects.length > 0 && (!viewAll || viewAll=='fundedBy')">
|
||||||
<div class="clickable uk-flex uk-flex-middle uk-flex-between" (click)="openFsModal(fundedByFsModal, 'Funded by'); onSelectActiveTab('summary')">
|
<div class="clickable uk-flex uk-flex-middle uk-flex-between" (click)="openFsModal(fundedByFsModal, 'Funded by'); onSelectActiveTab('summary')">
|
||||||
|
@ -593,88 +605,118 @@
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="mobileContent == 'actions'" class="uk-container uk-section">
|
<div *ngIf="mobileContent == 'actions'" class="uk-container uk-section">
|
||||||
<ng-container *ngIf="resultLandingInfo?.hostedBy_collectedFrom">
|
<ng-container *ngIf="resultLandingInfo?.hostedBy_collectedFrom">
|
||||||
<div class="clickable uk-button-link uk-flex uk-flex-middle uk-h6 uk-margin-remove uk-padding-small uk-padding-remove-horizontal"
|
<div class="uk-padding-small uk-padding-remove-horizontal">
|
||||||
|
<div class="clickable uk-button-link uk-flex uk-flex-middle uk-h6 uk-margin-remove"
|
||||||
(click)=" onSelectActiveTab('availableOn')">
|
(click)=" onSelectActiveTab('availableOn')">
|
||||||
<availableOn [availableOn]="resultLandingInfo.hostedBy_collectedFrom" (viewAllClicked)="viewAll=$event"
|
<availableOn [availableOn]="resultLandingInfo.hostedBy_collectedFrom" (viewAllClicked)="viewAll=$event"
|
||||||
[isMobile]="true" [usedBy]="'landing'" class="uk-width-1-1" [prevPath]="prevPath"></availableOn>
|
[isMobile]="true" [usedBy]="'landing'" class="uk-width-1-1" [prevPath]="prevPath"></availableOn>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<hr class="uk-margin-remove">
|
<hr class="uk-margin-remove">
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container *ngIf="resultLandingInfo?.deletedByInferenceIds">
|
<ng-container *ngIf="resultLandingInfo?.deletedByInferenceIds">
|
||||||
<div class="clickable uk-button-link uk-flex uk-flex-middle uk-h6 uk-margin-remove uk-padding-small uk-padding-remove-horizontal"
|
<div class="uk-padding-small uk-padding-remove-horizontal">
|
||||||
|
<div class="clickable uk-button-link uk-flex uk-flex-middle uk-h6 uk-margin-remove"
|
||||||
(click)="deleteByInferenceOpened = true; openFsModal(alertModalDeletedByInferenceFS, 'Other versions')">
|
(click)="deleteByInferenceOpened = true; openFsModal(alertModalDeletedByInferenceFS, 'Other versions')">
|
||||||
<icon [flex]="true" name="versions" visuallyHidden="versions"></icon>
|
<icon [flex]="true" name="versions" visuallyHidden="versions"></icon>
|
||||||
<span class="uk-margin-small-left">
|
<span class="uk-margin-small-left">
|
||||||
View all {{resultLandingInfo.deletedByInferenceIds.length}} versions
|
View all {{resultLandingInfo.deletedByInferenceIds.length}} versions
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<hr class="uk-margin-remove">
|
|
||||||
</ng-container>
|
|
||||||
<ng-container>
|
|
||||||
<div class="clickable uk-button-link uk-flex uk-flex-middle uk-h6 uk-margin-remove uk-padding-small uk-padding-remove-horizontal"
|
|
||||||
(click)="openFsModal(addThisFsModal, 'Share this '+getTypeName()+' in your social networks')">
|
|
||||||
<icon [flex]="true" name="share" visuallyHidden="share"></icon>
|
|
||||||
<span class="uk-margin-small-left">Share</span>
|
|
||||||
</div>
|
</div>
|
||||||
<hr class="uk-margin-remove">
|
<hr class="uk-margin-remove">
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container>
|
<ng-container>
|
||||||
<div class="clickable uk-button-link uk-flex uk-flex-middle uk-h6 uk-margin-remove uk-padding-small uk-padding-remove-horizontal"
|
<div class="uk-padding-small uk-padding-remove-horizontal">
|
||||||
|
<div class="clickable"
|
||||||
|
(click)="openFsModal(addThisFsModal, 'Share this '+getTypeName()+' in your social networks')">
|
||||||
|
<div class="uk-button-link uk-flex uk-flex-middle uk-h6 uk-margin-xsmall-bottom">
|
||||||
|
<icon [flex]="true" name="share" visuallyHidden="share"></icon>
|
||||||
|
<span class="uk-margin-small-left">Share</span>
|
||||||
|
</div>
|
||||||
|
<div class="uk-padding uk-padding-remove-vertical uk-text-meta uk-text-xsmall">Share this {{getTypeName()}} in your social networks</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr class="uk-margin-remove">
|
||||||
|
</ng-container>
|
||||||
|
<ng-container>
|
||||||
|
<div class="uk-padding-small uk-padding-remove-horizontal">
|
||||||
|
<div class="clickable"
|
||||||
(click)="citeThisClicked=true; openFsModal(citeFsModal, 'Cite this '+getTypeName())">
|
(click)="citeThisClicked=true; openFsModal(citeFsModal, 'Cite this '+getTypeName())">
|
||||||
|
<div class="uk-button-link uk-flex uk-flex-middle uk-h6 uk-margin-xsmall-bottom">
|
||||||
<icon [flex]="true" name="cite" visuallyHidden="cite"></icon>
|
<icon [flex]="true" name="cite" visuallyHidden="cite"></icon>
|
||||||
<span class="uk-margin-small-left">Cite</span>
|
<span class="uk-margin-small-left">Cite</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="uk-padding uk-padding-remove-vertical uk-text-meta uk-text-xsmall">Cite this {{getTypeName()}}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<hr class="uk-margin-remove">
|
<hr class="uk-margin-remove">
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container *ngIf="properties.adminToolsPortalType == 'explore' || properties.adminToolsPortalType == 'community' || properties.adminToolsPortalType == 'aggregator'" >
|
<ng-container *ngIf="properties.adminToolsPortalType == 'explore' || properties.adminToolsPortalType == 'community' || properties.adminToolsPortalType == 'aggregator'" >
|
||||||
<div class="clickable uk-button-link uk-flex uk-flex-middle uk-h6 uk-margin-remove uk-padding-small uk-padding-remove-horizontal">
|
<div class="uk-padding-small uk-padding-remove-horizontal ">
|
||||||
<orcid-work [resultId]="id" [resultTitle]="resultLandingInfo?.title" [resultLandingInfo]="resultLandingInfo"
|
<orcid-work [resultId]="id" [resultTitle]="resultLandingInfo?.title" [resultLandingInfo]="resultLandingInfo"
|
||||||
[pids]="pidsArrayString" [pageType]="'landing'" [isMobile]="true">
|
[pids]="pidsArrayString" [pageType]="'landing'" [isMobile]="true"
|
||||||
|
class="uk-button-link uk-flex uk-flex-middle uk-h6 uk-margin-remove">
|
||||||
</orcid-work>
|
</orcid-work>
|
||||||
</div>
|
</div>
|
||||||
<hr class="uk-margin-remove">
|
<hr class="uk-margin-remove">
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container *ngIf="isRouteAvailable('participate/direct-claim')">
|
<ng-container *ngIf="isRouteAvailable('participate/direct-claim')">
|
||||||
<a class="uk-button-link uk-flex uk-flex-middle uk-h6 uk-margin-remove uk-padding-small uk-padding-remove-horizontal"
|
<div class="uk-padding-small uk-padding-remove-horizontal">
|
||||||
|
<a class="uk-link-reset uk-margin-remove"
|
||||||
[queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[id,type,'project'])"
|
[queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[id,type,'project'])"
|
||||||
routerLinkActive="router-link-active" routerLink="/participate/direct-claim">
|
routerLinkActive="router-link-active" routerLink="/participate/direct-claim">
|
||||||
|
<div class="uk-button-link uk-flex uk-flex-middle uk-h6 uk-margin-xsmall-bottom">
|
||||||
<icon [flex]="true" name="link_to" visuallyHidden="link"></icon>
|
<icon [flex]="true" name="link_to" visuallyHidden="link"></icon>
|
||||||
<span class="uk-margin-small-left"
|
<span class="uk-margin-small-left">
|
||||||
[title]="'<span class=\'uk-flex uk-flex-middle\'>Link this '+getTypeName()+' to ...<span class=\'material-icons uk-margin-small-left\'>east</span></span>'"
|
|
||||||
[attr.uk-tooltip]="'pos: bottom-left; cls: uk-active uk-text-small uk-padding-small'">
|
|
||||||
Link to
|
Link to
|
||||||
</span>
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="uk-padding uk-padding-remove-vertical uk-text-meta uk-text-xsmall">
|
||||||
|
<span class="uk-flex uk-flex-middle">Link this {{getTypeName()}} to ...</span>
|
||||||
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
</div>
|
||||||
|
<hr class="uk-margin-remove">
|
||||||
|
</ng-container>
|
||||||
|
<ng-container>
|
||||||
|
<div class="uk-padding-small uk-padding-remove-horizontal">
|
||||||
|
<div *ngIf="properties.enableEoscDataTransfer && resultLandingInfo.resultType == 'dataset' &&
|
||||||
|
resultLandingInfo.identifiers && resultLandingInfo.identifiers.get('doi') &&
|
||||||
|
resultLandingInfo.identifiers.get('doi').join('').indexOf('zenodo.')!=-1"
|
||||||
|
class="clickable uk-button-link uk-flex uk-flex-middle uk-h6 uk-margin-remove">
|
||||||
|
<egi-transfer-data class="uk-width-1-1" [dois]="resultLandingInfo.identifiers.get('doi')" [isOpen]="egiTransferModalOpen" [isMobile]="true"></egi-transfer-data>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<hr class="uk-margin-remove">
|
<hr class="uk-margin-remove">
|
||||||
</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'">
|
<a class="uk-flex uk-flex-column uk-flex-middle uk-flex-center uk-link-reset" (click)="mobileContent = 'info'; egiTransferModalOpen = false; scroll();">
|
||||||
<span [ngClass]="mobileContent == 'info' ? 'uk-text-primary': ''">
|
<span [ngClass]="mobileContent == 'info' ? 'uk-text-primary': ''">
|
||||||
<icon *ngIf="getTypeName().toLowerCase() == 'publication'" name="description" type="outlined" [flex]="true" [ratio]="2"></icon>
|
<icon *ngIf="getTypeName().toLowerCase() == 'publication'" name="description" type="outlined" [flex]="true" [ratio]="1.4"></icon>
|
||||||
<icon *ngIf="getTypeName().toLowerCase() == 'research data'" name="database" type="outlined" [flex]="true" [ratio]="2"></icon>
|
<icon *ngIf="getTypeName().toLowerCase() == 'research data'" name="database" type="outlined" [flex]="true" [ratio]="1.4"></icon>
|
||||||
<icon *ngIf="getTypeName().toLowerCase() == 'research software'" name="integration_instructions" type="outlined" [flex]="true" [ratio]="2"></icon>
|
<icon *ngIf="getTypeName().toLowerCase() == 'research software'" name="integration_instructions" type="outlined" [flex]="true" [ratio]="1.4"></icon>
|
||||||
<icon *ngIf="getTypeName().toLowerCase() == 'other research product'" name="apps" type="outlined" [flex]="true" [ratio]="2"></icon>
|
<icon *ngIf="getTypeName().toLowerCase() == 'other research product'" name="apps" type="outlined" [flex]="true" [ratio]="1.4"></icon>
|
||||||
<icon *ngIf="getTypeName().toLowerCase() == 'project'" name="assignment_turned_in" type="outlined" [flex]="true" [ratio]="2"></icon>
|
<icon *ngIf="getTypeName().toLowerCase() == 'project'" name="assignment_turned_in" type="outlined" [flex]="true" [ratio]="1.4"></icon>
|
||||||
<icon *ngIf="getTypeName().toLowerCase() == 'data source'" name="note_add" type="outlined" [flex]="true" [ratio]="2"></icon>
|
<icon *ngIf="getTypeName().toLowerCase() == 'data source'" name="note_add" type="outlined" [flex]="true" [ratio]="1.4"></icon>
|
||||||
<icon *ngIf="getTypeName().toLowerCase() == 'organization'" name="corporate_fare" type="outlined" [flex]="true" [ratio]="2"></icon>
|
<icon *ngIf="getTypeName().toLowerCase() == 'organization'" name="corporate_fare" type="outlined" [flex]="true" [ratio]="1.4"></icon>
|
||||||
</span>
|
</span>
|
||||||
<span>{{getTypeName()}}</span>
|
<span>{{getTypeName()}}</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="resultLandingInfo && (resultLandingInfo.measure || hasAltMetrics)">
|
<div *ngIf="resultLandingInfo && (resultLandingInfo.measure || hasAltMetrics)">
|
||||||
<a class="uk-flex uk-flex-column uk-flex-middle uk-flex-center uk-link-reset" (click)="mobileContent = 'metrics'">
|
<a class="uk-flex uk-flex-column uk-flex-middle uk-flex-center uk-link-reset" (click)="mobileContent = 'metrics'; scroll()">
|
||||||
<icon name="bar_chart" type="outlined" [flex]="true" [ratio]="2" [ngClass]="mobileContent == 'metrics' ? 'uk-text-primary': ''"></icon>
|
<icon name="bar_chart" type="outlined" [flex]="true" [ratio]="1.4" [ngClass]="mobileContent == 'metrics' ? 'uk-text-primary': ''"></icon>
|
||||||
<span>Metrics</span>
|
<span>Metrics</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<a class="uk-flex uk-flex-column uk-flex-middle uk-flex-center uk-link-reset" (click)="mobileContent = 'actions'">
|
<a class="uk-flex uk-flex-column uk-flex-middle uk-flex-center uk-link-reset" (click)="mobileContent = 'actions'; scroll()">
|
||||||
<icon name="pending" type="outlined" [flex]="true" [ratio]="2" [ngClass]="mobileContent == 'actions' ? 'uk-text-primary': ''"></icon>
|
<icon name="pending" type="outlined" [flex]="true" [ratio]="1.4" [ngClass]="mobileContent == 'actions' ? 'uk-text-primary': ''"></icon>
|
||||||
<span>Actions</span>
|
<span>Actions</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -781,7 +823,7 @@
|
||||||
</modal-alert>
|
</modal-alert>
|
||||||
<modal-alert *ngIf="resultLandingInfo" #citeModal>
|
<modal-alert *ngIf="resultLandingInfo" #citeModal>
|
||||||
<citeThis *ngIf="citeThisClicked" [result]="resultLandingInfo" [id]="id"
|
<citeThis *ngIf="citeThisClicked" [result]="resultLandingInfo" [id]="id"
|
||||||
[type]="title.toLowerCase()" [piwikSiteId]="piwikSiteId"></citeThis>
|
[type]="title.toLowerCase()"></citeThis>
|
||||||
</modal-alert>
|
</modal-alert>
|
||||||
|
|
||||||
<modal-alert *ngIf="resultLandingInfo" #addThisModal classBody="uk-flex uk-flex-center uk-flex-middle">
|
<modal-alert *ngIf="resultLandingInfo" #addThisModal classBody="uk-flex uk-flex-center uk-flex-middle">
|
||||||
|
@ -1229,7 +1271,7 @@
|
||||||
|
|
||||||
<fs-modal *ngIf="resultLandingInfo" #citeFsModal classTitle="uk-tile-default uk-border-bottom">
|
<fs-modal *ngIf="resultLandingInfo" #citeFsModal classTitle="uk-tile-default uk-border-bottom">
|
||||||
<citeThis *ngIf="citeThisClicked" [result]="resultLandingInfo" [id]="id"
|
<citeThis *ngIf="citeThisClicked" [result]="resultLandingInfo" [id]="id"
|
||||||
[type]="title.toLowerCase()" [piwikSiteId]="piwikSiteId"></citeThis>
|
[type]="title.toLowerCase()"></citeThis>
|
||||||
</fs-modal>
|
</fs-modal>
|
||||||
|
|
||||||
<fs-modal *ngIf="resultLandingInfo" #addThisFsModal classTitle="uk-tile-default uk-border-bottom" classBody="uk-flex uk-flex-center uk-flex-middle">
|
<fs-modal *ngIf="resultLandingInfo" #addThisFsModal classTitle="uk-tile-default uk-border-bottom" classBody="uk-flex uk-flex-center uk-flex-middle">
|
||||||
|
|
|
@ -28,6 +28,7 @@ import {NumberUtils} from '../../utils/number-utils.class';
|
||||||
import {FullScreenModalComponent} from "../../utils/modal/full-screen-modal/full-screen-modal.component";
|
import {FullScreenModalComponent} from "../../utils/modal/full-screen-modal/full-screen-modal.component";
|
||||||
import {SdgFosSuggestComponent} from '../landing-utils/sdg-fos-suggest/sdg-fos-suggest.component';
|
import {SdgFosSuggestComponent} from '../landing-utils/sdg-fos-suggest/sdg-fos-suggest.component';
|
||||||
import {LayoutService} from "../../dashboard/sharedComponents/sidebar/layout.service";
|
import {LayoutService} from "../../dashboard/sharedComponents/sidebar/layout.service";
|
||||||
|
import {ContextsService} from "../../claims/claim-utils/service/contexts.service";
|
||||||
|
|
||||||
declare var ResizeObserver;
|
declare var ResizeObserver;
|
||||||
|
|
||||||
|
@ -40,7 +41,7 @@ export class ResultLandingComponent {
|
||||||
public prevPath: string;
|
public prevPath: string;
|
||||||
|
|
||||||
@Input() type: string = "publication";
|
@Input() type: string = "publication";
|
||||||
@Input() piwikSiteId = properties.piwikSiteId;
|
|
||||||
@Input() communityId = null;
|
@Input() communityId = null;
|
||||||
enermapsId;
|
enermapsId;
|
||||||
// @ViewChild('linkModal') linkModal;
|
// @ViewChild('linkModal') linkModal;
|
||||||
|
@ -174,6 +175,8 @@ export class ResultLandingComponent {
|
||||||
@ViewChild('fosFsModal') fosFsModal: FullScreenModalComponent;
|
@ViewChild('fosFsModal') fosFsModal: FullScreenModalComponent;
|
||||||
|
|
||||||
public noCommunities: boolean = false;
|
public noCommunities: boolean = false;
|
||||||
|
private promise: Promise<void> = null;
|
||||||
|
private publicCommunities: string[] = [];
|
||||||
|
|
||||||
public rightSidebarOffcanvasClicked: boolean = false;
|
public rightSidebarOffcanvasClicked: boolean = false;
|
||||||
public egiTransferModalOpen = false;
|
public egiTransferModalOpen = false;
|
||||||
|
@ -192,7 +195,8 @@ export class ResultLandingComponent {
|
||||||
private _location: Location,
|
private _location: Location,
|
||||||
private indexInfoService: IndexInfoService,
|
private indexInfoService: IndexInfoService,
|
||||||
private userManagementService: UserManagementService,
|
private userManagementService: UserManagementService,
|
||||||
private layoutService: LayoutService) {
|
private layoutService: LayoutService,
|
||||||
|
private _contextService: ContextsService) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
@ -239,6 +243,7 @@ export class ResultLandingComponent {
|
||||||
this.initMetaAndLinks(this.type);
|
this.initMetaAndLinks(this.type);
|
||||||
}
|
}
|
||||||
if(data["egiTransfer"] && data["egiTransfer"] == 't'){
|
if(data["egiTransfer"] && data["egiTransfer"] == 't'){
|
||||||
|
this.mobileContent = 'actions';
|
||||||
this.egiTransferModalOpen = true;
|
this.egiTransferModalOpen = true;
|
||||||
}
|
}
|
||||||
this.updateDescription("");
|
this.updateDescription("");
|
||||||
|
@ -255,6 +260,7 @@ export class ResultLandingComponent {
|
||||||
this.type="publication";
|
this.type="publication";
|
||||||
}
|
}
|
||||||
if ((this.id && StringUtils.isOpenAIREID(this.id)) || (this.identifier)) {
|
if ((this.id && StringUtils.isOpenAIREID(this.id)) || (this.identifier)) {
|
||||||
|
this.getPublicCommunities();
|
||||||
this.getVocabulariesAndResultLandingInfo();
|
this.getVocabulariesAndResultLandingInfo();
|
||||||
} else {
|
} else {
|
||||||
this.showLoading = false;
|
this.showLoading = false;
|
||||||
|
@ -495,7 +501,10 @@ export class ResultLandingComponent {
|
||||||
this.resultLandingInfo = null;
|
this.resultLandingInfo = null;
|
||||||
this.hasAltMetrics = false;
|
this.hasAltMetrics = false;
|
||||||
this.subscriptions.push(this._resultLandingService.getResultLandingInfo(this.id, this.identifier, this.type, subjectsVocabulary, this.properties).subscribe(
|
this.subscriptions.push(this._resultLandingService.getResultLandingInfo(this.id, this.identifier, this.type, subjectsVocabulary, this.properties).subscribe(
|
||||||
data => {
|
async data => {
|
||||||
|
let contexts = data.contexts;
|
||||||
|
data.contexts = [];
|
||||||
|
|
||||||
this.resultLandingInfo = data;
|
this.resultLandingInfo = data;
|
||||||
this.id = this.resultLandingInfo.objIdentifier;
|
this.id = this.resultLandingInfo.objIdentifier;
|
||||||
//old
|
//old
|
||||||
|
@ -506,23 +515,20 @@ export class ResultLandingComponent {
|
||||||
this.downloadsFrameUrl = this.properties.statisticsFrameNewAPIURL + 'chart?json=' +
|
this.downloadsFrameUrl = this.properties.statisticsFrameNewAPIURL + 'chart?json=' +
|
||||||
encodeURIComponent('{"library":"HighCharts","chartDescription":{"queries":[{"name":"Monthly downloads","type":"column","query":{"name":"usagestats.results.downloads.monthly", "parameters":["' + this.id + '"], "profile":"OpenAIRE All-inclusive" }}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Monthly downloads"},"subtitle":{},"yAxis":{"title":{"text":""}},"xAxis":{"title":{}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":false},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":true,"text":""}}}');
|
encodeURIComponent('{"library":"HighCharts","chartDescription":{"queries":[{"name":"Monthly downloads","type":"column","query":{"name":"usagestats.results.downloads.monthly", "parameters":["' + this.id + '"], "profile":"OpenAIRE All-inclusive" }}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Monthly downloads"},"subtitle":{},"yAxis":{"title":{"text":""}},"xAxis":{"title":{}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":false},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":true,"text":""}}}');
|
||||||
this.bipFrameUrl = this.properties.bipFrameAPIURL + this.id + (properties.environment == "beta" ? "&src=beta" : "");
|
this.bipFrameUrl = this.properties.bipFrameAPIURL + this.id + (properties.environment == "beta" ? "&src=beta" : "");
|
||||||
let pid:Identifier = Identifier.getPIDFromIdentifiers(this.resultLandingInfo.identifiers);
|
let pid: Identifier = Identifier.getPIDFromIdentifiers(this.resultLandingInfo.identifiers);
|
||||||
if (this.type == "result") { // no type was specified - update URL based this.resultLandingInfo.resultType
|
if (this.type == "result") { // no type was specified - update URL based this.resultLandingInfo.resultType
|
||||||
this.updateUrlWithType(pid);
|
this.updateUrlWithType(pid);
|
||||||
}
|
}
|
||||||
this.canonicalUrl = this.properties.domain+ properties.baseLink + ( pid ? (this.linkToLandingPage.split("?")[0] + "?pid=" + encodeURIComponent(pid.id)):
|
this.canonicalUrl = this.properties.domain + properties.baseLink + (pid ? (this.linkToLandingPage.split("?")[0] + "?pid=" + encodeURIComponent(pid.id)) :
|
||||||
(this.linkToLandingPage + this.resultLandingInfo.relcanId));
|
(this.linkToLandingPage + this.resultLandingInfo.relcanId));
|
||||||
this.seoService.createLinkForCanonicalURL(this.canonicalUrl);
|
this.seoService.createLinkForCanonicalURL(this.canonicalUrl);
|
||||||
this.updateUrl(this.canonicalUrl);
|
this.updateUrl(this.canonicalUrl);
|
||||||
this.addNoIndexFilter();
|
this.addNoIndexFilter();
|
||||||
if (this.resultLandingInfo.title) {
|
if (this.resultLandingInfo.title) {
|
||||||
this.updateTitle(this.resultLandingInfo.title);
|
this.updateTitle(this.resultLandingInfo.title);
|
||||||
this.updateDescription((this.resultLandingInfo.description ? (this.resultLandingInfo.description.substr(0,157) + (this.resultLandingInfo.description.substr(0,157).length == 157?"...":"")) : (this.resultLandingInfo.title)));
|
this.updateDescription((this.resultLandingInfo.description ? (this.resultLandingInfo.description.substr(0, 157) + (this.resultLandingInfo.description.substr(0, 157).length == 157 ? "..." : "")) : (this.resultLandingInfo.title)));
|
||||||
}
|
}
|
||||||
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
|
this.subscriptions.push(this._piwikService.trackViewForCustomUrl(this.properties, this.resultLandingInfo.title, this.linkToLandingPage.split("?")[1] + this.id).subscribe());
|
||||||
this.subscriptions.push(this._piwikService.trackViewForCustomUrl(this.properties, this.resultLandingInfo.title, this.linkToLandingPage.split("?")[1] + this.id ,this.piwikSiteId).subscribe());
|
|
||||||
}
|
|
||||||
|
|
||||||
let bioentitiesNum = 0;
|
let bioentitiesNum = 0;
|
||||||
if (this.resultLandingInfo.bioentities != undefined) {
|
if (this.resultLandingInfo.bioentities != undefined) {
|
||||||
this.resultLandingInfo.bioentities.forEach(function (value, key, map) {
|
this.resultLandingInfo.bioentities.forEach(function (value, key, map) {
|
||||||
|
@ -531,9 +537,9 @@ export class ResultLandingComponent {
|
||||||
}
|
}
|
||||||
this.bioentitiesNum = bioentitiesNum;
|
this.bioentitiesNum = bioentitiesNum;
|
||||||
if (typeof document !== 'undefined') {
|
if (typeof document !== 'undefined') {
|
||||||
if(this.resultLandingInfo.identifiers) {
|
if (this.resultLandingInfo.identifiers) {
|
||||||
let pidsArray: string[] = [];
|
let pidsArray: string[] = [];
|
||||||
for(let key of Array.from(this.resultLandingInfo.identifiers.keys())) {
|
for (let key of Array.from(this.resultLandingInfo.identifiers.keys())) {
|
||||||
pidsArray = pidsArray.concat(this.resultLandingInfo.identifiers.get(key));
|
pidsArray = pidsArray.concat(this.resultLandingInfo.identifiers.get(key));
|
||||||
this.pidsArrayString = pidsArray.join();
|
this.pidsArrayString = pidsArray.join();
|
||||||
}
|
}
|
||||||
|
@ -547,14 +553,17 @@ export class ResultLandingComponent {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(this.communityId && this.communityId == "enermaps" && properties.enermapsURL){
|
if (this.communityId && this.communityId == "enermaps" && properties.enermapsURL) {
|
||||||
this.enermapsId = ParsingFunctions.getEnermapsConceptId(this.resultLandingInfo.contexts);
|
this.enermapsId = ParsingFunctions.getEnermapsConceptId(this.resultLandingInfo.contexts);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.relatedClassFilters = [{"label": "All relations", "value": ""}];
|
this.relatedClassFilters = [{"label": "All relations", "value": ""}];
|
||||||
if(this.resultLandingInfo.relatedClassFilters.size > 1) {
|
if (this.resultLandingInfo.relatedClassFilters.size > 1) {
|
||||||
for (let relClass of this.resultLandingInfo.relatedClassFilters) {
|
for (let relClass of this.resultLandingInfo.relatedClassFilters) {
|
||||||
this.relatedClassFilters.push({"label": HelperFunctions.getVocabularyLabel(relClass, this.relationsVocabulary), "value": relClass});
|
this.relatedClassFilters.push({
|
||||||
|
"label": HelperFunctions.getVocabularyLabel(relClass, this.relationsVocabulary),
|
||||||
|
"value": relClass
|
||||||
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.relatedClassFilters.pop();
|
this.relatedClassFilters.pop();
|
||||||
|
@ -564,12 +573,12 @@ export class ResultLandingComponent {
|
||||||
|
|
||||||
this.hasViews = false;
|
this.hasViews = false;
|
||||||
this.hasDownloads = false;
|
this.hasDownloads = false;
|
||||||
if(this.resultLandingInfo.measure && this.resultLandingInfo.measure.counts) {
|
if (this.resultLandingInfo.measure && this.resultLandingInfo.measure.counts) {
|
||||||
this.resultLandingInfo.measure.counts.forEach(measure => {
|
this.resultLandingInfo.measure.counts.forEach(measure => {
|
||||||
if(measure.name == "views" && measure.value > 0) {
|
if (measure.name == "views" && measure.value > 0) {
|
||||||
this.hasViews = true;
|
this.hasViews = true;
|
||||||
}
|
}
|
||||||
if(measure.name == "downloads" && measure.value > 0) {
|
if (measure.name == "downloads" && measure.value > 0) {
|
||||||
this.hasDownloads = true;
|
this.hasDownloads = true;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -579,6 +588,14 @@ export class ResultLandingComponent {
|
||||||
this.setActiveTab();
|
this.setActiveTab();
|
||||||
|
|
||||||
this.cdr.detectChanges();
|
this.cdr.detectChanges();
|
||||||
|
|
||||||
|
if (contexts) {
|
||||||
|
await this.promise;
|
||||||
|
if(this.publicCommunities && this.publicCommunities.length > 0) {
|
||||||
|
this.resultLandingInfo.contexts = contexts.filter(context => this.publicCommunities.includes(context.idContext));
|
||||||
|
this.cdr.detectChanges();
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
err => {
|
err => {
|
||||||
this.handleError("Error getting " + this.type + " for " + (this.id ? ("id: " + this.id) : ("pid: " + this.identifier.id + " ("+this.identifier.class+")")), err);
|
this.handleError("Error getting " + this.type + " for " + (this.id ? ("id: " + this.id) : ("pid: " + this.identifier.id + " ("+this.identifier.class+")")), err);
|
||||||
|
@ -595,6 +612,21 @@ export class ResultLandingComponent {
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public getPublicCommunities() {
|
||||||
|
this.promise = new Promise<void>(resolve => {
|
||||||
|
this._contextService.getPublicCommunitiesByState().subscribe(
|
||||||
|
data => {
|
||||||
|
this.publicCommunities = data.map(value => value.id);
|
||||||
|
// this.publicCommunities = data;
|
||||||
|
resolve();
|
||||||
|
},
|
||||||
|
error => {
|
||||||
|
this.handleError("Error getting communities status", error);
|
||||||
|
resolve();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public metricsResults($event) {
|
public metricsResults($event) {
|
||||||
this.totalViews = $event.totalViews;
|
this.totalViews = $event.totalViews;
|
||||||
this.totalDownloads = $event.totalDownloads;
|
this.totalDownloads = $event.totalDownloads;
|
||||||
|
|
|
@ -3,8 +3,7 @@ import {CommonModule} from '@angular/common';
|
||||||
import {FormsModule} from '@angular/forms';
|
import {FormsModule} from '@angular/forms';
|
||||||
import {RouterModule} from '@angular/router';
|
import {RouterModule} from '@angular/router';
|
||||||
|
|
||||||
import {SharedModule} from '../../../openaireLibrary/shared/shared.module';
|
import {SharedModule} from '../../shared/shared.module';
|
||||||
import {MetricsModule} from '../landing-utils/metrics/metrics.module';
|
|
||||||
import {LandingModule} from '../landing-utils/landing.module';
|
import {LandingModule} from '../landing-utils/landing.module';
|
||||||
import {CiteThisModule} from '../landing-utils/citeThis/citeThis.module';
|
import {CiteThisModule} from '../landing-utils/citeThis/citeThis.module';
|
||||||
import {IFrameModule} from '../../utils/iframe.module';
|
import {IFrameModule} from '../../utils/iframe.module';
|
||||||
|
@ -46,7 +45,7 @@ import {EntityActionsModule} from "../../utils/entity-actions/entity-actions.mod
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule, FormsModule, LandingModule, SharedModule, RouterModule,
|
CommonModule, FormsModule, LandingModule, SharedModule, RouterModule,
|
||||||
CiteThisModule, PagingModule, IFrameModule,
|
CiteThisModule, PagingModule, IFrameModule,
|
||||||
MetricsModule, AltMetricsModule, Schema2jsonldModule, SEOServiceModule,
|
AltMetricsModule, Schema2jsonldModule, SEOServiceModule,
|
||||||
DeletedByInferenceModule, ShowAuthorsModule, HelperModule, ResultLandingUtilsModule, AlertModalModule,
|
DeletedByInferenceModule, ShowAuthorsModule, HelperModule, ResultLandingUtilsModule, AlertModalModule,
|
||||||
AnnotationModule, LandingHeaderModule, NoLoadPaging, ResultPreviewModule, FeedbackModule, TabsModule, LoadingModule,
|
AnnotationModule, LandingHeaderModule, NoLoadPaging, ResultPreviewModule, FeedbackModule, TabsModule, LoadingModule,
|
||||||
OrcidModule, MatFormFieldModule, MatSelectModule, IconsModule, InputModule, EGIDataTransferModule, RecaptchaModule,
|
OrcidModule, MatFormFieldModule, MatSelectModule, IconsModule, InputModule, EGIDataTransferModule, RecaptchaModule,
|
||||||
|
|
|
@ -131,6 +131,7 @@ export class Session {
|
||||||
} else if (type == 'project') {
|
} else if (type == 'project') {
|
||||||
return user && this.isProjectCurator(user);
|
return user && this.isProjectCurator(user);
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static isPortalAdministrator(user: User): boolean {
|
public static isPortalAdministrator(user: User): boolean {
|
||||||
|
|
|
@ -29,6 +29,7 @@ export class Stakeholder {
|
||||||
visibility: Visibility;
|
visibility: Visibility;
|
||||||
creationDate: Date = null;
|
creationDate: Date = null;
|
||||||
updateDate: Date;
|
updateDate: Date;
|
||||||
|
projectUpdateDate: Date;
|
||||||
/** @warning Use pipe in HTML or StringUtils.getLogoUrl in components */
|
/** @warning Use pipe in HTML or StringUtils.getLogoUrl in components */
|
||||||
logoUrl: string;
|
logoUrl: string;
|
||||||
isUpload: boolean = false;
|
isUpload: boolean = false;
|
||||||
|
@ -245,6 +246,8 @@ export class IndicatorFilterUtils {
|
||||||
}else if (table == "organization"){
|
}else if (table == "organization"){
|
||||||
return this.getOrganizationFilter(filterType);
|
return this.getOrganizationFilter(filterType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return "";
|
||||||
}
|
}
|
||||||
static getResultFilter(table: string = null, filterType:FilterType) {
|
static getResultFilter(table: string = null, filterType:FilterType) {
|
||||||
//works for tables ["publication", "software", "dataset", "other", "result"]
|
//works for tables ["publication", "software", "dataset", "other", "result"]
|
||||||
|
@ -257,24 +260,28 @@ export class IndicatorFilterUtils {
|
||||||
}else if (filterType == "co-funded") {
|
}else if (filterType == "co-funded") {
|
||||||
return '{"groupFilters":[{"field":"' + table + '.No of funders","type":">","values":["1"]}],"op":"AND"}';
|
return '{"groupFilters":[{"field":"' + table + '.No of funders","type":">","values":["1"]}],"op":"AND"}';
|
||||||
}
|
}
|
||||||
|
return "";
|
||||||
}
|
}
|
||||||
static getProjectFilter( filterType:FilterType) {
|
static getProjectFilter( filterType:FilterType) {
|
||||||
//works for table "project"
|
//works for table "project"
|
||||||
if (filterType == "fundingL0") {
|
if (filterType == "fundingL0") {
|
||||||
return '{"groupFilters":[{"field":"project.funding level 0","type":"=","values":["' + ChartHelper.prefix + 'fundingL0' + ChartHelper.suffix + '"]}],"op":"AND"}';
|
return '{"groupFilters":[{"field":"project.funding level 0","type":"=","values":["' + ChartHelper.prefix + 'fundingL0' + ChartHelper.suffix + '"]}],"op":"AND"}';
|
||||||
}
|
}
|
||||||
|
return "";
|
||||||
}
|
}
|
||||||
static getOrganizationFilter( filterType:FilterType) {
|
static getOrganizationFilter( filterType:FilterType) {
|
||||||
//works for table "organization"
|
//works for table "organization"
|
||||||
if (filterType == "fundingL0") {
|
if (filterType == "fundingL0") {
|
||||||
return '{"groupFilters":[{"field":"organization.project.funding level 0","type":"=","values":["' + ChartHelper.prefix + 'fundingL0' + ChartHelper.suffix + '"]}],"op":"AND"}';
|
return '{"groupFilters":[{"field":"organization.project.funding level 0","type":"=","values":["' + ChartHelper.prefix + 'fundingL0' + ChartHelper.suffix + '"]}],"op":"AND"}';
|
||||||
}
|
}
|
||||||
|
return "";
|
||||||
}
|
}
|
||||||
static getCountryFilter( filterType:FilterType) {
|
static getCountryFilter( filterType:FilterType) {
|
||||||
//works for table "country"
|
//works for table "country"
|
||||||
if (filterType == "fundingL0") {
|
if (filterType == "fundingL0") {
|
||||||
return '{"groupFilters":[{"field":"country.organization.project.funding level 0","type":"=","values":["' + ChartHelper.prefix + 'fundingL0' + ChartHelper.suffix + '"]}],"op":"AND"}';
|
return '{"groupFilters":[{"field":"country.organization.project.funding level 0","type":"=","values":["' + ChartHelper.prefix + 'fundingL0' + ChartHelper.suffix + '"]}],"op":"AND"}';
|
||||||
}
|
}
|
||||||
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
static filterIndexOf(filterToAdd, currentFilters):any{
|
static filterIndexOf(filterToAdd, currentFilters):any{
|
||||||
|
|
|
@ -103,9 +103,9 @@ export class MyOrcidLinksComponent {
|
||||||
|
|
||||||
private errorCodes: ErrorCodes;
|
private errorCodes: ErrorCodes;
|
||||||
private errorMessages: ErrorMessagesComponent;
|
private errorMessages: ErrorMessagesComponent;
|
||||||
@Input() piwikSiteId = null;
|
|
||||||
public results =[];
|
public results:Map<number,{"work":{},results:ResultPreview[]}[]> = new Map();
|
||||||
public currentResults = [];
|
public currentResults:{"work":{},results:ResultPreview[]}[] = [];
|
||||||
public totalResults:number = 0 ;
|
public totalResults:number = 0 ;
|
||||||
public baseUrl:string;
|
public baseUrl:string;
|
||||||
public searchUtils:SearchUtilsClass = new SearchUtilsClass();
|
public searchUtils:SearchUtilsClass = new SearchUtilsClass();
|
||||||
|
@ -163,7 +163,7 @@ export class MyOrcidLinksComponent {
|
||||||
|
|
||||||
if(typeof document !== 'undefined') {
|
if(typeof document !== 'undefined') {
|
||||||
this.tokenUrl = properties.orcidTokenURL
|
this.tokenUrl = properties.orcidTokenURL
|
||||||
+ "client_id="+properties.orcidClientId
|
+ "clientid="+properties.orcidClientId
|
||||||
// + "&response_type=code&scope=/activities/update"
|
// + "&response_type=code&scope=/activities/update"
|
||||||
// + "&response_type=code&scope=/authenticate /activities/update /person/update /read-limited"
|
// + "&response_type=code&scope=/authenticate /activities/update /person/update /read-limited"
|
||||||
+ "&response_type=code&scope=/activities/update /read-limited"
|
+ "&response_type=code&scope=/activities/update /read-limited"
|
||||||
|
@ -186,11 +186,7 @@ export class MyOrcidLinksComponent {
|
||||||
this.updateTitle("My ORCID Links");
|
this.updateTitle("My ORCID Links");
|
||||||
this.updateDescription(description);
|
this.updateDescription(description);
|
||||||
this.updateUrl( properties.domain + properties.baseLink + this.route.url);
|
this.updateUrl( properties.domain + properties.baseLink + this.route.url);
|
||||||
|
this.subscriptions.push(this._piwikService.trackView(this.properties, "My ORCID links").subscribe());
|
||||||
if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){
|
|
||||||
this.subscriptions.push(this._piwikService.trackView(this.properties, "My ORCID links", this.piwikSiteId).subscribe());
|
|
||||||
}
|
|
||||||
|
|
||||||
this.typeQuery = "&type=results";
|
this.typeQuery = "&type=results";
|
||||||
this.getLocalWorks();
|
this.getLocalWorks();
|
||||||
this.getPersonalDetails();
|
this.getPersonalDetails();
|
||||||
|
@ -257,6 +253,18 @@ export class MyOrcidLinksComponent {
|
||||||
(response: any[]) => {
|
(response: any[]) => {
|
||||||
|
|
||||||
this.works = response;//['results'];
|
this.works = response;//['results'];
|
||||||
|
/* this.works=[
|
||||||
|
{ "id" : "60391ad16c2043536ca44ea4", "pids" : [ "10.5281/zeno(do.4304132", "10.5281/zenodo.3974605" ], "putCode" : "89558576", "orcid" : "0000-0002-3880-0244", "creationDate" : "2021-02-26T15:59:13.098Z", "updateDate" : "2021-02-26T15:59:13.098Z", "dashboard" : "production_explore" },
|
||||||
|
{ "id" : "60391ceb7a767127ea9a4d06", "pids" : [ "10.5281/zenodo.4095044", "10.5281/zenodo.4095043" ], "putCode" : "89559422", "orcid" : "0000-0002-3880-0244", "creationDate" : "2021-02-26T16:08:11.930Z", "updateDate" : "2021-02-26T16:27:12.835Z", "dashboard" : "production_explore" },
|
||||||
|
{ "id" : "604244fb7a767127ea9a4d0b", "pids" : [ "10.5281/zenodo.3467103", "10.5281/zenodo.3467104", "10.1007/978-3-030-30760-8_5", "1822/62856" ], "putCode" : "90020579", "orcid" : "0000-0002-3880-0244", "creationDate" : "2021-03-05T14:49:31.972Z", "updateDate" : "2022-06-20T08:28:08.539Z", "dashboard" : "production_explore" },
|
||||||
|
{ "id" : "60744bb46c20432760765b9f", "pids" : [ "10.5281/zenodo.3701379", "10.5281/zenodo.3701380" ], "putCode" : "92074390", "orcid" : "0000-0002-3880-0244", "creationDate" : "2021-04-12T13:31:32.476Z", "updateDate" : "2021-04-12T13:31:32.476Z", "dashboard" : "production_explore" },
|
||||||
|
{ "id" : "6077f0047a767112e847f9f8", "pids" : [ "10.5281/zenodo.4559726" ], "putCode" : "92235922", "orcid" : "0000-0002-3880-0244", "creationDate" : "2021-04-15T07:49:24.078Z", "updateDate" : "2021-04-21T09:43:40.147Z", "dashboard" : "production_explore" },
|
||||||
|
{ "id" : "6079752b7a767112e847fa5b", "pids" : [ "10.5281/zenodo.4304047", "10.5281/zenodo.3980491" ], "putCode" : "92304809", "orcid" : "0000-0002-3880-0244", "creationDate" : "2021-04-16T11:29:47.905Z", "updateDate" : "2021-04-16T11:29:47.905Z", "dashboard" : "production_explore" },
|
||||||
|
{ "id" : "63186abb7a767129935f495b", "pids" : [ "10.5281/zenodo.1314672", "10.5281/zenodo.1412509", "10.5281/zenodo.1314671" ], "putCode" : "118582128", "orcid" : "0000-0002-3880-0244", "creationDate" : "2022-09-07T09:56:11.556Z", "updateDate" : "2022-09-07T09:56:11.556Z", "dashboard" : "production_explore" },
|
||||||
|
{ "id" : "63186ade6c204337f56d97ca", "pids" : [ "10.5281/zenodo.6634431", "10.5281/zenodo.6385204", "10.5281/zenodo.4559725" ], "putCode" : "118582151", "orcid" : "0000-0002-3880-0244", "creationDate" : "2022-09-07T09:56:46.231Z", "updateDate" : "2022-09-07T09:56:46.231Z", "dashboard" : "production_explore" },
|
||||||
|
{ "id" : "63186ae27a767129935f495c", "pids" : [ "10.5281/zenodo.5801283", "10.5281/zenodo.3516917", "10.5281/zenodo.6616871" ], "putCode" : "118582162", "orcid" : "0000-0002-3880-0244", "creationDate" : "2022-09-07T09:56:50.660Z", "updateDate" : "2022-09-07T09:56:50.660Z", "dashboard" : "production_explore" }
|
||||||
|
];*/
|
||||||
|
|
||||||
this.totalOrcidResults = this.works.length;//response['total'];
|
this.totalOrcidResults = this.works.length;//response['total'];
|
||||||
|
|
||||||
this.prepareOrcidQuery();
|
this.prepareOrcidQuery();
|
||||||
|
@ -270,7 +278,7 @@ export class MyOrcidLinksComponent {
|
||||||
|
|
||||||
public prepareOrcidQuery() {
|
public prepareOrcidQuery() {
|
||||||
|
|
||||||
if(this.results.length >= this.currentPage) {
|
if(Array.from(this.results.keys()).length >= this.currentPage) {
|
||||||
this.currentResults = this.results[this.currentPage-1];
|
this.currentResults = this.results[this.currentPage-1];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -306,11 +314,7 @@ export class MyOrcidLinksComponent {
|
||||||
this.disableForms = true;
|
this.disableForms = true;
|
||||||
this.currentResults = [];
|
this.currentResults = [];
|
||||||
this.searchUtils.totalResults = 0;
|
this.searchUtils.totalResults = 0;
|
||||||
|
|
||||||
// let params: string = this.orcidQuery + this.typeQuery;
|
|
||||||
//this.subs.push(this._searchResearchResultsService.advancedSearchResults(this.resultType, parameters, page, size, sortBy, this.properties, (refine) ? this.searchPage.getRefineFieldsQuery() : null, this.searchPage.getFields(), refineFieldsFilterQuery)
|
|
||||||
this.subscriptions.push(this._searchResearchResultsService.searchForMyOrcidLinks(this.resultType, this.orcidQuery, this.typeQuery, 1, 50)
|
this.subscriptions.push(this._searchResearchResultsService.searchForMyOrcidLinks(this.resultType, this.orcidQuery, this.typeQuery, 1, 50)
|
||||||
//this.subs.push(this._searchResearchResultsService.advancedSearchResults(this.resultType, parameters, page, size, sortBy, this.properties, null, this.searchPage.getFields(), refineFieldsFilterQuery)
|
|
||||||
.subscribe(
|
.subscribe(
|
||||||
data => {
|
data => {
|
||||||
let totalResults = data[0];
|
let totalResults = data[0];
|
||||||
|
@ -334,28 +338,29 @@ export class MyOrcidLinksComponent {
|
||||||
let resultsFound: Map<string[], number> = new Map<string[], number>();
|
let resultsFound: Map<string[], number> = new Map<string[], number>();
|
||||||
|
|
||||||
for(let work of works) {
|
for(let work of works) {
|
||||||
|
let relatedResults = [];
|
||||||
|
this.currentResults.push({"work": work, "results" : relatedResults})
|
||||||
results.forEach(result => {
|
results.forEach(result => {
|
||||||
let identifierValues: string[] = [].concat(...Array.from(result.identifiers.values()));
|
let identifierValues: string[] = [].concat(...Array.from(result.identifiers.values()));
|
||||||
if(work['pids'].some(pid => identifierValues.includes(pid))) {
|
if(work['pids'].some(pid => identifierValues.includes(pid))) {
|
||||||
|
|
||||||
let index: number = resultsFound.get(identifierValues);
|
let index: number = resultsFound.get(identifierValues);
|
||||||
if(!index) {
|
if(!index) {
|
||||||
this.currentResults.push(this.getResultPreview(result));
|
relatedResults.push(this.getResultPreview(result));
|
||||||
index = this.currentResults.length - 1;
|
index = relatedResults.length - 1;
|
||||||
|
relatedResults[index].orcidPutCodes = [];
|
||||||
this.currentResults[index].orcidPutCodes = [];
|
relatedResults[index].orcidCreationDates = [];
|
||||||
this.currentResults[index].orcidCreationDates = [];
|
relatedResults[index].orcidUpdateDates = [];
|
||||||
this.currentResults[index].orcidUpdateDates = [];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (work['putCode']) {
|
if (work['putCode']) {
|
||||||
this.currentResults[index].orcidPutCodes.push(work['putCode']);
|
relatedResults[index].orcidPutCodes.push(work['putCode']);
|
||||||
}
|
}
|
||||||
if (work['creationDate']) {
|
if (work['creationDate']) {
|
||||||
this.currentResults[index].orcidCreationDates.push(work['creationDate']);
|
relatedResults[index].orcidCreationDates.push(work['creationDate']);
|
||||||
}
|
}
|
||||||
if (work['updateDate']) {
|
if (work['updateDate']) {
|
||||||
this.currentResults[index].orcidUpdateDates.push(work['updateDate']);
|
relatedResults[index].orcidUpdateDates.push(work['updateDate']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -371,44 +376,6 @@ export class MyOrcidLinksComponent {
|
||||||
this.disableForms = false;
|
this.disableForms = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public resultsReturned2(results: any, totalResults, works: any[]) {
|
|
||||||
this.searchUtils.totalResults = totalResults;
|
|
||||||
|
|
||||||
for(let result of results) {
|
|
||||||
let identifierValues: string[] = [].concat(...Array.from(result.identifiers.values()));
|
|
||||||
|
|
||||||
this.currentResults.push(this.getResultPreview(result));
|
|
||||||
|
|
||||||
let filteredWorks = works.filter(work => {
|
|
||||||
return work['pids'].some(pid => identifierValues.includes(pid));
|
|
||||||
})
|
|
||||||
|
|
||||||
this.currentResults[this.currentResults.length - 1].orcidPutCodes = [];
|
|
||||||
this.currentResults[this.currentResults.length - 1].orcidCreationDates = [];
|
|
||||||
this.currentResults[this.currentResults.length - 1].orcidUpdateDates = [];
|
|
||||||
|
|
||||||
filteredWorks.forEach(work => {
|
|
||||||
if(work['putCode']) {
|
|
||||||
this.currentResults[this.currentResults.length - 1].orcidPutCodes.push(work['putCode']);
|
|
||||||
}
|
|
||||||
if(work['creationDate']) {
|
|
||||||
this.currentResults[this.currentResults.length - 1].orcidCreationDates.push(work['creationDate']);
|
|
||||||
}
|
|
||||||
if(work['updateDate']) {
|
|
||||||
this.currentResults[this.currentResults.length - 1].orcidUpdateDates.push(work['updateDate']);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
this.results[this.currentPage-1] = this.currentResults;
|
|
||||||
this.searchUtils.status = this.errorCodes.DONE;
|
|
||||||
if (this.searchUtils.totalResults == 0) {
|
|
||||||
this.searchUtils.status = this.errorCodes.NONE;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.disableForms = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public getResultPreview(result: SearchResult): ResultPreview {
|
public getResultPreview(result: SearchResult): ResultPreview {
|
||||||
return ResultPreview.searchResultConvert(result, (result.entityType)?result.entityType:this.resultType);
|
return ResultPreview.searchResultConvert(result, (result.entityType)?result.entityType:this.resultType);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<div class="uk-margin-medium-top uk-margin">
|
<div class="uk-margin-medium-top uk-margin">
|
||||||
<no-load-paging *ngIf="totalResults > 0 && previewResults && previewResults.length > 0" [type]="openaireEntities.RESULTS"
|
<no-load-paging *ngIf="totalResults > 0 && previewResults && previewResults.length > 0" type="Orcid links"
|
||||||
(pageChange)="pageChanged($event)"
|
(pageChange)="pageChanged($event)"
|
||||||
[page]="currentPage" [pageSize]="resultsPerPage"
|
[page]="currentPage" [pageSize]="resultsPerPage"
|
||||||
[totalResults]="totalResults">
|
[totalResults]="totalResults">
|
||||||
|
@ -7,23 +7,57 @@
|
||||||
<ul class="uk-list search-results uk-margin-medium-top">
|
<ul class="uk-list search-results uk-margin-medium-top">
|
||||||
<errorMessages [status]="[status]" [type]="'results'"></errorMessages>
|
<errorMessages [status]="[status]" [type]="'results'"></errorMessages>
|
||||||
|
|
||||||
<li *ngFor="let result of previewResults">
|
<li *ngFor="let resultGroup of previewResults">
|
||||||
<div class="uk-card uk-card-default uk-padding">
|
<div class="uk-card uk-card-default uk-padding">
|
||||||
<div class="uk-grid uk-grid-divider">
|
<div class="uk-grid uk-grid-divider">
|
||||||
<div class="uk-width-expand@m uk-width-1-1 uk-first-column">
|
<div class="uk-width-expand@m uk-width-1-1 uk-first-column">
|
||||||
|
<div *ngIf="resultGroup['results'].length > 1" class="uk-alert uk-alert-warning uk-text-small">{{resultGroup['results'].length}} results found in OpenAIRE
|
||||||
|
for PIDs "{{resultGroup['work']['pids'].join("\", \"")}}"
|
||||||
|
<div>You can update your ORCID work with the most preferred result.</div>
|
||||||
|
</div>
|
||||||
|
<div *ngIf="resultGroup['results'].length == 0" class="uk-alert uk-alert-warning uk-text-small"> No results found in OpenAIRE
|
||||||
|
for PIDs "{{resultGroup['work']['pids'].join("\", \"")}}"
|
||||||
|
<div>You can remove the entry from your ORCID profile as well.</div>
|
||||||
|
</div>
|
||||||
|
<div *ngFor="let result of resultGroup['results']">
|
||||||
|
<div class = "uk-position-relative">
|
||||||
|
<div class = "uk-width-1-1">
|
||||||
<result-preview [properties]="properties" [showOrcid]="false" [showOrganizations]="true"
|
<result-preview [properties]="properties" [showOrcid]="false" [showOrganizations]="true"
|
||||||
[showSubjects]="true" [result]="result" [promoteWebsiteURL]="true"
|
[showSubjects]="true" [result]="result" [promoteWebsiteURL]="true"
|
||||||
[isCard]="false">
|
[isCard]="false">
|
||||||
</result-preview>
|
</result-preview>
|
||||||
</div>
|
</div>
|
||||||
|
<div class = "uk-position-right uk-margin-large-top">
|
||||||
<div class="uk-width-auto@m uk-width-1-1">
|
<orcid-work *ngIf="resultGroup['results'].length > 1" [resultId]="result.relcanId"
|
||||||
<div class="uk-height-1-1 uk-padding-small uk-flex uk-flex-center uk-flex-column uk-flex-middle">
|
[resultTitle]="result.title"
|
||||||
<orcid-work [resultId]="result.relcanId" [resultTitle]="result.title"
|
|
||||||
[type]="result.resultType" [pageType]="'my_search'"
|
[type]="result.resultType" [pageType]="'my_search'"
|
||||||
[putCodes]="result.orcidPutCodes" [givenPutCode]="true"
|
[putCodes]="result.orcidPutCodes" [givenPutCode]="true"
|
||||||
[identifiers]="result.identifiers"
|
[identifiers]="result.identifiers"
|
||||||
[creationDates]="result.orcidCreationDates" [updateDates]="result.orcidUpdateDates">
|
[creationDates]="result.orcidCreationDates" [updateDates]="result.orcidUpdateDates"
|
||||||
|
[showOnlyUpdateButton]="true"
|
||||||
|
>
|
||||||
|
</orcid-work>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="uk-width-auto@m uk-width-1-1">
|
||||||
|
<div class="uk-height-1-1 uk-padding-small uk-flex uk-flex-center uk-flex-column uk-flex-middle">
|
||||||
|
<orcid-work *ngIf="resultGroup['results'][0]" [resultId]="resultGroup['results'][0].relcanId" [resultTitle]="resultGroup['results'][0].title"
|
||||||
|
[type]="resultGroup['results'][0].resultType" [pageType]="'my_search'"
|
||||||
|
[putCodes]="resultGroup['results'][0].orcidPutCodes" [givenPutCode]="true"
|
||||||
|
[identifiers]="resultGroup['results'][0].identifiers"
|
||||||
|
[creationDates]="resultGroup['results'][0].orcidCreationDates" [updateDates]="resultGroup['results'][0].orcidUpdateDates"
|
||||||
|
[showUpdateButton]="resultGroup['results'].length == 1"
|
||||||
|
>
|
||||||
|
</orcid-work>
|
||||||
|
<orcid-work *ngIf="resultGroup['results'].length ==0" [pageType]="'my_search'"
|
||||||
|
[putCodes]="[resultGroup.work['putCode']]" [givenPutCode]="true"
|
||||||
|
[identifiers]="resultGroup.work['pids']"
|
||||||
|
[creationDates]="[resultGroup.work['creationDate']]" [updateDates]="resultGroup.work['updateDates']"
|
||||||
|
[showUpdateButton]="false"
|
||||||
|
>
|
||||||
</orcid-work>
|
</orcid-work>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -24,7 +24,7 @@ export class searcMyOrcidResultsComponent {
|
||||||
@Input() properties:EnvProperties;
|
@Input() properties:EnvProperties;
|
||||||
public openaireEntities = OpenaireEntities;
|
public openaireEntities = OpenaireEntities;
|
||||||
|
|
||||||
@Input() previewResults:ResultPreview[];
|
@Input() previewResults:{"work":{},results:ResultPreview[]}[];
|
||||||
|
|
||||||
public urlParam: string;
|
public urlParam: string;
|
||||||
public linkToAdvancedSearchPage: string;
|
public linkToAdvancedSearchPage: string;
|
||||||
|
@ -62,11 +62,6 @@ export class searcMyOrcidResultsComponent {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ngOnChanges(changes: SimpleChanges): void {
|
|
||||||
// if (changes.results) {
|
|
||||||
// this.initialize();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
public quote(params: string):string {
|
public quote(params: string):string {
|
||||||
return '"'+params+'"';
|
return '"'+params+'"';
|
||||||
|
@ -75,45 +70,6 @@ export class searcMyOrcidResultsComponent {
|
||||||
return ResultPreview.searchResultConvert(result, (result.entityType)?result.entityType:this.type);
|
return ResultPreview.searchResultConvert(result, (result.entityType)?result.entityType:this.type);
|
||||||
}
|
}
|
||||||
|
|
||||||
initialize() {
|
|
||||||
this.previewResults = [];
|
|
||||||
for (let result of this.results) {
|
|
||||||
this.previewResults.push(this.getResultPreview(result));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Session.isLoggedIn() && this.results && this.results.length > 0) {
|
|
||||||
this.orcidService.getLocalWorksByPids(this.previewResults.map(
|
|
||||||
previewResult => {
|
|
||||||
if (previewResult.identifiers) {
|
|
||||||
let pidsArray: string[] = [];
|
|
||||||
for (let key of Array.from(previewResult.identifiers.keys())) {
|
|
||||||
pidsArray = pidsArray.concat(previewResult.identifiers.get(key));
|
|
||||||
}
|
|
||||||
return pidsArray;//.join();
|
|
||||||
}
|
|
||||||
})).subscribe(
|
|
||||||
works => {
|
|
||||||
for (let i = 0; i < this.previewResults.length; i++) {
|
|
||||||
if (this.previewResults[i].identifiers) {
|
|
||||||
this.previewResults[i].orcidPutCodes = [];
|
|
||||||
this.previewResults[i].orcidUpdateDates = [];
|
|
||||||
|
|
||||||
works[i].forEach(work => {
|
|
||||||
this.previewResults[i].orcidPutCodes.push(work['putCode']);
|
|
||||||
this.previewResults[i].orcidUpdateDates.push(work['creationDate']);
|
|
||||||
});
|
|
||||||
// this.previewResults[i].orcidPutCodes = works[i].map(work => work['putCode']);
|
|
||||||
// this.previewResults[i].orcidUpdateDates = works[i]
|
|
||||||
// console.debug(i, this.previewResults[i].orcidPutCodes);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, error => {
|
|
||||||
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public pageChanged($event) {
|
public pageChanged($event) {
|
||||||
this.pageChange.emit($event);
|
this.pageChange.emit($event);
|
||||||
HelperFunctions.scroll();
|
HelperFunctions.scroll();
|
||||||
|
|
|
@ -20,41 +20,49 @@ declare var UIkit: any;
|
||||||
template: `
|
template: `
|
||||||
<ng-container *ngIf="pageType == 'landing' || pageType == 'search'">
|
<ng-container *ngIf="pageType == 'landing' || pageType == 'search'">
|
||||||
<span *ngIf="!putCodes || putCodes.length == 0"
|
<span *ngIf="!putCodes || putCodes.length == 0"
|
||||||
[attr.uk-tooltip]="'pos: bottom; cls: uk-active uk-text-small uk-padding-small'"
|
(click)="currentAction='add'; saveWorkPreparation();"
|
||||||
[title]="((!pids && (!identifiers || identifiers.size == 0)) || !isLoggedIn) ? ((!pids && (!identifiers || identifiers.size == 0)) ? tooltipNoPid : tooltipNoLoggedInUser) : tooltipAdd">
|
|
||||||
<a (click)="currentAction='add'; saveWorkPreparation();"
|
|
||||||
class="uk-flex uk-flex-middle uk-button-link"
|
|
||||||
[ngClass]="isMobile && !(pageType == 'landing') ? 'uk-margin-left' : 'uk-flex-center'"
|
|
||||||
[class.uk-text-bolder]="!(isMobile && pageType == 'landing')"
|
|
||||||
[class.uk-disabled]="showLoading || !isLoggedIn || (!pids && (!identifiers || identifiers.size == 0))"
|
[class.uk-disabled]="showLoading || !isLoggedIn || (!pids && (!identifiers || identifiers.size == 0))"
|
||||||
|
[class.clickable]="!showLoading && isLoggedIn && (pids || (identifiers && identifiers.size > 0))"
|
||||||
|
[ngClass]="isMobile && pageType == 'landing' ? ' uk-width-1-1' : ''"
|
||||||
|
[attr.uk-tooltip]="isMobile? 'cls: uk-invisible' : 'pos: bottom; cls: uk-active uk-text-small uk-padding-small'"
|
||||||
|
[title]="((!pids && (!identifiers || identifiers.size == 0)) || !isLoggedIn) ? ((!pids && (!identifiers || identifiers.size == 0)) ? tooltipNoPid : tooltipNoLoggedInUser) : tooltipAdd">
|
||||||
|
<a class="uk-flex uk-flex-middle uk-button-link"
|
||||||
|
[ngClass]="isMobile && !(pageType == 'landing') ? 'uk-margin-left' : ''"
|
||||||
|
[class.uk-text-bolder]="!(isMobile && pageType == 'landing')"
|
||||||
[class.uk-text-muted]="showLoading || !isLoggedIn || (!pids && (!identifiers || identifiers.size == 0))"
|
[class.uk-text-muted]="showLoading || !isLoggedIn || (!pids && (!identifiers || identifiers.size == 0))"
|
||||||
(mouseover)="hoverEvent($event)" (mouseout)="hoverEvent($event)">
|
(mouseover)="hoverEvent($event)" (mouseout)="hoverEvent($event)">
|
||||||
<icon *ngIf="!showLoading" [class.text-orcid]="!showLoading && isLoggedIn && (pids || identifiers?.size > 0)"
|
<icon *ngIf="!showLoading" [class.text-orcid]="!showLoading && isLoggedIn && (pids || identifiers?.size > 0)"
|
||||||
[class.uk-text-muted]="showLoading || !isLoggedIn || (!pids && (!identifiers || identifiers.size == 0))" name="orcid_add" ratio="1"
|
[class.uk-text-muted]="showLoading || !isLoggedIn || (!pids && (!identifiers || identifiers.size == 0))"
|
||||||
visuallyHidden="add"></icon>
|
name="orcid_add" [ratio]="(isMobile && pageType == 'search') ? 0.7 : 1" visuallyHidden="add"></icon>
|
||||||
<span *ngIf="showLoading" class="uk-icon"><loading
|
<span *ngIf="showLoading" class="uk-icon"><loading
|
||||||
[top_margin]="false" [size]="'small'"></loading></span>
|
[top_margin]="false" [size]="'small'"></loading></span>
|
||||||
<span [ngClass]="(isMobile && pageType == 'landing') ? 'uk-margin-small-left' : 'uk-margin-xsmall-left'">Claim</span>
|
<span [ngClass]="(isMobile && pageType == 'landing') ? 'uk-margin-small-left' : 'uk-margin-xsmall-left'">Claim</span>
|
||||||
</a>
|
</a>
|
||||||
|
<div *ngIf="isMobile && pageType == 'landing'" class="uk-margin-xsmall-top uk-padding uk-padding-remove-vertical uk-text-meta uk-text-xsmall"
|
||||||
|
[innerHTML]="((!pids && (!identifiers || identifiers.size == 0)) || !isLoggedIn) ? ((!pids && (!identifiers || identifiers.size == 0)) ? tooltipNoPid : tooltipNoLoggedInUser) : tooltipAdd"></div>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span *ngIf="putCodes && putCodes.length > 0"
|
<span *ngIf="putCodes && putCodes.length > 0"
|
||||||
[attr.uk-tooltip]="'pos: bottom; cls: uk-active uk-text-small uk-padding-small'"
|
(click)="currentAction='delete'; deleteWorks();"
|
||||||
[title]="((!pids && (!identifiers || identifiers.size == 0)) || !isLoggedIn) ? ((!pids && (!identifiers || identifiers.size == 0)) ? tooltipNoPid : tooltipNoLoggedInUser) : tooltipDelete">
|
|
||||||
<a (click)="currentAction='delete'; deleteWorks();"
|
|
||||||
class="uk-flex uk-flex-middle uk-button-link"
|
|
||||||
[ngClass]="isMobile && !(pageType == 'landing') ? 'uk-margin-left' : 'uk-flex-center'"
|
|
||||||
[class.uk-text-bolder]="!(isMobile && pageType == 'landing')"
|
|
||||||
[class.uk-disabled]="showLoading || !isLoggedIn || (!pids && (!identifiers || identifiers.size == 0))"
|
[class.uk-disabled]="showLoading || !isLoggedIn || (!pids && (!identifiers || identifiers.size == 0))"
|
||||||
|
[class.clickable]="!showLoading && isLoggedIn && (pids || (identifiers && identifiers.size > 0))"
|
||||||
|
[ngClass]="isMobile && pageType == 'landing' ? ' uk-width-1-1' : ''"
|
||||||
|
[attr.uk-tooltip]="isMobile? 'cls: uk-invisible' : 'pos: bottom; cls: uk-active uk-text-small uk-padding-small'"
|
||||||
|
[title]="((!pids && (!identifiers || identifiers.size == 0)) || !isLoggedIn) ? ((!pids && (!identifiers || identifiers.size == 0)) ? tooltipNoPid : tooltipNoLoggedInUser) : tooltipDelete">
|
||||||
|
<a class="uk-flex uk-flex-middle uk-button-link"
|
||||||
|
[ngClass]="isMobile && !(pageType == 'landing') ? 'uk-margin-left' : ''"
|
||||||
|
[class.uk-text-bolder]="!(isMobile && pageType == 'landing')"
|
||||||
[class.uk-text-muted]="showLoading || !isLoggedIn || (!pids && (!identifiers || identifiers.size == 0))"
|
[class.uk-text-muted]="showLoading || !isLoggedIn || (!pids && (!identifiers || identifiers.size == 0))"
|
||||||
(mouseover)="hoverEvent($event, 'delete')" (mouseout)="hoverEvent($event, 'delete')">
|
(mouseover)="hoverEvent($event, 'delete')" (mouseout)="hoverEvent($event, 'delete')">
|
||||||
<icon *ngIf="!showLoading" [class.text-orcid]="!showLoading && isLoggedIn && (pids || identifiers?.size > 0)"
|
<icon *ngIf="!showLoading" [class.text-orcid]="!showLoading && isLoggedIn && (pids || identifiers?.size > 0)"
|
||||||
[class.uk-text-muted]="showLoading || !isLoggedIn || (!pids && (!identifiers || identifiers.size == 0))" name="orcid_bin" ratio="1"
|
[class.uk-text-muted]="showLoading || !isLoggedIn || (!pids && (!identifiers || identifiers.size == 0))"
|
||||||
visuallyHidden="delete"></icon>
|
name="orcid_bin" [ratio]="(isMobile && pageType == 'search') ? 0.7 : 1" visuallyHidden="delete"></icon>
|
||||||
<span *ngIf="showLoading" class="uk-icon"><loading
|
<span *ngIf="showLoading" class="uk-icon"><loading
|
||||||
[top_margin]="false" [size]="'small'"></loading></span>
|
[top_margin]="false" [size]="'small'"></loading></span>
|
||||||
<span [ngClass]="(isMobile && pageType == 'landing') ? 'uk-margin-small-left' : 'uk-margin-xsmall-left'">Remove</span>
|
<span [ngClass]="(isMobile && pageType == 'landing') ? 'uk-margin-small-left' : 'uk-margin-xsmall-left'">Remove</span>
|
||||||
</a>
|
</a>
|
||||||
|
<div *ngIf="isMobile && pageType == 'landing'" class="uk-margin-xsmall-top uk-padding uk-padding-remove-vertical uk-text-meta uk-text-xsmall"
|
||||||
|
[innerHTML]="((!pids && (!identifiers || identifiers.size == 0)) || !isLoggedIn) ? ((!pids && (!identifiers || identifiers.size == 0)) ? tooltipNoPid : tooltipNoLoggedInUser) : tooltipDelete"></div>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<!-- Old 'remove' code -->
|
<!-- Old 'remove' code -->
|
||||||
|
@ -106,6 +114,7 @@ declare var UIkit: any;
|
||||||
|
|
||||||
|
|
||||||
<ng-container *ngIf="pageType == 'my_search'">
|
<ng-container *ngIf="pageType == 'my_search'">
|
||||||
|
<ng-container *ngIf="!showOnlyUpdateButton">
|
||||||
<span class="uk-margin-bottom uk-flex uk-flex-middle uk-flex-center">
|
<span class="uk-margin-bottom uk-flex uk-flex-middle uk-flex-center">
|
||||||
<span>ORCID </span>
|
<span>ORCID </span>
|
||||||
<img src="assets/common-assets/common/ORCIDiD_icon16x16.png" alt="" loading="lazy">
|
<img src="assets/common-assets/common/ORCIDiD_icon16x16.png" alt="" loading="lazy">
|
||||||
|
@ -124,7 +133,8 @@ declare var UIkit: any;
|
||||||
<span class="uk-margin-small-left">View ORCID work</span>
|
<span class="uk-margin-small-left">View ORCID work</span>
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
|
</ng-container>
|
||||||
|
<ng-container *ngIf="showUpdateButton">
|
||||||
<span [attr.uk-tooltip]="(!putCodes || putCodes.length == 0)
|
<span [attr.uk-tooltip]="(!putCodes || putCodes.length == 0)
|
||||||
? 'This work is currently deleted.'
|
? 'This work is currently deleted.'
|
||||||
: ('Update this work to your ORCID record' + ((properties.environment == 'beta') ? '. The action will affect your real ORCID iD.' : '')
|
: ('Update this work to your ORCID record' + ((properties.environment == 'beta') ? '. The action will affect your real ORCID iD.' : '')
|
||||||
|
@ -137,7 +147,8 @@ declare var UIkit: any;
|
||||||
<span class="uk-margin-small-left">Update ORCID work</span>
|
<span class="uk-margin-small-left">Update ORCID work</span>
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
|
</ng-container>
|
||||||
|
<ng-container *ngIf="!showOnlyUpdateButton">
|
||||||
<span *ngIf="!putCodes || putCodes.length == 0"
|
<span *ngIf="!putCodes || putCodes.length == 0"
|
||||||
[attr.uk-tooltip]="tooltipAdd">
|
[attr.uk-tooltip]="tooltipAdd">
|
||||||
<a (click)="currentAction='add'; saveWorkPreparation();"
|
<a (click)="currentAction='add'; saveWorkPreparation();"
|
||||||
|
@ -160,6 +171,7 @@ declare var UIkit: any;
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
</ng-container>
|
||||||
|
|
||||||
<modal-alert #workModal large="true">
|
<modal-alert #workModal large="true">
|
||||||
<div *ngIf="orcidWorks">
|
<div *ngIf="orcidWorks">
|
||||||
|
@ -329,6 +341,9 @@ export class OrcidWorkComponent {
|
||||||
@Input() givenPutCode: boolean = false;
|
@Input() givenPutCode: boolean = false;
|
||||||
@Input() pageType: string = "search";
|
@Input() pageType: string = "search";
|
||||||
|
|
||||||
|
//for myorcid links page
|
||||||
|
@Input() showOnlyUpdateButton: boolean = false;
|
||||||
|
@Input() showUpdateButton: boolean = true;
|
||||||
public subscriptions: Subscription[] = [];
|
public subscriptions: Subscription[] = [];
|
||||||
@ViewChild('workModal') workModal;
|
@ViewChild('workModal') workModal;
|
||||||
// @ViewChild('saveWorkModal') saveWorkModal;
|
// @ViewChild('saveWorkModal') saveWorkModal;
|
||||||
|
|
|
@ -65,7 +65,6 @@ import {Identifier} from "../../utils/string-utils.class";
|
||||||
export class SearchRecommendedResultsForOrcidComponent {
|
export class SearchRecommendedResultsForOrcidComponent {
|
||||||
private errorCodes: ErrorCodes;
|
private errorCodes: ErrorCodes;
|
||||||
private errorMessages: ErrorMessagesComponent;
|
private errorMessages: ErrorMessagesComponent;
|
||||||
@Input() piwikSiteId = null;
|
|
||||||
public results =[];
|
public results =[];
|
||||||
public totalResults:number = 0 ;
|
public totalResults:number = 0 ;
|
||||||
public baseUrl:string;
|
public baseUrl:string;
|
||||||
|
|
|
@ -22,7 +22,6 @@ export class SdgComponent implements OnInit, OnDestroy {
|
||||||
public url: string = null;
|
public url: string = null;
|
||||||
public pageTitle: string = "OpenAIRE | Sustainable Development Goals";
|
public pageTitle: string = "OpenAIRE | Sustainable Development Goals";
|
||||||
public pageDescription: string = "Laying the foundation for new approaches and solutions. We have developed a classification scheme for UN Sustainable Development Goals, to view contributions of research towards complex challenges for humanity such as climate change, biodiversity loss, pollution and poverty reduction.";
|
public pageDescription: string = "Laying the foundation for new approaches and solutions. We have developed a classification scheme for UN Sustainable Development Goals, to view contributions of research towards complex challenges for humanity such as climate change, biodiversity loss, pollution and poverty reduction.";
|
||||||
@Input() piwikSiteId = null;
|
|
||||||
|
|
||||||
private sdgs: any = [];
|
private sdgs: any = [];
|
||||||
private sdgsResearchOutcomes: any = [];
|
private sdgsResearchOutcomes: any = [];
|
||||||
|
@ -47,9 +46,7 @@ export class SdgComponent implements OnInit, OnDestroy {
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
|
this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle).subscribe());
|
||||||
this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle, this.piwikSiteId).subscribe());
|
|
||||||
}
|
|
||||||
this.url = this.properties.domain + this.properties.baseLink + this._router.url;
|
this.url = this.properties.domain + this.properties.baseLink + this._router.url;
|
||||||
this.seoService.createLinkForCanonicalURL(this.url);
|
this.seoService.createLinkForCanonicalURL(this.url);
|
||||||
this.updateUrl(this.url);
|
this.updateUrl(this.url);
|
||||||
|
|
|
@ -28,10 +28,57 @@
|
||||||
<schema2jsonld *ngIf="name && logoURL" [URL]="properties.domain+ properties.baseLink +'/search/find'"
|
<schema2jsonld *ngIf="name && logoURL" [URL]="properties.domain+ properties.baseLink +'/search/find'"
|
||||||
[logoURL]="properties.domain + properties.baseLink+logoURL" type="search" [name]=name
|
[logoURL]="properties.domain + properties.baseLink+logoURL" type="search" [name]=name
|
||||||
description="Search for {{openaireEntities.RESULTS}} ({{openaireEntities.PUBLICATIONS}}, {{openaireEntities.DATASETS}}, {{openaireEntities.SOFTWARE}}, {{openaireEntities.OTHER}}), {{openaireEntities.PROJECTS}}, {{openaireEntities.ORGANIZATIONS}}, {{openaireEntities.DATASOURCES}} in the OpenAIRE Graph. "></schema2jsonld>
|
description="Search for {{openaireEntities.RESULTS}} ({{openaireEntities.PUBLICATIONS}}, {{openaireEntities.DATASETS}}, {{openaireEntities.SOFTWARE}}, {{openaireEntities.OTHER}}), {{openaireEntities.PROJECTS}}, {{openaireEntities.ORGANIZATIONS}}, {{openaireEntities.DATASOURCES}} in the OpenAIRE Graph. "></schema2jsonld>
|
||||||
<div class="uk-container-large uk-container uk-margin-top">
|
<div class="uk-container uk-container-large uk-margin-top uk-margin-bottom">
|
||||||
<div class="uk-width-1-1 uk-background-default uk-padding-small uk-padding-remove-horizontal"
|
<div class="uk-background-default uk-padding-small uk-padding-remove-horizontal uk-padding-remove-bottom" uk-sticky="media: @m" [attr.offset]="offset">
|
||||||
uk-slider="finite: true" uk-sticky="media: @m" [attr.offset]="offset">
|
<slider-tabs type="dynamic" [flexPosition]="'center'" (activeEmitter)="entityChanged($event)">
|
||||||
<div class="uk-position-relative">
|
<slider-tab *ngIf="showPublications || showDatasets || showOrps || showSoftware"
|
||||||
|
tabId="result" [tabTemplate]="result" [active]="activeEntity == 'result'">
|
||||||
|
<ng-template #result>
|
||||||
|
<span class="uk-text-uppercase">
|
||||||
|
{{resultsName}}
|
||||||
|
<span *ngIf=" fetchPublications.searchUtils.totalResults!=null" class="uk-visible@m">
|
||||||
|
({{fetchPublications.searchUtils.totalResults | number}})</span>
|
||||||
|
</span>
|
||||||
|
</ng-template>
|
||||||
|
</slider-tab>
|
||||||
|
<slider-tab *ngIf="showProjects" tabId="projects" [tabTemplate]="projects" [active]="activeEntity == 'projects'">
|
||||||
|
<ng-template #projects>
|
||||||
|
<span class="uk-text-uppercase">
|
||||||
|
{{projectName}}
|
||||||
|
<span *ngIf="fetchProjects.searchUtils.totalResults!=null" class="uk-visible@m">
|
||||||
|
({{fetchProjects.searchUtils.totalResults | number}})</span>
|
||||||
|
</span>
|
||||||
|
</ng-template>
|
||||||
|
</slider-tab>
|
||||||
|
<slider-tab *ngIf="showDataProviders" tabId="datasources" [tabTemplate]="datasources" [active]="activeEntity == 'datasources'">
|
||||||
|
<ng-template #datasources>
|
||||||
|
<span class="uk-text-uppercase">
|
||||||
|
{{dataSourcesName}}
|
||||||
|
<span *ngIf="fetchDataproviders.searchUtils.totalResults!=null" class="uk-visible@m">
|
||||||
|
({{fetchDataproviders.searchUtils.totalResults | number}})</span>
|
||||||
|
</span>
|
||||||
|
</ng-template>
|
||||||
|
</slider-tab>
|
||||||
|
<slider-tab *ngIf="showServices" tabId="services" [tabTemplate]="services" [active]="activeEntity == 'services'">
|
||||||
|
<ng-template #services>
|
||||||
|
<span class="uk-text-uppercase">
|
||||||
|
{{servicesName}}
|
||||||
|
<span *ngIf="fetchServices.searchUtils.totalResults!=null" class="uk-visible@m">
|
||||||
|
({{fetchServices.searchUtils.totalResults | number}})</span>
|
||||||
|
</span>
|
||||||
|
</ng-template>
|
||||||
|
</slider-tab>
|
||||||
|
<slider-tab *ngIf="showOrganizations" tabId="organizations" [tabTemplate]="organizations" [active]="activeEntity == 'organizations'">
|
||||||
|
<ng-template #organizations>
|
||||||
|
<span class="uk-text-uppercase">
|
||||||
|
{{organizationsName}}
|
||||||
|
<span *ngIf="fetchOrganizations.searchUtils.totalResults!=null" class="uk-visible@m">
|
||||||
|
({{fetchOrganizations.searchUtils.totalResults | number}})</span>
|
||||||
|
</span>
|
||||||
|
</ng-template>
|
||||||
|
</slider-tab>
|
||||||
|
</slider-tabs>
|
||||||
|
<!--<div class="uk-position-relative">
|
||||||
<div class="uk-slider-container">
|
<div class="uk-slider-container">
|
||||||
<ul class="uk-slider-items uk-flex uk-flex-center" style="flex-wrap: nowrap !important;">
|
<ul class="uk-slider-items uk-flex uk-flex-center" style="flex-wrap: nowrap !important;">
|
||||||
<li *ngIf="showPublications || showDatasets || showOrps || showSoftware" (click)="entityChanged('result')">
|
<li *ngIf="showPublications || showDatasets || showOrps || showSoftware" (click)="entityChanged('result')">
|
||||||
|
@ -95,7 +142,7 @@
|
||||||
<a class="uk-position-center-left uk-blur-background" uk-slider-item="previous"><span uk-icon="chevron-left"></span></a>
|
<a class="uk-position-center-left uk-blur-background" uk-slider-item="previous"><span uk-icon="chevron-left"></span></a>
|
||||||
<a class="uk-position-center-right uk-blur-background" uk-slider-item="next"><span uk-icon="chevron-right"></span></a>
|
<a class="uk-position-center-right uk-blur-background" uk-slider-item="next"><span uk-icon="chevron-right"></span></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -88,8 +88,8 @@ export class SearchAllComponent {
|
||||||
@Input() logoURL;
|
@Input() logoURL;
|
||||||
@Input() name;
|
@Input() name;
|
||||||
@Input() customFilter: SearchCustomFilter = null;
|
@Input() customFilter: SearchCustomFilter = null;
|
||||||
@Input() piwikSiteId = null;
|
|
||||||
@Input() formPlaceholderText = "Search in Explore"
|
@Input() formPlaceholderText = "Search"
|
||||||
// @Input() formPlaceholderText = "Search for "+OpenaireEntities.RESULTS+", "+OpenaireEntities.PROJECTS+", "+OpenaireEntities.DATASOURCES+" & "+OpenaireEntities.ORGANIZATIONS+" in OpenAIRE";
|
// @Input() formPlaceholderText = "Search for "+OpenaireEntities.RESULTS+", "+OpenaireEntities.PROJECTS+", "+OpenaireEntities.DATASOURCES+" & "+OpenaireEntities.ORGANIZATIONS+" in OpenAIRE";
|
||||||
@Input() searchForm: SearchForm = {class: 'search-form', dark: true}
|
@Input() searchForm: SearchForm = {class: 'search-form', dark: true}
|
||||||
@Input() breadcrumbs: Breadcrumb[] = [];
|
@Input() breadcrumbs: Breadcrumb[] = [];
|
||||||
|
@ -158,15 +158,10 @@ export class SearchAllComponent {
|
||||||
this._meta.updateTag({content: title}, "property='og:title'");
|
this._meta.updateTag({content: title}, "property='og:title'");
|
||||||
this._meta.updateTag({content: url}, "property='og:url'");
|
this._meta.updateTag({content: url}, "property='og:url'");
|
||||||
this.seoService.createLinkForCanonicalURL(this.properties.domain +this.properties.baseLink + this._router.url, false);
|
this.seoService.createLinkForCanonicalURL(this.properties.domain +this.properties.baseLink + this._router.url, false);
|
||||||
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
|
this.subs.push(this._piwikService.trackView(this.properties, title).subscribe());
|
||||||
this.subs.push(this._piwikService.trackView(this.properties, title, this.piwikSiteId).subscribe());
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if ((this.customFilter && this.customFilter.queryFieldName == "communityId") || this.properties.adminToolsCommunity) {
|
if ((this.customFilter && this.customFilter.queryFieldName == "communityId") || this.properties.adminToolsCommunity) {
|
||||||
//this.config.getCommunityInformation(this.properties, (this.customFilter && this.customFilter.queryFieldName == "communityId") ? this.customFilter.valueId : this.properties.adminToolsCommunity).subscribe(data => {
|
//this.config.getCommunityInformation(this.properties, (this.customFilter && this.customFilter.queryFieldName == "communityId") ? this.customFilter.valueId : this.properties.adminToolsCommunity).subscribe(data => {
|
||||||
this.subs.push(this.config.communityInformationState.subscribe(data => {
|
this.subs.push(this.config.portalAsObservable.subscribe(data => {
|
||||||
if(data && data['entities']) {
|
if(data && data['entities']) {
|
||||||
var showEntity = {};
|
var showEntity = {};
|
||||||
for (var i = 0; i < data['entities'].length; i++) {
|
for (var i = 0; i < data['entities'].length; i++) {
|
||||||
|
|
|
@ -22,13 +22,14 @@ import {SearchOrganizationsModule} from "../searchOrganizations.module";
|
||||||
import {SearchDataProvidersModule} from "../searchDataProviders.module";
|
import {SearchDataProvidersModule} from "../searchDataProviders.module";
|
||||||
import {PreviousRouteRecorder} from "../../utils/piwik/previousRouteRecorder.guard";
|
import {PreviousRouteRecorder} from "../../utils/piwik/previousRouteRecorder.guard";
|
||||||
import {BreadcrumbsModule} from "../../utils/breadcrumbs/breadcrumbs.module";
|
import {BreadcrumbsModule} from "../../utils/breadcrumbs/breadcrumbs.module";
|
||||||
|
import {SliderTabsModule} from "../../sharedComponents/tabs/slider-tabs.module";
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule, FormsModule, RouterModule,
|
CommonModule, FormsModule, RouterModule,
|
||||||
DataProvidersServiceModule, ProjectsServiceModule,
|
DataProvidersServiceModule, ProjectsServiceModule,
|
||||||
SearchResearchResultsServiceModule, OrganizationsServiceModule,
|
SearchResearchResultsServiceModule, OrganizationsServiceModule,
|
||||||
SearchResultsModule, PiwikServiceModule, Schema2jsonldModule, SEOServiceModule, AdvancedSearchFormModule, SearchResearchResultsModule, SearchProjectsModule, SearchOrganizationsModule, SearchDataProvidersModule, BreadcrumbsModule
|
SearchResultsModule, PiwikServiceModule, Schema2jsonldModule, SEOServiceModule, AdvancedSearchFormModule, SearchResearchResultsModule, SearchProjectsModule, SearchOrganizationsModule, SearchDataProvidersModule, BreadcrumbsModule, SliderTabsModule
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
SearchAllComponent
|
SearchAllComponent
|
||||||
|
|
|
@ -32,8 +32,7 @@ import {properties} from "../../../environments/environment";
|
||||||
[loadPaging]="loadPaging"
|
[loadPaging]="loadPaging"
|
||||||
[oldTotalResults]="oldTotalResults"
|
[oldTotalResults]="oldTotalResults"
|
||||||
[openaireLink]=openaireLink
|
[openaireLink]=openaireLink
|
||||||
[includeOnlyResultsAndFilter]="includeOnlyResultsAndFilter"
|
[includeOnlyResultsAndFilter]="includeOnlyResultsAndFilter" [hasPrefix]="hasPrefix"
|
||||||
[piwikSiteId]=piwikSiteId [hasPrefix]="hasPrefix"
|
|
||||||
[searchForm]="searchForm"
|
[searchForm]="searchForm"
|
||||||
[entitiesSelection]="false" [showSwitchSearchLink]="showSwitchSearchLink"
|
[entitiesSelection]="false" [showSwitchSearchLink]="showSwitchSearchLink"
|
||||||
[filters]="filters"
|
[filters]="filters"
|
||||||
|
@ -50,7 +49,6 @@ import {properties} from "../../../environments/environment";
|
||||||
export class SearchDataProvidersComponent {
|
export class SearchDataProvidersComponent {
|
||||||
private errorCodes: ErrorCodes;
|
private errorCodes: ErrorCodes;
|
||||||
private errorMessages: ErrorMessagesComponent;
|
private errorMessages: ErrorMessagesComponent;
|
||||||
@Input() piwikSiteId = null;
|
|
||||||
@Input() customFilter:SearchCustomFilter= null;
|
@Input() customFilter:SearchCustomFilter= null;
|
||||||
@Input() tableViewLink;
|
@Input() tableViewLink;
|
||||||
@Input() searchForm: SearchForm = {class: 'search-form', dark: true};
|
@Input() searchForm: SearchForm = {class: 'search-form', dark: true};
|
||||||
|
@ -70,7 +68,6 @@ export class SearchDataProvidersComponent {
|
||||||
public loadPaging: boolean = true;
|
public loadPaging: boolean = true;
|
||||||
public oldTotalResults: number = 0;
|
public oldTotalResults: number = 0;
|
||||||
public pagingLimit: number = 0;
|
public pagingLimit: number = 0;
|
||||||
public isPiwikEnabled;
|
|
||||||
properties:EnvProperties;
|
properties:EnvProperties;
|
||||||
public openaireEntities = OpenaireEntities;
|
public openaireEntities = OpenaireEntities;
|
||||||
@Input() type: "all" | "registries" | "journals" | "compatible" | "deposit" | "services" = "all";
|
@Input() type: "all" | "registries" | "journals" | "compatible" | "deposit" | "services" = "all";
|
||||||
|
@ -117,8 +114,6 @@ export class SearchDataProvidersComponent {
|
||||||
this.advancedSearchLink = this.entityType == "service" ? this.properties.searchLinkToAdvancedServices : this.properties.searchLinkToAdvancedDataProviders;
|
this.advancedSearchLink = this.entityType == "service" ? this.properties.searchLinkToAdvancedServices : this.properties.searchLinkToAdvancedDataProviders;
|
||||||
this.searchUtils.baseUrl = (this.simpleView)?this.simpleSearchLink:this.advancedSearchLink;
|
this.searchUtils.baseUrl = (this.simpleView)?this.simpleSearchLink:this.advancedSearchLink;
|
||||||
this.pagingLimit = properties.pagingLimit;
|
this.pagingLimit = properties.pagingLimit;
|
||||||
this.isPiwikEnabled = properties.enablePiwikTrack;
|
|
||||||
|
|
||||||
let firstLoad = true;
|
let firstLoad = true;
|
||||||
this.subs.push(this.route.queryParams.subscribe(params => {
|
this.subs.push(this.route.queryParams.subscribe(params => {
|
||||||
this.loadPaging = true;
|
this.loadPaging = true;
|
||||||
|
|
|
@ -28,8 +28,7 @@ import {properties} from "../../../environments/environment";
|
||||||
[disableRefineForms]="disableRefineForms"
|
[disableRefineForms]="disableRefineForms"
|
||||||
[loadPaging]="loadPaging"
|
[loadPaging]="loadPaging"
|
||||||
[oldTotalResults]="oldTotalResults"
|
[oldTotalResults]="oldTotalResults"
|
||||||
[openaireLink]=openaireLink
|
[openaireLink]=openaireLink [hasPrefix]="hasPrefix"
|
||||||
[piwikSiteId]=piwikSiteId [hasPrefix]="hasPrefix"
|
|
||||||
[includeOnlyResultsAndFilter]="includeOnlyResultsAndFilter"
|
[includeOnlyResultsAndFilter]="includeOnlyResultsAndFilter"
|
||||||
[searchForm]="searchForm"
|
[searchForm]="searchForm"
|
||||||
[sort]="false"
|
[sort]="false"
|
||||||
|
@ -47,7 +46,6 @@ export class SearchOrganizationsComponent {
|
||||||
private errorMessages: ErrorMessagesComponent;
|
private errorMessages: ErrorMessagesComponent;
|
||||||
properties:EnvProperties;
|
properties:EnvProperties;
|
||||||
public openaireEntities = OpenaireEntities;
|
public openaireEntities = OpenaireEntities;
|
||||||
@Input() piwikSiteId = null;
|
|
||||||
@Input() searchForm: SearchForm = {class: 'search-form', dark: true};
|
@Input() searchForm: SearchForm = {class: 'search-form', dark: true};
|
||||||
public results =[];
|
public results =[];
|
||||||
public filters =[];
|
public filters =[];
|
||||||
|
@ -63,8 +61,6 @@ export class SearchOrganizationsComponent {
|
||||||
public loadPaging: boolean = true;
|
public loadPaging: boolean = true;
|
||||||
public oldTotalResults: number = 0;
|
public oldTotalResults: number = 0;
|
||||||
public pagingLimit: number = 0;
|
public pagingLimit: number = 0;
|
||||||
public isPiwikEnabled;
|
|
||||||
|
|
||||||
@Input() customFilter:SearchCustomFilter= null;
|
@Input() customFilter:SearchCustomFilter= null;
|
||||||
public refineFields: string[] = this.searchFields.ORGANIZATION_REFINE_FIELDS;
|
public refineFields: string[] = this.searchFields.ORGANIZATION_REFINE_FIELDS;
|
||||||
@ViewChild(NewSearchPageComponent, { static: true }) searchPage: NewSearchPageComponent;
|
@ViewChild(NewSearchPageComponent, { static: true }) searchPage: NewSearchPageComponent;
|
||||||
|
@ -100,8 +96,6 @@ export class SearchOrganizationsComponent {
|
||||||
this.advancedSearchLink = this.properties.searchLinkToAdvancedOrganizations;
|
this.advancedSearchLink = this.properties.searchLinkToAdvancedOrganizations;
|
||||||
this.searchUtils.baseUrl = (this.simpleView)?this.simpleSearchLink:this.advancedSearchLink;
|
this.searchUtils.baseUrl = (this.simpleView)?this.simpleSearchLink:this.advancedSearchLink;
|
||||||
this.pagingLimit = properties.pagingLimit;
|
this.pagingLimit = properties.pagingLimit;
|
||||||
this.isPiwikEnabled = properties.enablePiwikTrack;
|
|
||||||
|
|
||||||
this.searchUtils.status = this.errorCodes.LOADING;
|
this.searchUtils.status = this.errorCodes.LOADING;
|
||||||
var firstLoad = true;
|
var firstLoad = true;
|
||||||
|
|
||||||
|
|
|
@ -28,8 +28,7 @@ import {properties} from "../../../environments/environment";
|
||||||
[disableRefineForms]="disableRefineForms"
|
[disableRefineForms]="disableRefineForms"
|
||||||
[loadPaging]="loadPaging"
|
[loadPaging]="loadPaging"
|
||||||
[oldTotalResults]="oldTotalResults"
|
[oldTotalResults]="oldTotalResults"
|
||||||
[openaireLink]=openaireLink
|
[openaireLink]=openaireLink [hasPrefix]="hasPrefix"
|
||||||
[piwikSiteId]=piwikSiteId [hasPrefix]="hasPrefix"
|
|
||||||
[searchForm]="searchForm"
|
[searchForm]="searchForm"
|
||||||
[includeOnlyResultsAndFilter]="includeOnlyResultsAndFilter"
|
[includeOnlyResultsAndFilter]="includeOnlyResultsAndFilter"
|
||||||
[filters]="filters"
|
[filters]="filters"
|
||||||
|
@ -46,7 +45,6 @@ import {properties} from "../../../environments/environment";
|
||||||
export class SearchProjectsComponent {
|
export class SearchProjectsComponent {
|
||||||
private errorCodes: ErrorCodes;
|
private errorCodes: ErrorCodes;
|
||||||
private errorMessages: ErrorMessagesComponent;
|
private errorMessages: ErrorMessagesComponent;
|
||||||
@Input() piwikSiteId = null;
|
|
||||||
@Input() customFilter: SearchCustomFilter = null;
|
@Input() customFilter: SearchCustomFilter = null;
|
||||||
@Input() searchForm: SearchForm = {class: 'search-form', dark: true};
|
@Input() searchForm: SearchForm = {class: 'search-form', dark: true};
|
||||||
public results = [];
|
public results = [];
|
||||||
|
@ -70,7 +68,6 @@ export class SearchProjectsComponent {
|
||||||
public loadPaging: boolean = true;
|
public loadPaging: boolean = true;
|
||||||
public oldTotalResults: number = 0;
|
public oldTotalResults: number = 0;
|
||||||
public pagingLimit: number = 0;
|
public pagingLimit: number = 0;
|
||||||
public isPiwikEnabled;
|
|
||||||
public refineFields: string[] = this.searchFields.PROJECT_REFINE_FIELDS;
|
public refineFields: string[] = this.searchFields.PROJECT_REFINE_FIELDS;
|
||||||
@ViewChild(NewSearchPageComponent, {static: true}) searchPage: NewSearchPageComponent;
|
@ViewChild(NewSearchPageComponent, {static: true}) searchPage: NewSearchPageComponent;
|
||||||
@Input() simpleView: boolean = true;
|
@Input() simpleView: boolean = true;
|
||||||
|
@ -105,8 +102,6 @@ export class SearchProjectsComponent {
|
||||||
this.advancedSearchLink = this.properties.searchLinkToAdvancedProjects;
|
this.advancedSearchLink = this.properties.searchLinkToAdvancedProjects;
|
||||||
this.searchUtils.baseUrl = (this.simpleView) ? this.simpleSearchLink : this.advancedSearchLink;
|
this.searchUtils.baseUrl = (this.simpleView) ? this.simpleSearchLink : this.advancedSearchLink;
|
||||||
this.pagingLimit = properties.pagingLimit;
|
this.pagingLimit = properties.pagingLimit;
|
||||||
this.isPiwikEnabled = properties.enablePiwikTrack;
|
|
||||||
|
|
||||||
this.searchUtils.status = this.errorCodes.LOADING;
|
this.searchUtils.status = this.errorCodes.LOADING;
|
||||||
var firstLoad = true;
|
var firstLoad = true;
|
||||||
|
|
||||||
|
|
|
@ -30,8 +30,7 @@ import {StringUtils} from "../utils/string-utils.class";
|
||||||
[disableRefineForms]="disableRefineForms"
|
[disableRefineForms]="disableRefineForms"
|
||||||
[loadPaging]="loadPaging"
|
[loadPaging]="loadPaging"
|
||||||
[oldTotalResults]="oldTotalResults"
|
[oldTotalResults]="oldTotalResults"
|
||||||
[openaireLink]=openaireLink
|
[openaireLink]=openaireLink [hasPrefix]="hasPrefix"
|
||||||
[piwikSiteId]=piwikSiteId [hasPrefix]="hasPrefix"
|
|
||||||
[searchForm]="searchForm"
|
[searchForm]="searchForm"
|
||||||
[filters]="filters" [quickFilter]="quickFilter"
|
[filters]="filters" [quickFilter]="quickFilter"
|
||||||
[rangeFilters]="rangeFilters" [rangeFields]="rangeFields"
|
[rangeFilters]="rangeFilters" [rangeFields]="rangeFields"
|
||||||
|
@ -52,7 +51,6 @@ export class SearchResearchResultsComponent {
|
||||||
|
|
||||||
private errorCodes: ErrorCodes;
|
private errorCodes: ErrorCodes;
|
||||||
private errorMessages: ErrorMessagesComponent;
|
private errorMessages: ErrorMessagesComponent;
|
||||||
@Input() piwikSiteId = properties.piwikSiteId;
|
|
||||||
@Input() hasPrefix: boolean = true;
|
@Input() hasPrefix: boolean = true;
|
||||||
@Input() searchForm: SearchForm = {class: 'search-form', dark: true};
|
@Input() searchForm: SearchForm = {class: 'search-form', dark: true};
|
||||||
public results = [];
|
public results = [];
|
||||||
|
@ -75,7 +73,6 @@ export class SearchResearchResultsComponent {
|
||||||
@Input() openaireLink: string = null;
|
@Input() openaireLink: string = null;
|
||||||
@Input() customFilter: SearchCustomFilter = null;
|
@Input() customFilter: SearchCustomFilter = null;
|
||||||
public pagingLimit: number = 0;
|
public pagingLimit: number = 0;
|
||||||
public isPiwikEnabled;
|
|
||||||
properties: EnvProperties = properties;
|
properties: EnvProperties = properties;
|
||||||
public openaireEntities = OpenaireEntities;
|
public openaireEntities = OpenaireEntities;
|
||||||
public refineFields: string[] = this.searchFields.RESULT_REFINE_FIELDS;
|
public refineFields: string[] = this.searchFields.RESULT_REFINE_FIELDS;
|
||||||
|
@ -124,8 +121,6 @@ export class SearchResearchResultsComponent {
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
//TODO add checks about which result types are enabled!
|
//TODO add checks about which result types are enabled!
|
||||||
this.pagingLimit = this.properties.pagingLimit;
|
this.pagingLimit = this.properties.pagingLimit;
|
||||||
this.isPiwikEnabled = this.properties.enablePiwikTrack;
|
|
||||||
|
|
||||||
if (!this.simpleSearchLink) {
|
if (!this.simpleSearchLink) {
|
||||||
this.simpleSearchLink = this.properties.searchLinkToResults;
|
this.simpleSearchLink = this.properties.searchLinkToResults;
|
||||||
}
|
}
|
||||||
|
|
|
@ -168,8 +168,8 @@
|
||||||
<advanced-search-input [dark]="dark" [disabled]="isDisabled" (searchEmitter)="simpleKeywordChanged()">
|
<advanced-search-input [dark]="dark" [disabled]="isDisabled" (searchEmitter)="simpleKeywordChanged()">
|
||||||
<entities-selection [simpleView]="true" [currentEntity]="entityType"
|
<entities-selection [simpleView]="true" [currentEntity]="entityType"
|
||||||
(selectionChange)="simpleEntityChanged($event)" (disableSelectEmitter)="disableSelectChange($event)"
|
(selectionChange)="simpleEntityChanged($event)" (disableSelectEmitter)="disableSelectChange($event)"
|
||||||
[onChangeNavigate]="true" [customFilter]="customFilter" class="uk-width-2-5"></entities-selection> -->
|
[onChangeNavigate]="true" [customFilter]="customFilter" class="uk-width-2-5"></entities-selection>
|
||||||
<div class="uk-width-expand" input placeholder="Search in Explore" [searchable]="true" [hint]="formPlaceholderText"
|
<div class="uk-width-expand" input [placeholder]="formPlaceholderText" [searchable]="true" [hint]="formPlaceholderText"
|
||||||
[(value)]="selectedFields[0].value" tooltip="true"></div>
|
[(value)]="selectedFields[0].value" tooltip="true"></div>
|
||||||
<!-- <a *ngIf="isMobile" href="#mobile-filters" filters-toggle (click)="filtersClicked.emit(true)" uk-toggle>-->
|
<!-- <a *ngIf="isMobile" href="#mobile-filters" filters-toggle (click)="filtersClicked.emit(true)" uk-toggle>-->
|
||||||
<!-- <icon name="filters"></icon>-->
|
<!-- <icon name="filters"></icon>-->
|
||||||
|
|
|
@ -188,8 +188,10 @@ export class AdvancedSearchFormComponent implements OnInit, OnDestroy, OnChanges
|
||||||
|
|
||||||
fieldIdsChanged(index: number, fieldId: string) {
|
fieldIdsChanged(index: number, fieldId: string) {
|
||||||
this.selectedFields[index].name = this.fieldIdsMap[fieldId].name;
|
this.selectedFields[index].name = this.fieldIdsMap[fieldId].name;
|
||||||
this.selectedFields[index].type = this.fieldIdsMap[fieldId].type;
|
if(this.selectedFields[index].type !== 'keyword' || this.fieldIdsMap[fieldId].type !== 'keyword') {
|
||||||
this.selectedFields[index].value = "";
|
this.selectedFields[index].value = "";
|
||||||
|
}
|
||||||
|
this.selectedFields[index].type = this.fieldIdsMap[fieldId].type;
|
||||||
this.selectedFields[index].param = this.fieldIdsMap[fieldId].param;
|
this.selectedFields[index].param = this.fieldIdsMap[fieldId].param;
|
||||||
if (this.fieldIdsMap[fieldId].type == "boolean") {
|
if (this.fieldIdsMap[fieldId].type == "boolean") {
|
||||||
this.selectedFields[index].value = "true";
|
this.selectedFields[index].value = "true";
|
||||||
|
|
|
@ -41,7 +41,7 @@ export class EntitiesSelectionComponent {
|
||||||
/** TODO change conditions base on PortalType instead of customFilter */
|
/** TODO change conditions base on PortalType instead of customFilter */
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
if ((this.customFilter && this.customFilter.queryFieldName == "communityId") || (['explore', 'aggregator', 'eosc'].includes(this.properties.adminToolsPortalType))) {
|
if ((this.customFilter && this.customFilter.queryFieldName == "communityId") || (['explore', 'aggregator', 'eosc'].includes(this.properties.adminToolsPortalType))) {
|
||||||
this.subscriptions.push(this.config.communityInformationState.subscribe(data => {
|
this.subscriptions.push(this.config.portalAsObservable.subscribe(data => {
|
||||||
if (data) {
|
if (data) {
|
||||||
let showEntity = {};
|
let showEntity = {};
|
||||||
let showPage = {};
|
let showPage = {};
|
||||||
|
|
|
@ -318,8 +318,7 @@
|
||||||
<search-download
|
<search-download
|
||||||
*ngIf="( entityType !='community' && entityType != 'stakeholder') && usedBy == 'search'"
|
*ngIf="( entityType !='community' && entityType != 'stakeholder') && usedBy == 'search'"
|
||||||
[isDisabled]="disabled"
|
[isDisabled]="disabled"
|
||||||
[type]="csvPath" [csvParams]="csvParams" [totalResults]="searchUtils.totalResults"
|
[type]="csvPath" [csvParams]="csvParams" [totalResults]="searchUtils.totalResults">
|
||||||
[piwikSiteId]="piwikSiteId">
|
|
||||||
</search-download>
|
</search-download>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -48,7 +48,6 @@ declare var UIkit: any;
|
||||||
})
|
})
|
||||||
export class NewSearchPageComponent implements OnInit, OnDestroy, OnChanges {
|
export class NewSearchPageComponent implements OnInit, OnDestroy, OnChanges {
|
||||||
@ViewChild('mobileFilters') mobileFilters: ElementRef;
|
@ViewChild('mobileFilters') mobileFilters: ElementRef;
|
||||||
@Input() piwikSiteId = null;
|
|
||||||
@Input() hasPrefix: boolean = true;
|
@Input() hasPrefix: boolean = true;
|
||||||
@Input() prefix: string = "OpenAIRE | ";
|
@Input() prefix: string = "OpenAIRE | ";
|
||||||
@Input() pageTitle = "";
|
@Input() pageTitle = "";
|
||||||
|
@ -121,7 +120,6 @@ export class NewSearchPageComponent implements OnInit, OnDestroy, OnChanges {
|
||||||
public csvLimit: number = 0;
|
public csvLimit: number = 0;
|
||||||
public pagingLimit: number = 0;
|
public pagingLimit: number = 0;
|
||||||
public resultsPerPage: number = 0;
|
public resultsPerPage: number = 0;
|
||||||
isPiwikEnabled = false;
|
|
||||||
properties: EnvProperties = properties;
|
properties: EnvProperties = properties;
|
||||||
public pageContents = null;
|
public pageContents = null;
|
||||||
public divContents = null;
|
public divContents = null;
|
||||||
|
@ -174,11 +172,10 @@ export class NewSearchPageComponent implements OnInit, OnDestroy, OnChanges {
|
||||||
this.pagingLimit = this.properties.pagingLimit;
|
this.pagingLimit = this.properties.pagingLimit;
|
||||||
this.resultsPerPage = this.properties.resultsPerPage;
|
this.resultsPerPage = this.properties.resultsPerPage;
|
||||||
this.csvLimit = this.properties.csvLimit;
|
this.csvLimit = this.properties.csvLimit;
|
||||||
this.isPiwikEnabled = this.properties.enablePiwikTrack;
|
|
||||||
this.updateUrl(this.properties.domain + this.properties.baseLink + this.router.url);
|
this.updateUrl(this.properties.domain + this.properties.baseLink + this.router.url);
|
||||||
this.url = this.properties.domain + this.properties.baseLink + this.router.url;
|
this.url = this.properties.domain + this.properties.baseLink + this.router.url;
|
||||||
if (typeof document !== 'undefined' && this.isPiwikEnabled && !this.includeOnlyResultsAndFilter && this.piwikSiteId) {
|
if (!this.includeOnlyResultsAndFilter) {
|
||||||
this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle, this.piwikSiteId).subscribe());
|
this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle).subscribe());
|
||||||
}
|
}
|
||||||
this.layoutService.isMobile.subscribe(isMobile => {
|
this.layoutService.isMobile.subscribe(isMobile => {
|
||||||
this.isMobile = isMobile;
|
this.isMobile = isMobile;
|
||||||
|
@ -354,9 +351,7 @@ export class NewSearchPageComponent implements OnInit, OnDestroy, OnChanges {
|
||||||
//console.log("In PreviousRouteRecorder : "+this.router.url );
|
//console.log("In PreviousRouteRecorder : "+this.router.url );
|
||||||
localStorage.setItem('previousRoute', this.router.url);
|
localStorage.setItem('previousRoute', this.router.url);
|
||||||
}
|
}
|
||||||
if (this.isPiwikEnabled && (typeof document !== 'undefined') && this.piwikSiteId) {
|
this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle).subscribe());
|
||||||
this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle, this.piwikSiteId).subscribe());
|
|
||||||
}
|
|
||||||
/* End Piwik Code */
|
/* End Piwik Code */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -93,7 +93,7 @@ export class QuickSelectionsComponent {
|
||||||
//Allow all types
|
//Allow all types
|
||||||
/* if(this.properties && !this.initialized) {
|
/* if(this.properties && !this.initialized) {
|
||||||
if(this.properties.adminToolsCommunity !== "monitor") {
|
if(this.properties.adminToolsCommunity !== "monitor") {
|
||||||
this.subs.push(this.config.communityInformationState.subscribe(data => {
|
this.subs.push(this.config.portalAsObservable.subscribe(data => {
|
||||||
if(data) {
|
if(data) {
|
||||||
var showEntity = {};
|
var showEntity = {};
|
||||||
for (var i = 0; i < data['entities'].length; i++) {
|
for (var i = 0; i < data['entities'].length; i++) {
|
||||||
|
|
|
@ -15,7 +15,8 @@ import {properties} from "../../../../environments/environment";
|
||||||
selector: 'search-download',
|
selector: 'search-download',
|
||||||
template: `
|
template: `
|
||||||
<button [attr.uk-tooltip]="'title: Download' + ((totalResults > csvLimit)?' the first 2000 ':' ') + 'results;'"
|
<button [attr.uk-tooltip]="'title: Download' + ((totalResults > csvLimit)?' the first 2000 ':' ') + 'results;'"
|
||||||
class="uk-button uk-button-link uk-flex uk-flex-middle" [class.uk-disabled]="isDisabled" [disabled]="isDisabled"
|
class="uk-button uk-button-link uk-flex uk-flex-middle" [class.uk-disabled]="isDisabled"
|
||||||
|
[disabled]="isDisabled"
|
||||||
(click)="downloadfile(downloadURLAPI+'?format=csv'+csvParams,type+'-report-'+((totalResults > csvLimit)?'2000 ':totalResults))">
|
(click)="downloadfile(downloadURLAPI+'?format=csv'+csvParams,type+'-report-'+((totalResults > csvLimit)?'2000 ':totalResults))">
|
||||||
<icon name="download" [flex]="true"></icon>
|
<icon name="download" [flex]="true"></icon>
|
||||||
<span class="uk-margin-small-left">Download Results</span>
|
<span class="uk-margin-small-left">Download Results</span>
|
||||||
|
@ -30,7 +31,6 @@ export class SearchDownloadComponent {
|
||||||
@Input() totalResults: number = 0;
|
@Input() totalResults: number = 0;
|
||||||
@Input() csvParams: string;
|
@Input() csvParams: string;
|
||||||
@Input() type: string;
|
@Input() type: string;
|
||||||
@Input() piwikSiteId = null;
|
|
||||||
@ViewChild(AlertModal) alertApplyAll: AlertModal;
|
@ViewChild(AlertModal) alertApplyAll: AlertModal;
|
||||||
downloadURLAPI: string;
|
downloadURLAPI: string;
|
||||||
|
|
||||||
|
@ -39,20 +39,17 @@ export class SearchDownloadComponent {
|
||||||
@ViewChild(ModalLoading) loading: ModalLoading;
|
@ViewChild(ModalLoading) loading: ModalLoading;
|
||||||
// Alert box when something is wrong with CSV requests
|
// Alert box when something is wrong with CSV requests
|
||||||
@ViewChild('AlertModalCsvError') alertCsvError;
|
@ViewChild('AlertModalCsvError') alertCsvError;
|
||||||
public isPiwikEnabled;
|
|
||||||
public properties: EnvProperties;
|
public properties: EnvProperties;
|
||||||
public errorCodes: ErrorCodes = new ErrorCodes();
|
public errorCodes: ErrorCodes = new ErrorCodes();
|
||||||
subscriptions = [];
|
subscriptions = [];
|
||||||
|
|
||||||
constructor(private route: ActivatedRoute, private _reportsService: ReportsService, private _piwikService: PiwikService) {
|
constructor(private route: ActivatedRoute, private _reportsService: ReportsService, private _piwikService: PiwikService) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
this.properties = properties;
|
this.properties = properties;
|
||||||
this.csvLimit = this.properties.csvLimit;
|
this.csvLimit = this.properties.csvLimit;
|
||||||
this.downloadURLAPI = this.properties.csvAPIURL;
|
this.downloadURLAPI = this.properties.csvAPIURL;
|
||||||
this.isPiwikEnabled = this.properties.enablePiwikTrack;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnDestroy() {
|
ngOnDestroy() {
|
||||||
|
@ -102,9 +99,7 @@ export class SearchDownloadComponent {
|
||||||
|
|
||||||
//window.location.href = window.URL.createObjectURL(data);
|
//window.location.href = window.URL.createObjectURL(data);
|
||||||
|
|
||||||
if (this.isPiwikEnabled && (typeof document !== 'undefined')) {
|
this.subscriptions.push(this._piwikService.trackDownload(this.properties, "searchDownload").subscribe());
|
||||||
this.subscriptions.push(this._piwikService.trackDownload(this.properties, "searchDownload", this.piwikSiteId).subscribe());
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
//console.error("Error downloading the file.");
|
//console.error("Error downloading the file.");
|
||||||
|
|
|
@ -6,7 +6,9 @@ import {Metrics} from '../utils/entities/metrics';
|
||||||
import{EnvProperties} from '../utils/properties/env-properties';
|
import{EnvProperties} from '../utils/properties/env-properties';
|
||||||
import {map} from "rxjs/operators";
|
import {map} from "rxjs/operators";
|
||||||
|
|
||||||
@Injectable()
|
@Injectable({
|
||||||
|
providedIn: 'root'
|
||||||
|
})
|
||||||
export class MetricsService {
|
export class MetricsService {
|
||||||
metrics: Metrics;
|
metrics: Metrics;
|
||||||
|
|
||||||
|
|
|
@ -190,7 +190,7 @@ export class SearchDataprovidersService {
|
||||||
return subjects;
|
return subjects;
|
||||||
}
|
}
|
||||||
getDataproviderType(resData: any): string {
|
getDataproviderType(resData: any): string {
|
||||||
if(resData['datasourcetype'].hasOwnProperty("classname")) {
|
if(resData.hasOwnProperty('datasourcetype') && resData['datasourcetype'].hasOwnProperty("classname")) {
|
||||||
return resData['datasourcetype'].classname;
|
return resData['datasourcetype'].classname;
|
||||||
} else {
|
} else {
|
||||||
return '';
|
return '';
|
||||||
|
|
|
@ -41,7 +41,7 @@ export class BottomComponent {
|
||||||
if (this.showMenuItems) {
|
if (this.showMenuItems) {
|
||||||
if (this.properties.adminToolsAPIURL && this.communityId) {
|
if (this.properties.adminToolsAPIURL && this.communityId) {
|
||||||
//this.subs.push(this.config.getCommunityInformation(this.properties, this.communityId ).subscribe(data => {
|
//this.subs.push(this.config.getCommunityInformation(this.properties, this.communityId ).subscribe(data => {
|
||||||
this.subs.push(this.config.communityInformationState.subscribe(data => {
|
this.subs.push(this.config.portalAsObservable.subscribe(data => {
|
||||||
if (data) {
|
if (data) {
|
||||||
for (var i = 0; i < data['pages'].length; i++) {
|
for (var i = 0; i < data['pages'].length; i++) {
|
||||||
this.showPage[data['pages'][i]["route"]] = data['pages'][i]["isEnabled"];
|
this.showPage[data['pages'][i]["route"]] = data['pages'][i]["isEnabled"];
|
||||||
|
|
|
@ -23,6 +23,7 @@ import {properties} from "../../../../environments/environment";
|
||||||
import {ClickEvent} from "../../utils/click/click-outside-or-esc.directive";
|
import {ClickEvent} from "../../utils/click/click-outside-or-esc.directive";
|
||||||
import {LayoutService} from "../../dashboard/sharedComponents/sidebar/layout.service";
|
import {LayoutService} from "../../dashboard/sharedComponents/sidebar/layout.service";
|
||||||
import {MobileDropdownComponent} from "../../utils/mobile-dropdown/mobile-dropdown.component";
|
import {MobileDropdownComponent} from "../../utils/mobile-dropdown/mobile-dropdown.component";
|
||||||
|
import {MatDatepicker} from "@angular/material/datepicker";
|
||||||
|
|
||||||
export type InputType =
|
export type InputType =
|
||||||
'text'
|
'text'
|
||||||
|
@ -33,7 +34,8 @@ export type InputType =
|
||||||
| 'textarea'
|
| 'textarea'
|
||||||
| 'select'
|
| 'select'
|
||||||
| 'chips'
|
| 'chips'
|
||||||
| 'year-range';
|
| 'year-range'
|
||||||
|
| 'date';
|
||||||
|
|
||||||
export interface Option {
|
export interface Option {
|
||||||
icon?: string,
|
icon?: string,
|
||||||
|
@ -75,9 +77,9 @@ declare var UIkit;
|
||||||
<div *ngIf="formControl" [id]="id">
|
<div *ngIf="formControl" [id]="id">
|
||||||
<div class="input-wrapper" [class.disabled]="formControl.disabled" [class.opened]="opened"
|
<div class="input-wrapper" [class.disabled]="formControl.disabled" [class.opened]="opened"
|
||||||
[class.focused]="focused" [ngClass]="inputClass" [class.hint]="hint"
|
[class.focused]="focused" [ngClass]="inputClass" [class.hint]="hint"
|
||||||
[class.active]="!focused && (formAsControl?.value || selectable || formAsArray?.length > 0 || getLabel(formAsControl?.value) || yearRangeActive)"
|
[class.active]="!focused && (formAsControl?.value || selectable || type === 'date' || formAsArray?.length > 0 || getLabel(formAsControl?.value) || yearRangeActive)"
|
||||||
[class.danger]="(formControl.invalid && (formControl.touched || !!searchControl?.touched)) || (!!searchControl?.invalid && !!searchControl?.touched)">
|
[class.danger]="(formControl.invalid && (formControl.touched || !!searchControl?.touched)) || (!!searchControl?.invalid && !!searchControl?.touched)">
|
||||||
<div #inputBox class="input-box" [class.select]="selectable" click-outside-or-esc
|
<div #inputBox class="input-box" [class.select]="selectable || type ==='date'" click-outside-or-esc
|
||||||
[class.static]="placeholderInfo?.static" (clickOutside)="click($event)">
|
[class.static]="placeholderInfo?.static" (clickOutside)="click($event)">
|
||||||
<div *ngIf="!placeholderInfo?.static && placeholderInfo?.label" class="placeholder">
|
<div *ngIf="!placeholderInfo?.static && placeholderInfo?.label" class="placeholder">
|
||||||
<label>{{placeholderInfo.label}} <sup *ngIf="required">*</sup></label>
|
<label>{{placeholderInfo.label}} <sup *ngIf="required">*</sup></label>
|
||||||
|
@ -163,8 +165,11 @@ declare var UIkit;
|
||||||
maxlength="4" (click)="activeIndex = 1;$event.preventDefault()" [formControl]="getFormByName(yearRange.to.control)">
|
maxlength="4" (click)="activeIndex = 1;$event.preventDefault()" [formControl]="getFormByName(yearRange.to.control)">
|
||||||
</div>
|
</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<div
|
<ng-template [ngIf]="type === 'date'">
|
||||||
*ngIf="(formControl.disabled && disabledIcon) || icon || (selectable && selectArrow) || type === 'autocomplete' || searchable"
|
<div *ngIf="!formAsControl.getRawValue()" class="input uk-text-truncate" [class.uk-disabled]="formControl.disabled">{{selectADate}}</div>
|
||||||
|
<div *ngIf="formAsControl.getRawValue()" class="input uk-text-truncate" [class.uk-disabled]="formControl.disabled">{{formAsControl.getRawValue() | date: 'dd-MM-yyyy'}}</div>
|
||||||
|
</ng-template>
|
||||||
|
<div *ngIf="(formControl.disabled && disabledIcon) || icon || (selectable && selectArrow) || type === 'autocomplete' || searchable || type === 'date'"
|
||||||
class="uk-margin-small-left icon">
|
class="uk-margin-small-left icon">
|
||||||
<icon *ngIf="formControl.disabled && disabledIcon" [name]="disabledIcon" [flex]="true"></icon>
|
<icon *ngIf="formControl.disabled && disabledIcon" [name]="disabledIcon" [flex]="true"></icon>
|
||||||
<ng-template [ngIf]="formControl.enabled">
|
<ng-template [ngIf]="formControl.enabled">
|
||||||
|
@ -174,8 +179,10 @@ declare var UIkit;
|
||||||
(click)="resetSearch($event)">
|
(click)="resetSearch($event)">
|
||||||
<icon [flex]="true" name="close"></icon>
|
<icon [flex]="true" name="close"></icon>
|
||||||
</button>
|
</button>
|
||||||
<button *ngIf="(!focused && type === 'autocomplete' && !selectable) || (type !== 'autocomplete' && !searchControl?.value && !!formControl?.value && (searchable || !selectable))"
|
<button *ngIf="(!focused && type === 'autocomplete' && !selectable) ||
|
||||||
class="uk-close uk-icon" (click)="resetValue($event)">
|
(type !== 'autocomplete' && !searchControl?.value && !!formControl?.value && (searchable || !selectable)) ||
|
||||||
|
(type === 'date' && formAsControl?.value)"
|
||||||
|
class="uk-close uk-icon" (click)="resetValue($event);">
|
||||||
<icon [flex]="true" name="close"></icon>
|
<icon [flex]="true" name="close"></icon>
|
||||||
</button>
|
</button>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
@ -188,20 +195,23 @@ declare var UIkit;
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div *ngIf="!mobile && type === 'date' && opened" class="uk-dropdown" #calendarBox
|
||||||
|
uk-dropdown="pos: bottom-left; mode: none; boundary-align: true;" [attr.boundary]="'#' + id" (click)="$event.stopPropagation()">
|
||||||
|
<mat-calendar [selected]="selectedDate" [startAt]="selectedDate" (selectedChange)="dateChanged($event)"></mat-calendar>
|
||||||
|
</div>
|
||||||
<div *ngIf="!mobile && filteredOptions && filteredOptions.length > 0 && opened" class="options uk-dropdown" #optionBox
|
<div *ngIf="!mobile && filteredOptions && filteredOptions.length > 0 && opened" class="options uk-dropdown" #optionBox
|
||||||
uk-dropdown="pos: bottom-justify; mode: none; offset: 15; boundary-align: true;" [attr.boundary]="'#' + id">
|
uk-dropdown="pos: bottom-justify; mode: none; boundary-align: true;" [attr.boundary]="'#' + id">
|
||||||
<ul class="uk-nav uk-dropdown-nav">
|
<ul class="uk-nav uk-dropdown-nav">
|
||||||
<li *ngFor="let option of filteredOptions; let i=index" [class.uk-hidden]="option.hidden"
|
<li *ngFor="let option of filteredOptions; let i=index" [class.uk-hidden]="option.hidden"
|
||||||
[class.uk-active]="(formControl.value === option.value) || selectedIndex === i">
|
[class.uk-active]="(formControl.value === option.value) || selectedIndex === i">
|
||||||
<a (click)="selectOption(option, $event)"
|
<a (click)="selectOption(option, $event)"
|
||||||
[class]="option.disabled ? 'uk-disabled uk-text-muted' : ''">
|
[class]="option.disabled ? 'uk-disabled uk-text-muted' : ''">
|
||||||
<span
|
<span [attr.uk-tooltip]="(tooltip)?('title: ' + (option.tooltip ? option.tooltip : option.label) + '; delay: 500; pos:bottom-left'):null">{{option.label}}</span>
|
||||||
[attr.uk-tooltip]="(tooltip)?('title: ' + (option.tooltip ? option.tooltip : option.label) + '; delay: 500; pos:bottom-left'):null">{{option.label}}</span>
|
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<mobile-dropdown *ngIf="mobile" #mobileDropdown>
|
<mobile-dropdown *ngIf="mobile && filteredOptions && filteredOptions.length > 0 && opened" (onClose)="focus(false)" #mobileDropdown>
|
||||||
<div *ngIf="placeholderInfo" class="uk-text-emphasis uk-text-bolder uk-text-center uk-padding-small uk-padding-remove-vertical uk-text-uppercase">
|
<div *ngIf="placeholderInfo" class="uk-text-emphasis uk-text-bolder uk-text-center uk-padding-small uk-padding-remove-vertical uk-text-uppercase">
|
||||||
{{placeholderInfo.label}}
|
{{placeholderInfo.label}}
|
||||||
</div>
|
</div>
|
||||||
|
@ -279,7 +289,9 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
|
||||||
/** Year Range Configuration */
|
/** Year Range Configuration */
|
||||||
@Input() yearRange: YearRange;
|
@Input() yearRange: YearRange;
|
||||||
public activeIndex: 0 | 1 | null = null;
|
public activeIndex: 0 | 1 | null = null;
|
||||||
|
/** Date Configuration*/
|
||||||
|
@Input() selectADate: string = 'Select a date';
|
||||||
|
public selectedDate: Date;
|
||||||
@Input() visibleRows: number = -1;
|
@Input() visibleRows: number = -1;
|
||||||
@Input() extendEnter: () => void = null;
|
@Input() extendEnter: () => void = null;
|
||||||
@Output() focusEmitter: EventEmitter<boolean> = new EventEmitter<boolean>();
|
@Output() focusEmitter: EventEmitter<boolean> = new EventEmitter<boolean>();
|
||||||
|
@ -299,9 +311,11 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
|
||||||
private subscriptions: any[] = [];
|
private subscriptions: any[] = [];
|
||||||
@ViewChild('inputBox') inputBox: ElementRef;
|
@ViewChild('inputBox') inputBox: ElementRef;
|
||||||
@ViewChild('optionBox') optionBox: ElementRef;
|
@ViewChild('optionBox') optionBox: ElementRef;
|
||||||
|
@ViewChild('calendarBox') calendarBox: ElementRef;
|
||||||
@ViewChild('mobileDropdown') mobileDropdown: MobileDropdownComponent;
|
@ViewChild('mobileDropdown') mobileDropdown: MobileDropdownComponent;
|
||||||
@ViewChild('searchInput') searchInput: ElementRef;
|
@ViewChild('searchInput') searchInput: ElementRef;
|
||||||
@ViewChildren('chip') chips: QueryList<ElementRef>;
|
@ViewChildren('chip') chips: QueryList<ElementRef>;
|
||||||
|
@ViewChild('datepicker') datepicker: MatDatepicker<any>;
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
set placeholder(placeholder: string | Placeholder) {
|
set placeholder(placeholder: string | Placeholder) {
|
||||||
|
@ -530,8 +544,10 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
|
||||||
?this.getFormByName(this.yearRange.from.control).errors:this.getFormByName(this.yearRange.to.control).errors));
|
?this.getFormByName(this.yearRange.from.control).errors:this.getFormByName(this.yearRange.to.control).errors));
|
||||||
} else if(this.formAsControl) {
|
} else if(this.formAsControl) {
|
||||||
return this.formAsControl.errors;
|
return this.formAsControl.errors;
|
||||||
} else {
|
} else if(this.searchControl) {
|
||||||
return this.searchControl.errors;
|
return this.searchControl.errors;
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -564,10 +580,13 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
if (this.formAsControl?.validator) {
|
if (this.formAsControl?.validator || this.formAsArray?.validator) {
|
||||||
let validator = this.formControl.validator({} as AbstractControl);
|
let validator = this.formControl.validator({} as AbstractControl);
|
||||||
this.required = (validator && validator.required);
|
this.required = (validator && validator.required);
|
||||||
}
|
}
|
||||||
|
if(this.type === 'date') {
|
||||||
|
this.selectedDate = this.formAsControl.getRawValue()?new Date(this.formAsControl.getRawValue()):null;
|
||||||
|
}
|
||||||
this.subscriptions.push(this.formControl.valueChanges.subscribe(value => {
|
this.subscriptions.push(this.formControl.valueChanges.subscribe(value => {
|
||||||
if (this.formControl.enabled) {
|
if (this.formControl.enabled) {
|
||||||
if(this.type !== 'year-range') {
|
if(this.type !== 'year-range') {
|
||||||
|
@ -587,6 +606,9 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
|
||||||
this.open(true);
|
this.open(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (this.type === 'date') {
|
||||||
|
this.selectedDate = value?new Date(value):null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ((this.value && value && this.value !== value) || (!this.value && value) || this.value && !value) {
|
if ((this.value && value && this.value !== value) || (!this.value && value) || this.value && !value) {
|
||||||
this.valueChange.emit(this.formControl.value);
|
this.valueChange.emit(this.formControl.value);
|
||||||
|
@ -735,7 +757,7 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
|
||||||
this.searchInput.nativeElement.focus();
|
this.searchInput.nativeElement.focus();
|
||||||
this.activeElement.next(this.chips.last);
|
this.activeElement.next(this.chips.last);
|
||||||
}
|
}
|
||||||
if (this.selectArrow) {
|
if (this.selectArrow || this.datepicker) {
|
||||||
this.open(!this.opened);
|
this.open(!this.opened);
|
||||||
} else if (this.type !== 'autocomplete' || this.showOptionsOnEmpty || !this.formControl.value) {
|
} else if (this.type !== 'autocomplete' || this.showOptionsOnEmpty || !this.formControl.value) {
|
||||||
this.open(true);
|
this.open(true);
|
||||||
|
@ -774,6 +796,13 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
|
||||||
UIkit.dropdown(this.optionBox.nativeElement).hide();
|
UIkit.dropdown(this.optionBox.nativeElement).hide();
|
||||||
this.focused = false;
|
this.focused = false;
|
||||||
}
|
}
|
||||||
|
} else if(this.calendarBox) {
|
||||||
|
if (this.opened) {
|
||||||
|
UIkit.dropdown(this.calendarBox.nativeElement).show();
|
||||||
|
} else {
|
||||||
|
UIkit.dropdown(this.calendarBox.nativeElement).hide();
|
||||||
|
this.focused = false;
|
||||||
|
}
|
||||||
} else if(this.mobileDropdown) {
|
} else if(this.mobileDropdown) {
|
||||||
if(this.opened) {
|
if(this.opened) {
|
||||||
this.mobileDropdown.open();
|
this.mobileDropdown.open();
|
||||||
|
@ -810,5 +839,13 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
|
||||||
this.searchControl.setValue('');
|
this.searchControl.setValue('');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(this.mobileDropdown) {
|
||||||
|
this.mobileDropdown.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dateChanged(event: Date) {
|
||||||
|
this.focus(false);
|
||||||
|
this.formAsControl.setValue(event.getTime());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,13 @@
|
||||||
import {NgModule} from '@angular/core';
|
import {NgModule} from '@angular/core';
|
||||||
import {InputComponent} from "./input.component";
|
import {InputComponent} from "./input.component";
|
||||||
import {SharedModule} from "../../../openaireLibrary/shared/shared.module";
|
import {SharedModule} from "../../shared/shared.module";
|
||||||
import {IconsModule} from "../../utils/icons/icons.module";
|
import {IconsModule} from "../../utils/icons/icons.module";
|
||||||
import {SafeHtmlPipeModule} from "../../utils/pipes/safeHTMLPipe.module";
|
import {SafeHtmlPipeModule} from "../../utils/pipes/safeHTMLPipe.module";
|
||||||
import {ClickModule} from "../../utils/click/click.module";
|
import {ClickModule} from "../../utils/click/click.module";
|
||||||
import {MobileDropdownModule} from "../../utils/mobile-dropdown/mobile-dropdown.module";
|
import {MobileDropdownModule} from "../../utils/mobile-dropdown/mobile-dropdown.module";
|
||||||
|
import {MatDatepickerModule} from "@angular/material/datepicker";
|
||||||
|
import {MatNativeDateModule} from "@angular/material/core";
|
||||||
|
import {MatInputModule} from "@angular/material/input";
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
|
@ -12,7 +15,10 @@ import {MobileDropdownModule} from "../../utils/mobile-dropdown/mobile-dropdown.
|
||||||
IconsModule,
|
IconsModule,
|
||||||
SafeHtmlPipeModule,
|
SafeHtmlPipeModule,
|
||||||
ClickModule,
|
ClickModule,
|
||||||
MobileDropdownModule
|
MobileDropdownModule,
|
||||||
|
MatDatepickerModule,
|
||||||
|
MatNativeDateModule,
|
||||||
|
MatInputModule
|
||||||
],
|
],
|
||||||
exports: [
|
exports: [
|
||||||
InputComponent
|
InputComponent
|
||||||
|
|
|
@ -144,7 +144,7 @@
|
||||||
<ng-content select="[extra-s]"></ng-content>
|
<ng-content select="[extra-s]"></ng-content>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</ul>
|
</ul>
|
||||||
<div *ngIf="hasSearchBar" search-input [(value)]="keyword" placeholder="Search"
|
<div *ngIf="hasSearchBar" search-input [(value)]="keyword" [placeholder]="'Search'+(portalName ? (' in '+portalName) : '')"
|
||||||
[searchInputClass]="'flat background small-vertical'" (searchEmitter)="goTo(canvas)"
|
[searchInputClass]="'flat background small-vertical'" (searchEmitter)="goTo(canvas)"
|
||||||
class="uk-width-1-1 uk-padding-small uk-margin-medium-top"></div>
|
class="uk-width-1-1 uk-padding-small uk-margin-medium-top"></div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -173,7 +173,7 @@
|
||||||
<ng-container *ngIf="!activeHeader.menuPosition || activeHeader.menuPosition === 'center'">
|
<ng-container *ngIf="!activeHeader.menuPosition || activeHeader.menuPosition === 'center'">
|
||||||
<ng-container *ngTemplateOutlet="mainMenu"></ng-container>
|
<ng-container *ngTemplateOutlet="mainMenu"></ng-container>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<div *ngIf="searchMode" #search_input search-input [(value)]="keyword" placeholder="Search"
|
<div *ngIf="searchMode" #search_input search-input [(value)]="keyword" [placeholder]="'Search'+(portalName ? (' in '+portalName) : '')"
|
||||||
[searchInputClass]="'flat background small-vertical'" (searchEmitter)="goTo()"
|
[searchInputClass]="'flat background small-vertical'" (searchEmitter)="goTo()"
|
||||||
class="uk-width-large@l uk-width-medium uk-width-xlarge@xl"></div>
|
class="uk-width-large@l uk-width-medium uk-width-xlarge@xl"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -70,6 +70,7 @@ export class NavigationBarComponent implements OnInit, OnDestroy, OnChanges {
|
||||||
showEntity = {};
|
showEntity = {};
|
||||||
showPage = {};
|
showPage = {};
|
||||||
public searchMode: boolean = false;
|
public searchMode: boolean = false;
|
||||||
|
public portalName: string = "";
|
||||||
|
|
||||||
public additionalMenuItems: MenuItem[] = [];
|
public additionalMenuItems: MenuItem[] = [];
|
||||||
public featuredMenuItems: MenuItem[] = [];
|
public featuredMenuItems: MenuItem[] = [];
|
||||||
|
@ -134,8 +135,11 @@ export class NavigationBarComponent implements OnInit, OnDestroy, OnChanges {
|
||||||
this.isAuthorized = Session.isClaimsCurator(this.user) || Session.isPortalAdministrator(this.user);
|
this.isAuthorized = Session.isClaimsCurator(this.user) || Session.isPortalAdministrator(this.user);
|
||||||
if ((this.properties.adminToolsAPIURL && this.communityId) || properties.adminToolsPortalType == "community") {
|
if ((this.properties.adminToolsAPIURL && this.communityId) || properties.adminToolsPortalType == "community") {
|
||||||
//this.config.getCommunityInformation(this.properties, this.communityId).subscribe(data => {
|
//this.config.getCommunityInformation(this.properties, this.communityId).subscribe(data => {
|
||||||
this.subs.push(this.config.communityInformationState.subscribe(data => {
|
this.subs.push(this.config.portalAsObservable.subscribe(data => {
|
||||||
if (data) {
|
if (data) {
|
||||||
|
if(data.name) {
|
||||||
|
this.portalName = data.name;
|
||||||
|
}
|
||||||
this.showEntity = {};
|
this.showEntity = {};
|
||||||
this.showPage = {};
|
this.showPage = {};
|
||||||
if (data['entities']) {
|
if (data['entities']) {
|
||||||
|
|
|
@ -21,4 +21,5 @@ export class SliderTabComponent {
|
||||||
public queryParams: any = null;
|
public queryParams: any = null;
|
||||||
@Input()
|
@Input()
|
||||||
public customClass: string = '';
|
public customClass: string = '';
|
||||||
|
@Input() tabTemplate: any;
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,34 +28,52 @@ declare var UIkit;
|
||||||
[ngClass]="'uk-flex-' + flexPosition + ' ' + tabsClass">
|
[ngClass]="'uk-flex-' + flexPosition + ' ' + tabsClass">
|
||||||
<ng-container *ngIf="type === 'static'">
|
<ng-container *ngIf="type === 'static'">
|
||||||
<li *ngFor="let tab of leftTabs" [ngStyle]="" [style.max-width]="(position === 'horizontal')?'50%':null" class="uk-text-capitalize uk-text-truncate uk-display-block">
|
<li *ngFor="let tab of leftTabs" [ngStyle]="" [style.max-width]="(position === 'horizontal')?'50%':null" class="uk-text-capitalize uk-text-truncate uk-display-block">
|
||||||
<a>{{tab.title}}</a>
|
<a>
|
||||||
|
<span *ngIf="tab.title">{{tab.title}}</span>
|
||||||
|
<ng-container *ngTemplateOutlet="tab.tabTemplate"></ng-container>
|
||||||
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li *ngFor="let tab of rightTabs; let i=index;" [style.max-width]="(position === 'horizontal')?'50%':null" [ngClass]="i === 0?'uk-flex-1 uk-flex uk-flex-right':''"
|
<li *ngFor="let tab of rightTabs; let i=index;" [style.max-width]="(position === 'horizontal')?'50%':null" [ngClass]="i === 0?'uk-flex-1 uk-flex uk-flex-right':''"
|
||||||
class="uk-text-capitalize uk-text-truncate uk-display-block">
|
class="uk-text-capitalize uk-text-truncate uk-display-block">
|
||||||
<a [ngClass]="tab.customClass">{{tab.title}}</a>
|
<a [ngClass]="tab.customClass">
|
||||||
|
<span *ngIf="tab.title">{{tab.title}}</span>
|
||||||
|
<ng-container *ngTemplateOutlet="tab.tabTemplate"></ng-container>
|
||||||
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container *ngIf="type === 'dynamic'">
|
<ng-container *ngIf="type === 'dynamic'">
|
||||||
<li *ngFor="let tab of leftTabs; let i=index;" [class.uk-active]="tab.active" [style.max-width]="(position === 'horizontal')?'50%':null">
|
<li *ngFor="let tab of leftTabs; let i=index;" [class.uk-active]="tab.active" [style.max-width]="(position === 'horizontal')?'50%':null">
|
||||||
<a [routerLink]="tab.routerLink" [queryParams]="tab.queryParams" [ngClass]="tab.customClass"
|
<a [routerLink]="tab.routerLink" [queryParams]="tab.queryParams" [ngClass]="tab.customClass"
|
||||||
(click)="showActive(i)"
|
(click)="showActive(i)"
|
||||||
class="uk-text-capitalize uk-text-truncate uk-display-block">{{tab.title}}</a>
|
class="uk-text-capitalize uk-text-truncate uk-display-block">
|
||||||
|
<span *ngIf="tab.title">{{tab.title}}</span>
|
||||||
|
<ng-container *ngTemplateOutlet="tab.tabTemplate"></ng-container>
|
||||||
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li *ngFor="let tab of rightTabs; let i=index;" [style.max-width]="(position === 'horizontal')?'50%':null" [class.uk-active]="tab.active"
|
<li *ngFor="let tab of rightTabs; let i=index;" [style.max-width]="(position === 'horizontal')?'50%':null" [class.uk-active]="tab.active"
|
||||||
[ngClass]="i === 0?'uk-flex-1 uk-flex uk-flex-right':''">
|
[ngClass]="i === 0?'uk-flex-1 uk-flex uk-flex-right':''">
|
||||||
<a [routerLink]="tab.routerLink" [queryParams]="tab.queryParams" [ngClass]="tab.customClass"
|
<a [routerLink]="tab.routerLink" [queryParams]="tab.queryParams" [ngClass]="tab.customClass"
|
||||||
(click)="showActive(i)"
|
(click)="showActive(i)"
|
||||||
class="uk-text-capitalize uk-text-truncate uk-display-block">{{tab.title}}</a>
|
class="uk-text-capitalize uk-text-truncate uk-display-block">
|
||||||
|
<span *ngIf="tab.title">{{tab.title}}</span>
|
||||||
|
<ng-container *ngTemplateOutlet="tab.tabTemplate"></ng-container>
|
||||||
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container *ngIf="type === 'scrollable'">
|
<ng-container *ngIf="type === 'scrollable'">
|
||||||
<li *ngFor="let tab of leftTabs" [style.max-width]="(position === 'horizontal')?'50%':null" class="uk-text-capitalize uk-text-truncate uk-display-block" [class.uk-active]="tab.active">
|
<li *ngFor="let tab of leftTabs" [style.max-width]="(position === 'horizontal')?'50%':null" class="uk-text-capitalize uk-text-truncate uk-display-block" [class.uk-active]="tab.active">
|
||||||
<a routerLink="./" [fragment]="tab.id" queryParamsHandling="merge" [ngClass]="tab.customClass">{{tab.title}}</a>
|
<a routerLink="./" [fragment]="tab.id" queryParamsHandling="merge" [ngClass]="tab.customClass">
|
||||||
|
<span *ngIf="tab.title">{{tab.title}}</span>
|
||||||
|
<ng-container *ngTemplateOutlet="tab.tabTemplate"></ng-container>
|
||||||
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li *ngFor="let tab of rightTabs; let i=index;" [style.max-width]="(position === 'horizontal')?'50%':null" class="uk-text-capitalize uk-text-truncate uk-display-block"
|
<li *ngFor="let tab of rightTabs; let i=index;" [style.max-width]="(position === 'horizontal')?'50%':null" class="uk-text-capitalize uk-text-truncate uk-display-block"
|
||||||
[ngClass]="i === 0?'uk-flex-1 uk-flex uk-flex-right':''"
|
[ngClass]="i === 0?'uk-flex-1 uk-flex uk-flex-right':''"
|
||||||
[class.uk-active]="tab.active">
|
[class.uk-active]="tab.active">
|
||||||
<a routerLink="./" [fragment]="tab.id" queryParamsHandling="merge" [ngClass]="tab.customClass">{{tab.title}}</a>
|
<a routerLink="./" [fragment]="tab.id" queryParamsHandling="merge" [ngClass]="tab.customClass">
|
||||||
|
<span *ngIf="tab.title">{{tab.title}}</span>
|
||||||
|
<ng-container *ngTemplateOutlet="tab.tabTemplate"></ng-container>
|
||||||
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -127,6 +145,13 @@ export class SliderTabsComponent implements AfterViewInit, OnDestroy {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngAfterViewInit() {
|
ngAfterViewInit() {
|
||||||
|
this.initTabs();
|
||||||
|
this.tabs.changes.subscribe(() => {
|
||||||
|
this.initTabs();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public initTabs() {
|
||||||
if (typeof document !== 'undefined' && this.tabs.length > 0) {
|
if (typeof document !== 'undefined' && this.tabs.length > 0) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (this.position === 'horizontal') {
|
if (this.position === 'horizontal') {
|
||||||
|
|
|
@ -11,45 +11,60 @@ import {properties} from "../../../../environments/environment";
|
||||||
selector: 'showAuthors',
|
selector: 'showAuthors',
|
||||||
template: `
|
template: `
|
||||||
<ng-template #author_template let-author="author" let-i="i" let-italic="italic">
|
<ng-template #author_template let-author="author" let-i="i" let-italic="italic">
|
||||||
<span *ngIf="isSticky || (!author.orcid && !author.orcid_pending) || !testBrowser" style="margin-right: 5px;"
|
<span *ngIf="isSticky || (!author.orcid && !author.orcid_pending) || !isBrowser" style="margin-right: 5px;"
|
||||||
[class.uk-text-italic]="italic">
|
[class.uk-text-italic]="italic">
|
||||||
{{author.fullName + ";"}}
|
{{author.fullName + ";"}}
|
||||||
</span>
|
</span>
|
||||||
<a *ngIf="!isSticky && (author.orcid || author.orcid_pending) && testBrowser" class="uk-flex-inline uk-flex-middle uk-link-text">
|
<ng-container *ngIf="!isSticky && (author.orcid || author.orcid_pending) && isBrowser">
|
||||||
<img *ngIf="author.orcid" src="assets/common-assets/common/ORCIDiD_icon16x16.png" alt="orcid" loading="lazy" style="width:16px; height:16px; margin-right: 3px;">
|
<a #toggle class="uk-flex-inline uk-flex-middle uk-link-text">
|
||||||
<img *ngIf="!author.orcid && author.orcid_pending" src="assets/common-assets/common/ORCIDiD_iconbw16x16.png" alt="orcid bw" loading="lazy" style="margin-right: 3px;">
|
<img *ngIf="author.orcid" src="assets/common-assets/common/ORCIDiD_icon16x16.png" alt="orcid"
|
||||||
|
loading="lazy" style="width:16px; height:16px; margin-right: 3px;">
|
||||||
|
<img *ngIf="!author.orcid && author.orcid_pending"
|
||||||
|
src="assets/common-assets/common/ORCIDiD_iconbw16x16.png" alt="orcid bw" loading="lazy"
|
||||||
|
style="margin-right: 3px;">
|
||||||
<span style="margin-right: 5px;" [class.uk-text-italic]="italic">
|
<span style="margin-right: 5px;" [class.uk-text-italic]="italic">
|
||||||
{{author.fullName + ";"}}
|
{{author.fullName + ";"}}
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
<div *ngIf="!isSticky && (author.orcid || author.orcid_pending) && testBrowser"
|
<div *ngIf="!isMobile" class="default-dropdown uk-margin-remove-top uk-dropdown orcid-dropdown" uk-dropdown="mode:click; offset: 4" style="min-width: 465px !important;">
|
||||||
class="default-dropdown uk-margin-remove-top uk-dropdown orcid-dropdown"
|
<ng-container *ngTemplateOutlet="dropdown"></ng-container>
|
||||||
uk-dropdown="mode:click; offset: 4" style="min-width: 465px !important;">
|
</div>
|
||||||
|
<mobile-dropdown *ngIf="isMobile" [toggle]="toggle">
|
||||||
|
<div class="orcid-dropdown">
|
||||||
|
<ng-container *ngTemplateOutlet="dropdown"></ng-container>
|
||||||
|
</div>
|
||||||
|
</mobile-dropdown>
|
||||||
|
<ng-template #dropdown>
|
||||||
<div class="uk-padding-small">
|
<div class="uk-padding-small">
|
||||||
<h6 class="uk-margin-remove">{{author.fullName}}</h6>
|
<h6 class="uk-margin-remove">{{author.fullName}}</h6>
|
||||||
<div>
|
<div>
|
||||||
<div class="uk-text-meta uk-margin-bottom">ORCID</div>
|
<div class="uk-text-meta uk-margin-bottom">ORCID</div>
|
||||||
|
|
||||||
<div class="uk-text-meta uk-text-xsmall uk-margin-small-top uk-margin-small-bottom">
|
<div class="uk-text-meta uk-text-xsmall uk-margin-small-top uk-margin-small-bottom">
|
||||||
<img *ngIf="author.orcid" src="assets/common-assets/common/ORCIDiD_icon16x16.png" alt="" loading="lazy">{{" "}}
|
<img *ngIf="author.orcid" src="assets/common-assets/common/ORCIDiD_icon16x16.png" alt=""
|
||||||
<img *ngIf="!author.orcid && author.orcid_pending" src="assets/common-assets/common/ORCIDiD_iconbw16x16.png" alt="" loading="lazy">{{" "}}
|
loading="lazy">{{" "}}
|
||||||
|
<img *ngIf="!author.orcid && author.orcid_pending"
|
||||||
|
src="assets/common-assets/common/ORCIDiD_iconbw16x16.png" alt="" loading="lazy">{{" "}}
|
||||||
|
|
||||||
<i *ngIf="author.orcid">Harvested from ORCID Public Data File</i>
|
<i *ngIf="author.orcid">Harvested from ORCID Public Data File</i>
|
||||||
<i *ngIf="!author.orcid && author.orcid_pending">Derived by OpenAIRE algorithms or harvested from 3d party repositories</i>
|
<i *ngIf="!author.orcid && author.orcid_pending">Derived by OpenAIRE algorithms or harvested
|
||||||
|
from 3d party repositories</i>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div class="clipboard-wrapper uk-width-1-1 uk-flex uk-flex-middle uk-flex-center"
|
<div class="clipboard-wrapper uk-width-1-1 uk-flex uk-flex-middle uk-flex-center"
|
||||||
style="min-height: 43px; min-width: 280px;">
|
style="min-height: 43px; min-width: 280px;">
|
||||||
<input #element class="uk-padding-small uk-text-emphasis uk-width-medium uk-disabled"
|
<input #element class="uk-padding-small uk-text-emphasis uk-width-expand uk-disabled"
|
||||||
[value]="properties.orcidURL+(author.orcid ? author.orcid : author.orcid_pending)"/>
|
[value]="properties.orcidURL+(author.orcid ? author.orcid : author.orcid_pending)"/>
|
||||||
<a [class]="'uk-link copy orcid_clipboard_btn orcid_clipboard_btn_auhtor_'+i"
|
<button class="uk-button uk-button-link uk-margin-small-right copy orcid_clipboard_btn" [ngClass]="'orcid_clipboard_btn_auhtor_'+i"
|
||||||
title="Copy to clipboard" (click)="copyToClipboard(element)">
|
title="Copy to clipboard" (click)="copyToClipboard(element)">
|
||||||
COPY
|
<icon name="content_copy" visuallyHidden="Copy to clipboard" [flex]="true"></icon>
|
||||||
</a>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-text-center uk-margin-small-top">
|
<div class="uk-text-center uk-margin-small-top">
|
||||||
<a class="uk-button uk-button-text custom-external"
|
<a class="uk-button uk-button-text custom-external"
|
||||||
title="Visit author in ORCID" [href]="properties.orcidURL+(author.orcid ? author.orcid : author.orcid_pending)" target="_blank">
|
title="Visit author in ORCID"
|
||||||
|
[href]="properties.orcidURL+(author.orcid ? author.orcid : author.orcid_pending)"
|
||||||
|
target="_blank">
|
||||||
VISIT AUTHOR IN ORCID
|
VISIT AUTHOR IN ORCID
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -61,35 +76,41 @@ import {properties} from "../../../../environments/environment";
|
||||||
{{author.fullName}} in OpenAIRE
|
{{author.fullName}} in OpenAIRE
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-text-center uk-margin-top uk-margin-large-left uk-margin-large-right">
|
<div class="uk-text-center uk-margin-top uk-margin-large-left uk-margin-large-right">
|
||||||
<a *ngIf="properties.adminToolsPortalType !== 'eosc'" class="uk-button uk-button-primary uk-text-bold uk-padding-remove-top uk-padding-remove-bottom"
|
<a *ngIf="properties.adminToolsPortalType !== 'eosc'"
|
||||||
|
class="uk-button uk-button-primary uk-text-bold uk-padding-remove-top uk-padding-remove-bottom"
|
||||||
(click)="onClick()"
|
(click)="onClick()"
|
||||||
[queryParams]="routerHelper.createQueryParams(['orcid','oc'],[(author['orcid'] ? author['orcid'] : author['orcid_pending']),'and'])"
|
[queryParams]="routerHelper.createQueryParams(['orcid','oc'],[(author['orcid'] ? author['orcid'] : author['orcid_pending']),'and'])"
|
||||||
routerLinkActive="router-link-active" [routerLink]="properties.searchLinkToAdvancedResults">
|
routerLinkActive="router-link-active" [routerLink]="properties.searchLinkToAdvancedResults">
|
||||||
<span class="space">Search</span>
|
<span class="space">Search</span>
|
||||||
</a>
|
</a>
|
||||||
<a *ngIf="properties.adminToolsPortalType == 'eosc'" class="uk-button uk-button-primary uk-text-bold uk-padding-remove-top uk-padding-remove-bottom uk-light"
|
<a *ngIf="properties.adminToolsPortalType == 'eosc'"
|
||||||
|
class="uk-button uk-button-primary uk-text-bold uk-padding-remove-top uk-padding-remove-bottom uk-light"
|
||||||
[href]="'https://explore.openaire.eu'+properties.searchLinkToAdvancedResults+'?orcid='+(author['orcid'] ? author['orcid'] : author['orcid_pending'])+'&oc=and'"
|
[href]="'https://explore.openaire.eu'+properties.searchLinkToAdvancedResults+'?orcid='+(author['orcid'] ? author['orcid'] : author['orcid_pending'])+'&oc=and'"
|
||||||
target="_blank">
|
target="_blank">
|
||||||
<span class="space custom-external">Search in OpenAIRE</span>
|
<span class="space custom-external">Search in OpenAIRE</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</ng-template>
|
||||||
|
</ng-container>
|
||||||
|
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|
||||||
<div *ngIf="authors" class="uk-height-max-medium uk-overflow-auto uk-text-small uk-text-emphasis uk-flex uk-flex-wrap">
|
<div *ngIf="authors"
|
||||||
|
class="uk-height-max-medium uk-overflow-auto uk-text-small uk-text-emphasis uk-flex uk-flex-wrap">
|
||||||
<span class="uk-text-meta uk-margin-xsmall-right">
|
<span class="uk-text-meta uk-margin-xsmall-right">
|
||||||
Authors:
|
Authors:
|
||||||
</span>
|
</span>
|
||||||
<ng-container *ngFor="let author of authors.slice(0, viewAll?authors.length:authorsLimit) let i=index">
|
<ng-container *ngFor="let author of authors.slice(0, viewAll?authors.length:authorsLimit) let i=index">
|
||||||
<ng-container *ngTemplateOutlet="author_template; context: { author: author, i:i, italic: true}"></ng-container>
|
<ng-container
|
||||||
|
*ngTemplateOutlet="author_template; context: { author: author, i:i, italic: true}"></ng-container>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<span *ngIf="!showAll && authors && authors.length > authorsLimit" class="uk-text-meta">
|
<span *ngIf="!showAll && authors && authors.length > authorsLimit" class="uk-text-meta">
|
||||||
+{{authors.length-authorsLimit | number}} more
|
+{{authors.length - authorsLimit | number}} more
|
||||||
</span>
|
</span>
|
||||||
<span *ngIf="showAll && authors && authors.length > authorsLimit && !viewAll">
|
<span *ngIf="showAll && authors && authors.length > authorsLimit && !viewAll">
|
||||||
<a (click)="viewAllClick();">
|
<a (click)="viewAllClick();">
|
||||||
+{{authors.length-authorsLimit | number}} Authors
|
+{{authors.length - authorsLimit | number}} Authors
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
<div *ngIf="viewAll && lessBtn" class="uk-text-small">
|
<div *ngIf="viewAll && lessBtn" class="uk-text-small">
|
||||||
|
@ -131,11 +152,11 @@ export class ShowAuthorsComponent {
|
||||||
public properties: EnvProperties = properties;
|
public properties: EnvProperties = properties;
|
||||||
public routerHelper: RouterHelper = new RouterHelper();
|
public routerHelper: RouterHelper = new RouterHelper();
|
||||||
|
|
||||||
testBrowser: boolean;
|
isBrowser: boolean;
|
||||||
public clipboard;
|
public clipboard;
|
||||||
|
|
||||||
constructor(private route: ActivatedRoute, @Inject(PLATFORM_ID) private platformId: string) {
|
constructor(private route: ActivatedRoute, @Inject(PLATFORM_ID) private platformId: string) {
|
||||||
this.testBrowser = isPlatformBrowser(platformId);
|
this.isBrowser = isPlatformBrowser(platformId);
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {}
|
ngOnInit() {}
|
||||||
|
|
|
@ -6,10 +6,12 @@ import {RouterModule} from '@angular/router';
|
||||||
import {ShowAuthorsComponent} from './showAuthors.component';
|
import {ShowAuthorsComponent} from './showAuthors.component';
|
||||||
import {AlertModalModule} from "../modal/alertModal.module";
|
import {AlertModalModule} from "../modal/alertModal.module";
|
||||||
import {FullScreenModalModule} from "../modal/full-screen-modal/full-screen-modal.module";
|
import {FullScreenModalModule} from "../modal/full-screen-modal/full-screen-modal.module";
|
||||||
|
import {MobileDropdownModule} from "../mobile-dropdown/mobile-dropdown.module";
|
||||||
|
import {IconsModule} from "../icons/icons.module";
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule, FormsModule, RouterModule, AlertModalModule, FullScreenModalModule
|
CommonModule, FormsModule, RouterModule, AlertModalModule, FullScreenModalModule, MobileDropdownModule, IconsModule
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
ShowAuthorsComponent
|
ShowAuthorsComponent
|
||||||
|
|
|
@ -1,15 +1,14 @@
|
||||||
import {Injectable, OnDestroy} from '@angular/core';
|
import {Injectable} from '@angular/core';
|
||||||
import {HttpClient} from "@angular/common/http";
|
import {HttpClient} from "@angular/common/http";
|
||||||
import {BehaviorSubject, from, Observable, of, Subscription} from 'rxjs';
|
import {from, Observable, Subscription} from 'rxjs';
|
||||||
import {map} from 'rxjs/operators';
|
|
||||||
import {EnvProperties} from "../properties/env-properties";
|
import {EnvProperties} from "../properties/env-properties";
|
||||||
import {Portal} from "../entities/adminTool/portal";
|
import {Portal} from "../entities/adminTool/portal";
|
||||||
import {Page} from "../entities/adminTool/page";
|
import {Page} from "../entities/adminTool/page";
|
||||||
import {properties} from "../../../../environments/environment";
|
import {AdvancedAsyncSubject} from "../AdvancedAsyncSubject";
|
||||||
|
|
||||||
@Injectable({providedIn: 'root'})
|
@Injectable({providedIn: 'root'})
|
||||||
export class ConfigurationService {
|
export class ConfigurationService {
|
||||||
private communityInformation: BehaviorSubject<Portal> = new BehaviorSubject(null);
|
private portal: AdvancedAsyncSubject<Portal> = new AdvancedAsyncSubject<Portal>();
|
||||||
private sub: Subscription = null;
|
private sub: Subscription = null;
|
||||||
private promise: Promise<void> = null;
|
private promise: Promise<void> = null;
|
||||||
|
|
||||||
|
@ -26,73 +25,36 @@ export class ConfigurationService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public initStaticPortal(portal: Portal) {
|
||||||
* @deprecated
|
this.promise = new Promise<void>(resolve => {
|
||||||
*/
|
this.portal.next(portal);
|
||||||
getCommunityInformation(properties: EnvProperties, community: string) {
|
|
||||||
let url = properties.adminToolsAPIURL + "/" + properties.adminToolsPortalType + "/" + community + '/full';
|
|
||||||
return this.http.get((properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url);
|
|
||||||
//.map(res => res.json());
|
|
||||||
}
|
|
||||||
|
|
||||||
public initStaticCommunityInformation(communityInformation: Portal) {
|
|
||||||
this.promise = new Promise<void>((resolve => {
|
|
||||||
this.communityInformation.next(communityInformation);
|
|
||||||
resolve();
|
resolve();
|
||||||
}));
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
public initCommunityInformation(properties: EnvProperties, community: string) {
|
public initPortal(properties: EnvProperties, pid: string) {
|
||||||
if (community == null) return;
|
if (pid == null || this.portal?.getValue()?.static) return;
|
||||||
let url = properties.adminToolsAPIURL + "/" + properties.adminToolsPortalType + "/" + community + "/full";
|
let url = properties.adminToolsAPIURL + "/" + properties.adminToolsPortalType + "/" + pid + "/full";
|
||||||
this.promise = new Promise<void>((resolve => {
|
this.promise = new Promise<void>(resolve => {
|
||||||
this.sub = this.http.get<Portal>((properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url).subscribe(
|
this.sub = this.http.get<Portal>((properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url).subscribe(
|
||||||
(communityInformation: Portal) => {
|
(portal: Portal) => {
|
||||||
this.communityInformation.next(communityInformation);
|
this.portal.next(portal);
|
||||||
resolve();
|
resolve();
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
this.communityInformation.error(error);
|
this.portal.next(null);
|
||||||
resolve();
|
resolve();
|
||||||
});
|
});
|
||||||
}));
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public get communityInformationState(): Observable<Portal> {
|
public get portalAsObservable(): Observable<Portal> {
|
||||||
return this.communityInformation.asObservable();
|
return this.portal.asObservable();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
async isPageEnabledAsync(properties: EnvProperties, portal: string, page_route: string) {
|
||||||
* @deprecated
|
if (!this.promise || (this.portal && this.portal.getValue() && portal !== this.portal.getValue().pid)) {
|
||||||
*/
|
this.initPortal(properties, portal);
|
||||||
isEntityEnabled(APIUrl: string, community: string, entity: string) {
|
|
||||||
//console.log("isEntityEnabled: "+entity);
|
|
||||||
let url = "isEntityEnabled-" + entity;
|
|
||||||
|
|
||||||
// if(entity == "publication" || entity == "dataset" || entity == "datasource"){
|
|
||||||
// return Observable.of(new Object()).mapTo(false);
|
|
||||||
// }
|
|
||||||
// return Observable.of(new Object()).mapTo(true);
|
|
||||||
return this.http.get(APIUrl + "/page")
|
|
||||||
.pipe(map(res => true));
|
|
||||||
}
|
|
||||||
|
|
||||||
isPageEnabled(portal: string, route: string, portalType = properties.adminToolsPortalType) {
|
|
||||||
let url = properties.adminToolsAPIURL + "/" + portalType + "/" + portal + "/pages?page_route=" + route;
|
|
||||||
return this.http.get((properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url)
|
|
||||||
.pipe(map(res => {
|
|
||||||
let result = false;
|
|
||||||
if (res['length'] > 0 && res[0].route == route) {
|
|
||||||
result = res[0].isEnabled;
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
async isPageEnabledByStateAsync(properties: EnvProperties, portal: string, page_route: string) {
|
|
||||||
if (!this.promise || (this.communityInformation && this.communityInformation.getValue() && portal !== this.communityInformation.getValue().pid)) {
|
|
||||||
this.initCommunityInformation(properties, portal);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.promise;
|
await this.promise;
|
||||||
|
@ -102,13 +64,13 @@ export class ConfigurationService {
|
||||||
return this.filtering(page_route);
|
return this.filtering(page_route);
|
||||||
}
|
}
|
||||||
|
|
||||||
isPageEnabledByState(properties: EnvProperties, portal: string, router: string): Observable<boolean> {
|
isPageEnabled(properties: EnvProperties, portal: string, router: string): Observable<boolean> {
|
||||||
let page_route: string = router.split('?')[0].substring(1);
|
let page_route: string = router.split('?')[0].substring(1);
|
||||||
return from(this.isPageEnabledByStateAsync(properties, portal, page_route));
|
return from(this.isPageEnabledAsync(properties, portal, page_route));
|
||||||
}
|
}
|
||||||
|
|
||||||
filtering(page_route: string) {
|
filtering(page_route: string) {
|
||||||
let community: Portal = this.communityInformation.getValue();
|
let community: Portal = this.portal.getValue();
|
||||||
let pages: Page[] = <Page[]>community.pages;
|
let pages: Page[] = <Page[]>community.pages;
|
||||||
if (pages) {
|
if (pages) {
|
||||||
let page = pages.find((page: Page) => page.route == page_route);
|
let page = pages.find((page: Page) => page.route == page_route);
|
||||||
|
@ -117,38 +79,4 @@ export class ConfigurationService {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
getMainPageContent(APIUrl: string, community: string,) {
|
|
||||||
return this.http.get(APIUrl + "/page")
|
|
||||||
.pipe(map(res => true));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
getSpecialAnouncementContent(APIUrl: string, community: string,) {
|
|
||||||
return this.http.get(APIUrl + "/page")
|
|
||||||
.pipe(map(res => ""));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
getHelpPageContent(APIUrl: string, community: string, router: string) {
|
|
||||||
return this.http.get(APIUrl + "/page")
|
|
||||||
.pipe(map(res => true));
|
|
||||||
}
|
|
||||||
|
|
||||||
// private handleError (error: Response) {
|
|
||||||
// // in a real world app, we may send the error to some remote logging infrastructure
|
|
||||||
// // instead of just logging it to the console
|
|
||||||
// console.log(error);
|
|
||||||
// return this.http.get(this.APIUrl + "/page")
|
|
||||||
// .map(res => true);
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +1,28 @@
|
||||||
<a (click)="open()"
|
<a (click)="open()"
|
||||||
[title]="'Send data to cloud storage'"
|
[title]="'Send data to cloud storage'"
|
||||||
[attr.uk-tooltip]="'pos: bottom; cls: uk-active uk-text-small uk-padding-small'"
|
[attr.uk-tooltip]="'pos: bottom; cls: uk-active uk-text-small uk-padding-small'"
|
||||||
class="uk-flex uk-flex-middle uk-flex-center uk-button-link uk-text-bolder">
|
class="uk-flex uk-flex-middle uk-button-link"
|
||||||
<icon flex="true" ratio="0.8" name="cloud_upload" visuallyHidden="upload"></icon>
|
[class.uk-text-bolder]="!isMobile">
|
||||||
<span class="uk-margin-xsmall-left">Transfer</span>
|
<icon flex="true" ratio="1" name="cloud_upload" visuallyHidden="upload"></icon>
|
||||||
|
<span [ngClass]="isMobile ? 'uk-margin-small-left' : 'uk-margin-xsmall-left'">Transfer</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
||||||
<!-- This is the modal -->
|
<!-- This is the modal -->
|
||||||
<fs-modal #egiTransferModal classBody="uk-container-xlarge" [okButtonDisabled]="destinationPath.length == 0 || status == 'succeeded'
|
<modal-alert #egiTransferModal classBody="uk-container-xlarge" large="true"
|
||||||
|| (requests > 0) || !validatePath() || !validateDestinationUrl() || (!this.downloadElements || this.downloadElements.length == 0)"
|
[okDisabled]="!privacyAccepted || destinationPath.length == 0 || status == 'succeeded' || (requests > 0)
|
||||||
|
|| !validatePath() || !validateDestinationUrl() || (!this.downloadElements || this.downloadElements.length == 0)"
|
||||||
|
(alertOutput)="transfer()" (cancelOutput)="init()">
|
||||||
|
<ng-container *ngTemplateOutlet="modalContents;"></ng-container>
|
||||||
|
</modal-alert>
|
||||||
|
|
||||||
|
<fs-modal #egiTransferFsModal classTitle="uk-tile-default uk-border-bottom" classBody="uk-container-xlarge"
|
||||||
|
[okButtonDisabled]="!privacyAccepted || destinationPath.length == 0 || status == 'succeeded' || (requests > 0)
|
||||||
|
|| !validatePath() || !validateDestinationUrl() || (!this.downloadElements || this.downloadElements.length == 0)"
|
||||||
(okEmitter)="transfer()" (cancelEmitter)="init()">
|
(okEmitter)="transfer()" (cancelEmitter)="init()">
|
||||||
|
<ng-container *ngTemplateOutlet="modalContents;"></ng-container>
|
||||||
|
</fs-modal>
|
||||||
|
|
||||||
|
<ng-template #modalContents>
|
||||||
<div *ngIf="!accessToken" class="">
|
<div *ngIf="!accessToken" class="">
|
||||||
<div class="uk-width-1-1 uk-margin-bottom uk-text-center">
|
<div class="uk-width-1-1 uk-margin-bottom uk-text-center">
|
||||||
In order to send data to a Cloud Storage, you would need to be authenticated, please login via EGI check-in.
|
In order to send data to a Cloud Storage, you would need to be authenticated, please login via EGI check-in.
|
||||||
|
@ -24,8 +36,8 @@
|
||||||
<div class="uk-width-1-1 uk-margin-bottom uk-text-center">
|
<div class="uk-width-1-1 uk-margin-bottom uk-text-center">
|
||||||
You have requested to send the data corresponding to the DOI <a [href]="selectedSourceUrl" target="_blank">{{selectedSourceUrl.split(doiPrefix)[1]}}</a> to a cloud storage using the EOSC Data Transfer service
|
You have requested to send the data corresponding to the DOI <a [href]="selectedSourceUrl" target="_blank">{{selectedSourceUrl.split(doiPrefix)[1]}}</a> to a cloud storage using the EOSC Data Transfer service
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-grid uk-grid-small uk-child-width-1-2 uk-grid-divider">
|
<div class="uk-grid uk-grid-small uk-child-width-1-2@m uk-grid-divider">
|
||||||
<!-- Source -->
|
<!-- Source -->
|
||||||
<div class="uk-first-column source">
|
<div class="uk-first-column source">
|
||||||
<p class="uk-text-meta uk-text-xsmall uk-margin-remove-bottom uk-margin-top">Available DOI URLs:</p>
|
<p class="uk-text-meta uk-text-xsmall uk-margin-remove-bottom uk-margin-top">Available DOI URLs:</p>
|
||||||
<div input type="select" [(value)]="selectedSourceUrl" hint="Select..." [inputClass]="'flat'"
|
<div input type="select" [(value)]="selectedSourceUrl" hint="Select..." [inputClass]="'flat'"
|
||||||
|
@ -41,15 +53,15 @@
|
||||||
<div *ngIf="!this.downloadElements || this.downloadElements.length == 0"> - </div>
|
<div *ngIf="!this.downloadElements || this.downloadElements.length == 0"> - </div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Destination -->
|
<!-- Destination -->
|
||||||
<div *ngIf="destinationOptions" class="destination">
|
<div *ngIf="destinationOptions" class="destination" [class.uk-margin-top]="isMobile">
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<!-- Testing:<br>-->
|
<!-- Testing:<br>-->
|
||||||
<!-- https://dcache-demo.desy.de:2443-->
|
<!-- https://dcache-demo.desy.de:2443-->
|
||||||
<!-- <br>-->
|
<!-- <br>-->
|
||||||
<!-- /Demonstrators/EOSC-Future/EGI/-->
|
<!-- /Demonstrators/EOSC-Future/EGI/-->
|
||||||
<!-- <br>-->
|
<!-- <br>-->
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<p class="uk-text-meta uk-text-xsmall uk-margin-remove-bottom uk-margin-top">Destination storage type:</p>
|
<p class="uk-text-meta uk-text-xsmall uk-margin-remove-bottom uk-margin-top">Destination storage type:</p>
|
||||||
<div input type="select" [(value)]="selectedDestination" hint="Select..." [inputClass]="'flat'"
|
<div input type="select" [(value)]="selectedDestination" hint="Select..." [inputClass]="'flat'"
|
||||||
[options]="destinationOptions" (valueChange)="folders = {}"></div>
|
[options]="destinationOptions" (valueChange)="folders = {}"></div>
|
||||||
|
@ -69,13 +81,13 @@
|
||||||
'password'? 'password':'secret key') " [inputClass]="'flat x-small'"
|
'password'? 'password':'secret key') " [inputClass]="'flat x-small'"
|
||||||
class=""></div>
|
class=""></div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="uk-text-xsmall">You can check our data protection policy <a class="custom-external" href="https://www.openaire.eu/data-protection-policy" target="_blank">here</a>.</div>-->
|
<!-- <div class="uk-text-xsmall">You can check our data protection policy <a class="custom-external" href="https://www.openaire.eu/data-protection-policy" target="_blank">here</a>.</div>-->
|
||||||
</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 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
|
||||||
[ngClass]="!validateDestinationUrl() ? 'uk-text-muted uk-disabled' : 'uk-text-primary'" [attr.disabled]="!destinationUrl"
|
[ngClass]="!validateDestinationUrl() ? 'uk-text-muted uk-disabled' : 'uk-text-primary'" [attr.disabled]="!destinationUrl"
|
||||||
(click)="browseFolder('/')">browse</a> to
|
(click)="browseFolder('/')">browse</a> to
|
||||||
|
@ -84,7 +96,7 @@
|
||||||
<ng-container *ngTemplateOutlet="folderListTmpl; context: { folder : folders['/'], folderPath: '/'}"></ng-container>
|
<ng-container *ngTemplateOutlet="folderListTmpl; context: { folder : folders['/'], folderPath: '/'}"></ng-container>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
<ng-container *ngIf="selectedDestination.destination == 'ftp'">
|
<ng-container *ngIf="selectedDestination.destination == 'ftp'">
|
||||||
<p>Comming soon!</p>
|
<p>Comming soon!</p>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
@ -96,7 +108,7 @@
|
||||||
<span class="uk-margin-small-left uk-text-small">*I have read and accepted the data protection policy <a class="custom-external" href="https://www.openaire.eu/data-protection-policy" target="_blank">here</a>.</span>
|
<span class="uk-margin-small-left uk-text-small">*I have read and accepted the data protection policy <a class="custom-external" href="https://www.openaire.eu/data-protection-policy" target="_blank">here</a>.</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div 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) || !validatePath() || !validateDestinationUrl() || (!this.downloadElements || this.downloadElements.length == 0)"
|
||||||
|
@ -109,13 +121,13 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- [class.uk-alert-success]="status && status.indexOf('error')==-1"-->
|
<!-- [class.uk-alert-success]="status && status.indexOf('error')==-1"-->
|
||||||
<!-- [class.uk-alert-error]="status && status.indexOf('error')!=-1">-->
|
<!-- [class.uk-alert-error]="status && status.indexOf('error')!=-1">-->
|
||||||
<div id="transferAlert" *ngIf="message" class="uk-width-1-1 uk-alert uk-margin-medium-top" [ngClass]="'uk-alert-'+statusMessage" uk-alert>
|
<div id="transferAlert" *ngIf="message" class="uk-width-1-1 uk-alert uk-margin-medium-top" [ngClass]="'uk-alert-'+statusMessage" uk-alert>
|
||||||
<div [innerHTML]="message"></div>
|
<div [innerHTML]="message"></div>
|
||||||
<!-- <a *ngIf="status != 'succeeded' && status != 'active'" (click)="transfer()">-->
|
<!-- <a *ngIf="status != 'succeeded' && status != 'active'" (click)="transfer()">-->
|
||||||
<!-- Try again!-->
|
<!-- Try again!-->
|
||||||
<!-- </a>-->
|
<!-- </a>-->
|
||||||
<div *ngIf="requests > 0" class="uk-flex uk-flex-center uk-text-muted">
|
<div *ngIf="requests > 0" class="uk-flex uk-flex-center uk-text-muted">
|
||||||
<div>
|
<div>
|
||||||
<span class="uk-icon uk-spinner">
|
<span class="uk-icon uk-spinner">
|
||||||
|
@ -132,12 +144,12 @@
|
||||||
<button *ngIf=" status != 'canceled'" class="uk-button uk-button-default" (click)="cancel()">Cancel</button>
|
<button *ngIf=" status != 'canceled'" class="uk-button uk-button-default" (click)="cancel()">Cancel</button>
|
||||||
<div>{{statusMessage}}</div>
|
<div>{{statusMessage}}</div>
|
||||||
</div>-->
|
</div>-->
|
||||||
<!-- <div *ngIf=" status != 'canceled'" class="uk-width-1-1 uk-text-right "-->
|
<!-- <div *ngIf=" status != 'canceled'" class="uk-width-1-1 uk-text-right "-->
|
||||||
<!-- [class.uk-invisible]="!(status == 'succeeded' || status.indexOf('error')!=-1)">-->
|
<!-- [class.uk-invisible]="!(status == 'succeeded' || status.indexOf('error')!=-1)">-->
|
||||||
<!-- <button class="uk-button uk-button-default uk-margin-top " (click)="close()">Close</button>-->
|
<!-- <button class="uk-button uk-button-default uk-margin-top " (click)="close()">Close</button>-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
|
|
||||||
<!-- TESTS -->
|
<!-- TESTS -->
|
||||||
<!-- <button (click)="hasBrowse()"
|
<!-- <button (click)="hasBrowse()"
|
||||||
class="uk-button uk-button-primary uk-margin-top"
|
class="uk-button uk-button-primary uk-margin-top"
|
||||||
>
|
>
|
||||||
|
@ -153,9 +165,9 @@
|
||||||
>
|
>
|
||||||
delete folder new
|
delete folder new
|
||||||
</button>-->
|
</button>-->
|
||||||
<!-- End of TESTS-->
|
<!-- End of TESTS-->
|
||||||
</div>
|
</div>
|
||||||
</fs-modal>
|
</ng-template>
|
||||||
|
|
||||||
<!-- Browse Templates -->
|
<!-- Browse Templates -->
|
||||||
<ng-template #folderListTmpl let-folder="folder" let-folderPath="folderPath" >
|
<ng-template #folderListTmpl let-folder="folder" let-folderPath="folderPath" >
|
||||||
|
|
|
@ -10,6 +10,7 @@ import {delay, repeat, startWith, switchMap} from "rxjs/operators";
|
||||||
import {StringUtils} from "../string-utils.class";
|
import {StringUtils} from "../string-utils.class";
|
||||||
import {HelperFunctions} from "../HelperFunctions.class";
|
import {HelperFunctions} from "../HelperFunctions.class";
|
||||||
import {FullScreenModalComponent} from "../modal/full-screen-modal/full-screen-modal.component";
|
import {FullScreenModalComponent} from "../modal/full-screen-modal/full-screen-modal.component";
|
||||||
|
import {AlertModal} from "../modal/alert";
|
||||||
declare var UIkit;
|
declare var UIkit;
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -35,6 +36,7 @@ declare var UIkit;
|
||||||
`]
|
`]
|
||||||
})
|
})
|
||||||
export class EGIDataTransferComponent {
|
export class EGIDataTransferComponent {
|
||||||
|
@Input() isMobile: boolean = false;
|
||||||
subscriptions = [];
|
subscriptions = [];
|
||||||
statusSub: Subscription[] = [];
|
statusSub: Subscription[] = [];
|
||||||
accessToken = null;
|
accessToken = null;
|
||||||
|
@ -55,7 +57,8 @@ export class EGIDataTransferComponent {
|
||||||
downloadElements = null;
|
downloadElements = null;
|
||||||
@Input() isOpen = false;
|
@Input() isOpen = false;
|
||||||
// @Input() selectedDestinationId = "dcache";
|
// @Input() selectedDestinationId = "dcache";
|
||||||
@ViewChild('egiTransferModal') egiTransferModal: FullScreenModalComponent;
|
@ViewChild('egiTransferModal') egiTransferModal: AlertModal;
|
||||||
|
@ViewChild('egiTransferFsModal') egiTransferFsModal: FullScreenModalComponent;
|
||||||
APIURL = properties.eoscDataTransferAPI;
|
APIURL = properties.eoscDataTransferAPI;
|
||||||
// status: "loading" | "success" | "errorParser" | "errorUser" | "errorTransfer" | "init" | "canceled" = "init";
|
// status: "loading" | "success" | "errorParser" | "errorUser" | "errorTransfer" | "init" | "canceled" = "init";
|
||||||
status: "unused" | "staging" | "submitted" | "active" | "succeeded" | "partial" | "failed" | "canceled" | "errorParser" | "errorUser" | "init" = "init";
|
status: "unused" | "staging" | "submitted" | "active" | "succeeded" | "partial" | "failed" | "canceled" | "errorParser" | "errorUser" | "init" = "init";
|
||||||
|
@ -146,20 +149,36 @@ export class EGIDataTransferComponent {
|
||||||
this.parse();
|
this.parse();
|
||||||
}
|
}
|
||||||
this.isOpen = true;
|
this.isOpen = true;
|
||||||
this.egiTransferModal.back = true;
|
|
||||||
this.egiTransferModal.cancelButton = false;
|
|
||||||
this.egiTransferModal.okButton = false;
|
|
||||||
this.egiTransferModal.okButtonText = ">> Transfer";
|
|
||||||
this.egiTransferModal.title = "EOSC Data Transfer";
|
|
||||||
this.init();
|
this.init();
|
||||||
|
|
||||||
|
if(!this.isMobile) {
|
||||||
|
// this.egiTransferModal.back = true;
|
||||||
|
this.egiTransferModal.cancelButton = false;
|
||||||
|
this.egiTransferModal.okButton = true;
|
||||||
|
this.egiTransferModal.okButtonText = ">> Transfer";
|
||||||
|
this.egiTransferModal.alertTitle = "EOSC Data Transfer";
|
||||||
if(typeof document !== 'undefined') {
|
if(typeof document !== 'undefined') {
|
||||||
this.egiTransferModal.open();
|
this.egiTransferModal.open();
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
this.egiTransferFsModal.back = false;
|
||||||
|
this.egiTransferFsModal.cancelButton = true;
|
||||||
|
this.egiTransferFsModal.okButton = false;
|
||||||
|
this.egiTransferFsModal.okButtonText = ">> Transfer";
|
||||||
|
this.egiTransferFsModal.title = "EOSC Data Transfer";
|
||||||
|
if(typeof document !== 'undefined') {
|
||||||
|
this.egiTransferFsModal.open();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
close(){
|
close(){
|
||||||
if(this.isOpen) {
|
if(this.isOpen) {
|
||||||
this.isOpen = false;
|
this.isOpen = false;
|
||||||
|
if(!this.isMobile) {
|
||||||
this.egiTransferModal.cancel();
|
this.egiTransferModal.cancel();
|
||||||
|
} else {
|
||||||
|
this.egiTransferFsModal.cancel();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// this.downloadElements = [];
|
// this.downloadElements = [];
|
||||||
this.init();
|
this.init();
|
||||||
|
|
|
@ -1,23 +1,32 @@
|
||||||
import {Component, ElementRef, Input, ViewChild} from "@angular/core";
|
import {Component, ElementRef, Input, ViewChild} from "@angular/core";
|
||||||
|
import {MobileDropdownComponent} from "../mobile-dropdown/mobile-dropdown.component";
|
||||||
|
|
||||||
declare var UIkit;
|
declare var UIkit;
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'dropdown-filter',
|
selector: 'dropdown-filter',
|
||||||
template: `
|
template: `
|
||||||
<button class="uk-button uk-button-default uk-flex uk-flex-middle"
|
<button #toggle class="uk-button uk-button-default uk-flex uk-flex-middle"
|
||||||
[class.uk-disabled]="disabled" [disabled]="disabled">
|
[class.uk-disabled]="disabled" [disabled]="disabled">
|
||||||
<span>{{name}}<span *ngIf="count > 0">({{count}})</span></span>
|
<span>{{name}}<span *ngIf="count > 0">({{count}})</span></span>
|
||||||
<icon [flex]="true" class="uk-margin-xsmall-left" [name]="'expand_' + (isOpen?'less':'more')"></icon>
|
<icon [flex]="true" class="uk-margin-xsmall-left" [name]="'expand_' + (isOpen?'less':'more')"></icon>
|
||||||
</button>
|
</button>
|
||||||
<div #dropdownElement class="uk-dropdown"
|
<div *ngIf="!isMobile" #dropdownElement class="uk-dropdown"
|
||||||
[class.uk-height-max-large]="overflow" [class.uk-overflow-auto]="overflow"
|
[class.uk-height-max-large]="overflow" [class.uk-overflow-auto]="overflow"
|
||||||
[ngStyle]="dropdownMinWidth?{'min-width.px': dropdownMinWidth}:''"
|
[ngStyle]="dropdownMinWidth?{'min-width.px': dropdownMinWidth}:''"
|
||||||
[ngClass]="dropdownClass" uk-dropdown="mode: click; delay-hide: 0;">
|
[ngClass]="dropdownClass" uk-dropdown="mode: click; delay-hide: 0;">
|
||||||
<div>
|
<div>
|
||||||
|
<ng-container *ngTemplateOutlet="content"></ng-container>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<mobile-dropdown *ngIf="isMobile" #mobileDropdown [toggle]="toggle">
|
||||||
|
<div [ngClass]="dropdownClass">
|
||||||
|
<ng-container *ngTemplateOutlet="content"></ng-container>
|
||||||
|
</div>
|
||||||
|
</mobile-dropdown>
|
||||||
|
<ng-template #content>
|
||||||
<ng-content></ng-content>
|
<ng-content></ng-content>
|
||||||
</div>
|
</ng-template>
|
||||||
</div>
|
|
||||||
`
|
`
|
||||||
})
|
})
|
||||||
export class DropdownFilterComponent {
|
export class DropdownFilterComponent {
|
||||||
|
@ -33,13 +42,24 @@ export class DropdownFilterComponent {
|
||||||
public overflow: boolean = true;
|
public overflow: boolean = true;
|
||||||
@Input()
|
@Input()
|
||||||
public disabled = false;
|
public disabled = false;
|
||||||
|
@Input()
|
||||||
|
public isMobile: boolean = false;
|
||||||
@ViewChild("dropdownElement") dropdownElement: ElementRef;
|
@ViewChild("dropdownElement") dropdownElement: ElementRef;
|
||||||
|
@ViewChild("mobileDropdown") mobileDropdown: MobileDropdownComponent;
|
||||||
|
|
||||||
get isOpen() {
|
get isOpen() {
|
||||||
|
if(this.isMobile) {
|
||||||
|
return this.mobileDropdown?.opened;
|
||||||
|
} else {
|
||||||
return (typeof document !== 'undefined') && this.dropdownElement && UIkit.dropdown(this.dropdownElement.nativeElement).isActive();
|
return (typeof document !== 'undefined') && this.dropdownElement && UIkit.dropdown(this.dropdownElement.nativeElement).isActive();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
closeDropdown() {
|
closeDropdown() {
|
||||||
|
if(this.isMobile) {
|
||||||
|
this.mobileDropdown.close();
|
||||||
|
} else {
|
||||||
UIkit.dropdown(this.dropdownElement.nativeElement).hide();
|
UIkit.dropdown(this.dropdownElement.nativeElement).hide();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,9 +2,10 @@ import {NgModule} from "@angular/core";
|
||||||
import {CommonModule} from "@angular/common";
|
import {CommonModule} from "@angular/common";
|
||||||
import {DropdownFilterComponent} from "./dropdown-filter.component";
|
import {DropdownFilterComponent} from "./dropdown-filter.component";
|
||||||
import {IconsModule} from "../icons/icons.module";
|
import {IconsModule} from "../icons/icons.module";
|
||||||
|
import {MobileDropdownModule} from "../mobile-dropdown/mobile-dropdown.module";
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [CommonModule, IconsModule],
|
imports: [CommonModule, IconsModule, MobileDropdownModule],
|
||||||
declarations: [DropdownFilterComponent],
|
declarations: [DropdownFilterComponent],
|
||||||
exports: [DropdownFilterComponent]
|
exports: [DropdownFilterComponent]
|
||||||
})
|
})
|
||||||
|
|
|
@ -10,6 +10,7 @@ export class Portal {
|
||||||
twitterAccount: string;
|
twitterAccount: string;
|
||||||
entities: string[] | Entity[];
|
entities: string[] | Entity[];
|
||||||
pages: string[] | Page[];
|
pages: string[] | Page[];
|
||||||
|
static: boolean = false;
|
||||||
|
|
||||||
private static getmockPortalInfo():any{
|
private static getmockPortalInfo():any{
|
||||||
return {
|
return {
|
||||||
|
@ -181,12 +182,14 @@ export class Portal {
|
||||||
"isEnabled": true
|
"isEnabled": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
};;
|
"static": true
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
public static getMockCommunityInfo(pid: string, disabledEntities:string[],disabledPages:string[]): any {
|
public static getMockCommunityInfo(pid: string, name:string, disabledEntities:string[],disabledPages:string[]): any {
|
||||||
let communityInfo = Object.assign({}, Portal.getmockPortalInfo());
|
let communityInfo = Object.assign({}, Portal.getmockPortalInfo());
|
||||||
communityInfo.pid = pid;
|
communityInfo.pid = pid;
|
||||||
|
communityInfo.name = name;
|
||||||
for(let disabledPage of disabledPages) {
|
for(let disabledPage of disabledPages) {
|
||||||
for (var i = 0; i < communityInfo.pages.length; i++) {
|
for (var i = 0; i < communityInfo.pages.length; i++) {
|
||||||
if (communityInfo.pages[i].route == disabledPage) {
|
if (communityInfo.pages[i].route == disabledPage) {
|
||||||
|
|
|
@ -23,6 +23,8 @@ import {EnvProperties} from "../properties/env-properties";
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="share">
|
<div *ngIf="share">
|
||||||
<a (click)="openAddThisModal()"
|
<a (click)="openAddThisModal()"
|
||||||
|
[title]="'Share this '+getTypeName() + ' in your social networks'"
|
||||||
|
[attr.uk-tooltip]="'pos: right; cls: uk-active uk-text-small uk-padding-small'"
|
||||||
class="uk-flex uk-flex-middle uk-button-link uk-text-bolder" [ngClass]="isMobile ? 'uk-margin-left uk-margin-xsmall-bottom' : 'uk-flex-center'">
|
class="uk-flex uk-flex-middle uk-button-link uk-text-bolder" [ngClass]="isMobile ? 'uk-margin-left uk-margin-xsmall-bottom' : 'uk-flex-center'">
|
||||||
<icon [flex]="true" [ratio]="0.8" name="share" visuallyHidden="share"></icon>
|
<icon [flex]="true" [ratio]="0.8" name="share" visuallyHidden="share"></icon>
|
||||||
<span class="uk-margin-xsmall-left">Share</span>
|
<span class="uk-margin-xsmall-left">Share</span>
|
||||||
|
@ -57,7 +59,7 @@ import {EnvProperties} from "../properties/env-properties";
|
||||||
</div>
|
</div>
|
||||||
<modal-alert *ngIf="cite" #citeModal>
|
<modal-alert *ngIf="cite" #citeModal>
|
||||||
<citeThis *ngIf="citeThisClicked" [result]="result" [id]="id"
|
<citeThis *ngIf="citeThisClicked" [result]="result" [id]="id"
|
||||||
[type]="getTypeName().toLowerCase()" [piwikSiteId]="properties.piwikSiteId"></citeThis>
|
[type]="getTypeName().toLowerCase()"></citeThis>
|
||||||
</modal-alert>
|
</modal-alert>
|
||||||
<modal-alert *ngIf="share" #addThisModal classBody="uk-flex uk-flex-center uk-flex-middle">
|
<modal-alert *ngIf="share" #addThisModal classBody="uk-flex uk-flex-center uk-flex-middle">
|
||||||
<addThis [url]="url"></addThis>
|
<addThis [url]="url"></addThis>
|
||||||
|
@ -101,7 +103,6 @@ export class EntityActionsComponent implements OnInit {
|
||||||
public routerHelper: RouterHelper = new RouterHelper();
|
public routerHelper: RouterHelper = new RouterHelper();
|
||||||
@ViewChild('citeModal') citeModal;
|
@ViewChild('citeModal') citeModal;
|
||||||
@ViewChild('embedResultsModal') embedResultsModal;
|
@ViewChild('embedResultsModal') embedResultsModal;
|
||||||
@ViewChild('downloadReportModal') downloadReportModal;
|
|
||||||
@ViewChild('addThisModal') addThisModal;
|
@ViewChild('addThisModal') addThisModal;
|
||||||
properties: EnvProperties = properties;
|
properties: EnvProperties = properties;
|
||||||
openaireEntities = OpenaireEntities;
|
openaireEntities = OpenaireEntities;
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
import {Component, Input, OnInit} from "@angular/core";
|
import {Component, ElementRef, EventEmitter, Input, OnInit, Output} from "@angular/core";
|
||||||
|
import {NavigationStart, Router} from "@angular/router";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'mobile-dropdown',
|
selector: 'mobile-dropdown',
|
||||||
template: `
|
template: `
|
||||||
<div class="uk-dropdown-mobile" [class.uk-open]="opened">
|
<div class="uk-dropdown-mobile" [class.uk-open]="opened" (click)="close()">
|
||||||
<div class="uk-dropdown-mobile-container">
|
<div class="uk-dropdown-mobile-container" (click)="$event.stopPropagation()">
|
||||||
<a class="uk-close" (click)="close()">
|
<a class="uk-close" (click)="close()">
|
||||||
<icon name="close" [ratio]="1.2"></icon>
|
<icon name="close" [ratio]="1.2"></icon>
|
||||||
</a>
|
</a>
|
||||||
|
@ -15,22 +16,55 @@ import {Component, Input, OnInit} from "@angular/core";
|
||||||
</div>`
|
</div>`
|
||||||
})
|
})
|
||||||
export class MobileDropdownComponent implements OnInit{
|
export class MobileDropdownComponent implements OnInit{
|
||||||
@Input() toggle: HTMLLinkElement;
|
@Input() toggle: HTMLAnchorElement | HTMLButtonElement;
|
||||||
|
@Output() onClose: EventEmitter<void> = new EventEmitter;
|
||||||
public opened: boolean = false;
|
public opened: boolean = false;
|
||||||
|
private static MOBILE_DROPDOWN_CONTAINER = 'mobile-dropdown-container';
|
||||||
|
|
||||||
|
constructor(private element: ElementRef, private router: Router) {
|
||||||
|
this.router.events.subscribe(event => {
|
||||||
|
if(event instanceof NavigationStart) {
|
||||||
|
this.element.nativeElement.remove();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
if(this.toggle) {
|
if(this.toggle) {
|
||||||
this.toggle.onclick = (ev) => {
|
this.toggle.onclick = (ev) => {
|
||||||
this.opened = !this.opened;
|
ev.preventDefault();
|
||||||
|
ev.stopPropagation();
|
||||||
|
if(this.opened) {
|
||||||
|
this.close();
|
||||||
|
} else {
|
||||||
|
this.open();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
open() {
|
open() {
|
||||||
|
if(!this.opened) {
|
||||||
|
let body = document.getElementsByTagName('body')[0];
|
||||||
|
let container = document.getElementById(MobileDropdownComponent.MOBILE_DROPDOWN_CONTAINER);
|
||||||
|
if(!container) {
|
||||||
|
container = document.createElement('div');
|
||||||
|
container.setAttribute('id', MobileDropdownComponent.MOBILE_DROPDOWN_CONTAINER);
|
||||||
|
body.append(container);
|
||||||
|
}
|
||||||
|
let parent = this.element.nativeElement.parentElement;
|
||||||
|
parent.removeChild(this.element.nativeElement);
|
||||||
|
container.append(this.element.nativeElement);
|
||||||
this.opened = true;
|
this.opened = true;
|
||||||
|
body.setAttribute('style', 'overflow-y: hidden');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
close() {
|
close() {
|
||||||
|
if(this.opened) {
|
||||||
this.opened = false;
|
this.opened = false;
|
||||||
|
this.onClose.emit();
|
||||||
|
document.getElementsByTagName('body')[0].setAttribute('style', '');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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"
|
||||||
|
@ -205,6 +205,9 @@ export class AlertModal implements OnInit, AfterViewInit, OnDestroy {
|
||||||
open() {
|
open() {
|
||||||
if(typeof UIkit !== "undefined") {
|
if(typeof UIkit !== "undefined") {
|
||||||
UIkit.modal(this.element.nativeElement).show();
|
UIkit.modal(this.element.nativeElement).show();
|
||||||
|
if(this.overflowBody) {
|
||||||
|
this.bodyElement.nativeElement.scrollTo(0, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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>
|
||||||
|
@ -142,7 +142,7 @@ export class FullScreenModalComponent implements AfterViewInit, OnDestroy {
|
||||||
|
|
||||||
open() {
|
open() {
|
||||||
UIkit.modal(this.modal.nativeElement).show();
|
UIkit.modal(this.modal.nativeElement).show();
|
||||||
HelperFunctions.scroll();
|
this.body.nativeElement.scrollTo(0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
cancel() {
|
cancel() {
|
||||||
|
|
|
@ -13,65 +13,24 @@ declare var UIkit: any;
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'modal-loading',
|
selector: 'modal-loading',
|
||||||
template: `
|
template: `
|
||||||
<!-- uk-modal="center:true"-->
|
<div #loading_element [class.uk-modal]="!isMobile" [class.uk-modal-full]="isMobile" [id]="id" uk-modal="container: #modal-container; bg-close:false; ">
|
||||||
<!-- <div [class]="(!isOpen)?'uk-modal ':'uk-modal uk-open uk-animation-fade'" [open]="!isOpen" uk-modal tabindex="-1" role="dialog" >-->
|
|
||||||
<div *ngIf="!isMobile" #loading_element class="uk-modal" [id]="id" uk-modal="container: #modal-container">
|
|
||||||
<div class="uk-modal-dialog" role="">
|
|
||||||
<!--div class="modal-content"-->
|
|
||||||
|
|
||||||
<div class="uk-modal-body">
|
|
||||||
<div >
|
|
||||||
<h4 class="text-center" >{{message}}</h4>
|
|
||||||
<!-- <div class="uk-spinner"></div>-->
|
|
||||||
<loading></loading>
|
|
||||||
<ng-content></ng-content>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<!--/div-->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div *ngIf="isMobile" #loading_element class="uk-modal-full" [id]="id" uk-modal="container: #modal-container">
|
|
||||||
<div class="uk-modal-dialog">
|
<div class="uk-modal-dialog">
|
||||||
<div #header class="uk-modal-header uk-flex uk-flex-middle" [ngClass]="classTitle">
|
<div *ngIf="isMobile" #header class="uk-modal-header uk-flex uk-flex-middle" [ngClass]="classTitle">
|
||||||
<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 class="uk-margin-remove">{{title}}</h4>
|
<h4 class="uk-margin-remove">{{title}}</h4>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div #body class="uk-modal-body uk-overflow-auto">
|
<div #body class="uk-modal-body" [class.uk-overflow-auto]="isMobile">
|
||||||
<div class="uk-container uk-height-1-1">
|
<div [class.uk-container]="isMobile" [class.uk-height-1-1]="isMobile">
|
||||||
<h4 class="text-center">{{message}}</h4>
|
<h4 class="text-center" >{{message}}</h4>
|
||||||
<loading></loading>
|
<loading></loading>
|
||||||
<ng-content></ng-content>
|
<ng-content></ng-content>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- <div #element [class]="(!isOpen)?'uk-modal ':'uk-modal uk-animation-fade uk-open'" [open]="!isOpen" uk-modal="container: #modal-container">-->
|
|
||||||
<!-- <div class="uk-modal-dialog">-->
|
|
||||||
<!-- <div class="uk-modal-body uk-animation-fast uk-text-left">-->
|
|
||||||
<!-- <h4 class="text-center" >{{message}}</h4>-->
|
|
||||||
<!-- <div class="uk-animation-fade uk-margin-top uk-width-1-1" role="alert">-->
|
|
||||||
<!-- <span class="loading-gif uk-align-center" ></span>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- <ng-content></ng-content>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!--div class="uk-modal uk-open" aria-hidden="false" style="display: block; overflow-y: scroll;">
|
|
||||||
<div class="uk-modal-dialog" tabindex="">
|
|
||||||
<div class="uk-modal-spinner"></div>
|
|
||||||
</div>
|
</div>
|
||||||
</div-->
|
|
||||||
`,
|
`,
|
||||||
encapsulation: ViewEncapsulation.None,
|
encapsulation: ViewEncapsulation.None,
|
||||||
})
|
})
|
||||||
|
|
|
@ -3,76 +3,88 @@ import {HttpClient} from "@angular/common/http";
|
||||||
|
|
||||||
import {StringUtils} from '../string-utils.class';
|
import {StringUtils} from '../string-utils.class';
|
||||||
import {EnvProperties} from '../properties/env-properties';
|
import {EnvProperties} from '../properties/env-properties';
|
||||||
import {Observable} from "rxjs";
|
import {Observable, of} from "rxjs";
|
||||||
|
import {ConfigurationService} from "../configuration/configuration.service";
|
||||||
|
import {switchMap, take} from "rxjs/operators";
|
||||||
|
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class PiwikService {
|
export class PiwikService {
|
||||||
constructor(private http: HttpClient ) {}
|
constructor(private http: HttpClient, private configurationService: ConfigurationService) {
|
||||||
trackViewForCustomUrl (properties:EnvProperties, title, pageparams, siteId = null):any {
|
|
||||||
let piwikId= ((siteId!=null)?siteId:properties.piwikSiteId);
|
|
||||||
if(typeof location !== 'undefined' && piwikId){
|
|
||||||
return this.doTrackView(properties,title,piwikId,location.href.split("?")[0] + "?" + pageparams);
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
trackView (properties:EnvProperties, title, siteId = null):any {
|
|
||||||
let piwikId= ((siteId!=null)?siteId:properties.piwikSiteId);
|
|
||||||
if(typeof location !== 'undefined' && piwikId){
|
|
||||||
return this.doTrackView(properties,title,piwikId,location.href);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
private doTrackView (properties:EnvProperties, title, siteId, pageURL):any {
|
|
||||||
|
|
||||||
|
trackViewForCustomUrl(properties: EnvProperties, title, pageparams): any {
|
||||||
|
if (typeof location !== 'undefined' && properties.enablePiwikTrack) {
|
||||||
|
return this.configurationService.portalAsObservable.pipe(take(1), switchMap(portal => {
|
||||||
|
let piwik = portal ? portal.piwik : null;
|
||||||
|
return this.doTrackView(properties, title, piwik, location.href.split("?")[0] + "?" + pageparams);
|
||||||
|
}));
|
||||||
|
} else {
|
||||||
|
return of(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
trackView(properties: EnvProperties, title) {
|
||||||
|
if (typeof location !== 'undefined' && properties.enablePiwikTrack) {
|
||||||
|
return this.configurationService.portalAsObservable.pipe(take(1), switchMap(portal => {
|
||||||
|
let piwik = portal ? portal.piwik : null;
|
||||||
|
return this.doTrackView(properties, title, piwik, location.href);
|
||||||
|
}));
|
||||||
|
} else {
|
||||||
|
return of(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
trackDownload(properties: EnvProperties, type = "") {
|
||||||
|
if (typeof location !== 'undefined' && properties.enablePiwikTrack) {
|
||||||
|
return this.configurationService.portalAsObservable.pipe(take(1), switchMap(portal => {
|
||||||
|
let piwik = portal ? portal.piwik : null;
|
||||||
|
return this.doTrackDownload(properties, type, piwik);
|
||||||
|
}));
|
||||||
|
} else {
|
||||||
|
return of(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private doTrackView(properties: EnvProperties, title, siteId, pageURL): Observable<any> {
|
||||||
let ua = this.getUserAgent();
|
let ua = this.getUserAgent();
|
||||||
let referrer = this.getReferrer();
|
let referrer = this.getReferrer();
|
||||||
let piwikId= ((siteId!=null)?siteId:properties.piwikSiteId);
|
let piwikId = ((siteId != null) ? siteId : properties.piwikSiteId);
|
||||||
if(typeof location !== 'undefined' && piwikId){
|
if (typeof location !== 'undefined' && piwikId) {
|
||||||
// console.log("Piwik - View: " + pageURL, title);
|
var url = properties.piwikBaseUrl + piwikId + "&rec=1&url=" + StringUtils.URIEncode(pageURL) + "&action_name=" + StringUtils.URIEncode(title) +
|
||||||
var url = properties.piwikBaseUrl+piwikId+"&rec=1&url="+StringUtils.URIEncode(pageURL)+"&action_name="+StringUtils.URIEncode(title)+
|
((ua != null && ua.length > 0) ? ('&ua=' + StringUtils.URIEncode(ua)) : '') +
|
||||||
((ua != null && ua.length > 0)?('&ua='+StringUtils.URIEncode(ua)):'')+
|
((referrer != null && referrer.length > 0) ? ('&urlref=' + StringUtils.URIEncode(referrer)) : '');
|
||||||
((referrer != null && referrer.length > 0)?('&urlref='+StringUtils.URIEncode(referrer)):'');
|
|
||||||
// console.log("Piwik - View: " + url);
|
|
||||||
// return Observable.of(new Object()); // for testing
|
// return Observable.of(new Object()); // for testing
|
||||||
return this.http.get( url, {responseType: 'blob'});
|
return this.http.get(url, {responseType: 'blob'});
|
||||||
// .do(request => console.info("Piwik request completed" ));
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
doTrackDownload(properties: EnvProperties, type = "", siteId): any {
|
||||||
}
|
|
||||||
trackDownload (properties:EnvProperties, type = "", siteId = null):any {
|
|
||||||
var ua = this.getUserAgent();
|
var ua = this.getUserAgent();
|
||||||
var referrer = this.getReferrer();
|
var referrer = this.getReferrer();
|
||||||
var url = properties.piwikBaseUrl+((siteId!=null)?siteId:properties.piwikSiteId)+"&rec=1&url="+StringUtils.URIEncode(location.href)+"&download="+StringUtils.URIEncode(location.href+"#"+type)+
|
var url = properties.piwikBaseUrl + ((siteId != null) ? siteId : properties.piwikSiteId) + "&rec=1&url=" + StringUtils.URIEncode(location.href) + "&download=" + StringUtils.URIEncode(location.href + "#" + type) +
|
||||||
((ua != null && ua.length > 0)?('&ua='+StringUtils.URIEncode(ua)):'')+
|
((ua != null && ua.length > 0) ? ('&ua=' + StringUtils.URIEncode(ua)) : '') +
|
||||||
((referrer != null && referrer.length > 0)?('&urlref='+StringUtils.URIEncode(referrer)):'');
|
((referrer != null && referrer.length > 0) ? ('&urlref=' + StringUtils.URIEncode(referrer)) : '');
|
||||||
//console.log("Piwik - trackDownload: "+url);
|
return this.http.get(url, {responseType: 'blob'});
|
||||||
|
|
||||||
return this.http.get( url, {responseType: 'blob'});
|
|
||||||
//.do(request => console.info("Piwik request completed" ));
|
|
||||||
|
|
||||||
}
|
}
|
||||||
private getUserAgent(){
|
|
||||||
if (typeof navigator !== 'undefined') {
|
|
||||||
//console.log("navigator.userAgent:" + navigator.userAgent);
|
|
||||||
return navigator.userAgent;
|
|
||||||
|
|
||||||
}else{
|
private getUserAgent() {
|
||||||
|
if (typeof navigator !== 'undefined') {
|
||||||
|
return navigator.userAgent;
|
||||||
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private getReferrer(){
|
|
||||||
|
private getReferrer() {
|
||||||
var referrer = "";
|
var referrer = "";
|
||||||
if (typeof document !== 'undefined') {
|
if (typeof document !== 'undefined') {
|
||||||
//console.log("document.referrer:" + document.referrer);
|
|
||||||
referrer = document.referrer;
|
referrer = document.referrer;
|
||||||
|
|
||||||
}
|
}
|
||||||
if((referrer == null || referrer.length == 0)&&typeof localStorage !== 'undefined'){
|
if ((referrer == null || referrer.length == 0) && typeof localStorage !== 'undefined') {
|
||||||
|
referrer = localStorage.getItem('previousRoute');
|
||||||
referrer =localStorage.getItem('previousRoute');
|
|
||||||
}
|
}
|
||||||
return referrer;
|
return referrer;
|
||||||
}
|
}
|
||||||
parse(data:any){
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
export type Environment = "development" | "test" | "beta" | "production";
|
export type Environment = "development" | "test" | "beta" | "production";
|
||||||
export type Dashboard = "explore" | "connect" | "monitor" | "aggregator" | "eosc" | "client-management-portal";
|
export type Dashboard = "explore" | "connect" | "monitor" | "aggregator" | "eosc" | "developers";
|
||||||
export type PortalType = "explore" | "connect" | "community" | "monitor" | "funder" | "ri" | "project" | "organization" | "aggregator" | "eosc";
|
export type PortalType = "explore" | "connect" | "community" | "monitor" | "funder" | "ri" | "project" | "organization" | "aggregator" | "eosc";
|
||||||
|
|
||||||
export interface EnvProperties {
|
export interface EnvProperties {
|
||||||
|
@ -65,7 +65,7 @@ export interface EnvProperties {
|
||||||
registryUrl?: string;
|
registryUrl?: string;
|
||||||
logoutUrl?: string;
|
logoutUrl?: string;
|
||||||
userInfoUrl?: string;
|
userInfoUrl?: string;
|
||||||
clientManagementUrl?: string,
|
developersApiUrl?: string,
|
||||||
cookieDomain?: string;
|
cookieDomain?: string;
|
||||||
feedbackmail?: string;
|
feedbackmail?: string;
|
||||||
feedbackmailForMissingEntities?: string;
|
feedbackmailForMissingEntities?: string;
|
||||||
|
|
|
@ -123,7 +123,7 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- Authors -->
|
<!-- Authors -->
|
||||||
<div *ngIf="result.authors" class="uk-margin-xsmall-bottom">
|
<div *ngIf="result.authors" class="uk-margin-xsmall-bottom">
|
||||||
<showAuthors [authors]="result.authors" [authorsLimit]=4 [modal]="modal"
|
<showAuthors [authors]="result.authors" [authorsLimit]=4 [modal]="modal" [isMobile]="isMobile"
|
||||||
[showAll]=true [showInline]="showInline"></showAuthors>
|
[showAll]=true [showInline]="showInline"></showAuthors>
|
||||||
</div>
|
</div>
|
||||||
<!-- Identifiers -->
|
<!-- Identifiers -->
|
||||||
|
|
|
@ -210,18 +210,18 @@ export class Identifier {
|
||||||
public static getPIDFromIdentifiers(identifiers: Map<string, string[]>): Identifier {
|
public static getPIDFromIdentifiers(identifiers: Map<string, string[]>): Identifier {
|
||||||
let classes:string [] = ["doi", "handle", "pmc", "pmid", "re3data"];
|
let classes:string [] = ["doi", "handle", "pmc", "pmid", "re3data"];
|
||||||
if(identifiers) {
|
if(identifiers) {
|
||||||
for (let cl of classes){
|
for (let cl of classes) {
|
||||||
if(identifiers.get(cl)){
|
if (identifiers.get(cl)) {
|
||||||
for (let pid of identifiers.get(cl)) {
|
for (let pid of identifiers.get(cl)) {
|
||||||
let identifier = Identifier.getIdentifierFromString(pid);
|
let identifier = Identifier.getIdentifierFromString(pid);
|
||||||
if (identifier){
|
if (identifier) {
|
||||||
return identifier;
|
return identifier;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static isValidDOI(str: string): boolean {
|
public static isValidDOI(str: string): boolean {
|
||||||
|
@ -332,7 +332,6 @@ export class StringUtils {
|
||||||
return (control: AbstractControl): ValidationErrors | null => {
|
return (control: AbstractControl): ValidationErrors | null => {
|
||||||
if(control.value) {
|
if(control.value) {
|
||||||
let test = control.getRawValue().replace(/\\["\\\/bfnrtu]/g, '@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']').replace(/(?:^|:|,)(?:\s*\[)+/g, '');
|
let test = control.getRawValue().replace(/\\["\\\/bfnrtu]/g, '@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']').replace(/(?:^|:|,)(?:\s*\[)+/g, '');
|
||||||
console.log('test')
|
|
||||||
if(!new RegExp(this.jsonRegex).test(test)) {
|
if(!new RegExp(this.jsonRegex).test(test)) {
|
||||||
return {error: 'Please provide a valid JSON.' + error}
|
return {error: 'Please provide a valid JSON.' + error}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue